Lines Matching defs:source
2 // Use of this source code is governed by a BSD-style license that can be
400 Local<String> source =
402 Local<Value> result = JSON::Parse(context, source).ToLocalChecked();
489 Local<Value> source) {
491 CHECK(source->IsString());
492 v8::String::Utf8Value key(isolate, source);
506 void Shell::StoreInCodeCache(Isolate* isolate, Local<Value> source,
509 CHECK(source->IsString());
511 v8::String::Utf8Value key(isolate, source);
521 // Dummy external source stream which returns the whole source in one go.
525 explicit DummySourceStream(Local<String> source) : done_(false) {
526 source_buffer_ = Utils::OpenHandle(*source)->ToCString(
603 MaybeLocal<T> Compile(Local<Context> context, ScriptCompiler::Source* source,
607 ScriptCompiler::Source* source,
609 return ScriptCompiler::Compile(context, source, options);
614 ScriptCompiler::Source* source,
616 return ScriptCompiler::CompileModule(context->GetIsolate(), source, options);
623 Local<String> source,
627 std::make_unique<DummySourceStream>(source),
635 return CompileStreamed<T>(context, &streamed_source, source, origin);
640 cached_code = LookupCodeCache(isolate, source);
642 ScriptCompiler::Source script_source(source, origin, cached_code);
682 bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
689 i::Handle<i::String> str = Utils::OpenHandle(*(source));
746 if (CompileString<Script>(isolate, context, source, origin).IsEmpty()) {
751 if (!CompileString<Script>(isolate, context, source, origin)
761 StoreInCodeCache(isolate, source, cached_data);
779 StoreInCodeCache(isolate, source, cached_data);
1056 ScriptCompiler::Source source(source_text.ToLocalChecked(), origin);
1480 Local<String> source =
1482 MaybeLocal<Value> maybe_value = JSON::Parse(realm, source);
1914 Local<String> source;
1915 if (!ReadSource(args, 1, CodeType::kString).ToLocal(&source)) {
1923 ScriptCompiler::Source script_source(source, origin);
2323 Local<String> source;
2324 if (!ReadFile(args.GetIsolate(), *file_name).ToLocal(&source)) return;
2325 args.GetReturnValue().Set(source);
2377 Local<String> source;
2378 if (!ReadFile(isolate, *file_name).ToLocal(&source)) return;
2380 args.GetIsolate(), source,
2443 Local<String>* source,
2453 *source = String::NewFromUtf8Literal(isolate, "(");
2454 *source = String::Concat(isolate, *source, function_string);
2456 *source = String::Concat(isolate, *source, middle);
2466 *source = String::Concat(isolate, *source, comma);
2479 *source = String::Concat(isolate, *source, argument_string);
2483 *source = String::Concat(isolate, *source, suffix);
2487 // ReadSource() supports reading source code through `args[index]` as specified
2498 Local<String> source;
2509 &source, isolate)) {
2518 if (!Shell::ReadFile(isolate, *filename).ToLocal(&source)) {
2527 source = args[index].As<String>();
2533 return source;
2544 Local<String> source;
2545 if (!ReadSource(args, 0, CodeType::kFileName).ToLocal(&source)) {
2566 String::Utf8Value script(isolate, source);
2780 // Print line of source code.
2900 Local<String> source =
2905 Script::Compile(context, source, &origin).ToLocalChecked();
3935 Local<String> source =
3940 if (!Shell::ExecuteString(isolate, source, file_name, Shell::kNoPrintResult,
3953 Local<String> source =
3956 if (!Shell::ExecuteString(isolate, source, file_name,
4007 Local<String> source;
4008 if (!Shell::ReadFile(isolate, arg).ToLocal(&source)) {
4013 Shell::update_script_size(source->Length());
4014 if (!Shell::ExecuteString(isolate, source, file_name, Shell::kNoPrintResult,
4314 Local<String> source =
4317 isolate_, source, file_name, Shell::kNoPrintResult,
4673 // Set up isolated source groups.