Lines Matching full:sources
314 return Vector<const char>(sources, %(total_length)i);
321 static const char sources[] = { %s };
331 if (index == %(i)i) return Vector<const char>(sources + %(offset)i, %(source_length)i);
341 """Build the chain of filter functions to be applied to the sources.
376 class Sources: class
400 to treat different types of sources differently.
402 sources as JS strings.
405 An instance of Sources.
427 # Sort 'debugger' sources first.
440 result = Sources()
459 def BuildMetadata(sources, source_bytes, native_type): argument
463 sources: A Sources instance with the prepared sources.
465 (The concatenation of all sources; might be compressed.)
472 raw_sources = "".join(sources.modules)
474 # The sources are expected to be ASCII-only.
482 for i in xrange(len(sources.modules)):
483 native_name = "native %s.js" % sources.names[i]
486 "id": sources.names[i],
490 "source_length": len(sources.modules[i]),
495 offset += len(sources.modules[i])
499 "builtin_count": len(sources.modules),
500 "debugger_count": sum(sources.is_debugger_id),
535 def WriteStartupBlob(sources, startup_blob): argument
540 sources: A Sources instance with the prepared sources.
545 debug_sources = sum(sources.is_debugger_id);
548 PutStr(output, sources.names[i]);
549 PutStr(output, sources.modules[i]);
551 PutInt(output, len(sources.names) - debug_sources)
552 for i in xrange(debug_sources, len(sources.names)):
553 PutStr(output, sources.names[i]);
554 PutStr(output, sources.modules[i]);
559 def JS2C(sources, target, native_type, raw_file, startup_blob, emit_js): argument
560 prepared_sources = PrepareSources(sources, native_type, emit_js)
585 help="file to write the processed sources array to.")
592 parser.set_usage("""js2c out.cc type sources.js ...
595 sources.js: JS internal sources or macros.py.""")