Lines Matching defs:script
685 // Track the top-level script function separately as it can overlap fully with
686 // another function, e.g. the script "()=>42".
755 bool ParseScript(Isolate* isolate, Handle<Script> script, ParseInfo* parse_info,
762 success = Compiler::CompileForLiveEdit(parse_info, script, isolate)
765 success = parsing::ParseProgram(parse_info, script, isolate,
771 parse_info->pending_error_handler()->ReportErrors(isolate, script);
812 if (!sfi.script().IsScript() || start_position == -1) {
815 Script script = Script::cast(sfi.script());
816 return Lookup(GetFuncId(script.id(), sfi), data);
819 bool Lookup(Handle<Script> script, FunctionLiteral* literal,
821 return Lookup(GetFuncId(script->id(), literal), data);
868 // This is the top-level script function literal, so special case its
877 DCHECK_EQ(script_id, Script::cast(sfi.script()).id());
910 bool CanPatchScript(const LiteralMap& changed, Handle<Script> script,
916 function_data_map.Lookup(script, mapping.first, &data);
975 void LiveEdit::PatchScript(Isolate* isolate, Handle<Script> script,
980 handle(String::cast(script->source()), isolate),
991 UnoptimizedCompileFlags::ForScriptCompile(isolate, *script);
995 if (!ParseScript(isolate, script, &parse_info, false, &literals, result))
998 Handle<Script> new_script = isolate->factory()->CloneScript(script);
1021 function_data_map.AddInterestingLiteral(script->id(), mapping.first);
1025 function_data_map.AddInterestingLiteral(script->id(), mapping.first);
1029 if (!CanPatchScript(changed, script, new_script, function_data_map, result)) {
1038 // Patching a script means that the bytecode on the stack may no longer
1048 if (!function_data_map.Lookup(script, mapping.first, &data)) continue;
1051 DCHECK_EQ(sfi->script(), *script);
1111 DCHECK_EQ(new_sfi->script(), *new_script);
1113 if (!function_data_map.Lookup(script, mapping.first, &data)) continue;
1145 // Grab that function id from the new script's SFI list, which should have
1154 // been processed and patched to be on the new script ...
1155 DCHECK_EQ(old_unchanged_inner_sfi.script(), *new_script);
1161 // Check that all the functions in the new script are valid, that their
1170 DCHECK_EQ(sfi.script(), *new_script);
1173 // overlap with a function in the script.
1182 // on the new script, and that their id matches their index in the new
1189 DCHECK_EQ(inner_sfi.script(), *new_script);
1198 int script_id = script->id();
1199 script->set_id(new_script->id());
1202 result->script = ToApiHandle<v8::debug::Script>(new_script);