Home | History | Annotate | Download | only in src

Lines Matching refs:Script

28 // LiveEdit feature implementation. The script should be executed after
32 // according to changes of script source (if possible).
34 // When new script source is put in, the difference is calculated textually,
39 // version of the script) it remains unchanged, but the code that could
40 // create a new instance of this function goes away. An old version of script
52 // Applies the change to the script.
55 function ApplyPatchMultiChunk(script, diff_array, new_source, preview_only,
58 var old_source = script.source;
60 // Gather compile information about old version of script.
61 var old_compile_info = GatherCompileInfo(old_source, script);
63 // Build tree structures for old and new versions of the script.
71 // Find all SharedFunctionInfo's that were compiled from this script.
72 FindLiveSharedInfos(root_old_node, script);
74 // Gather compile information about new version of script.
77 new_compile_info = GatherCompileInfo(new_source, script);
80 new Failure("Failed to compile new version of script: " + e);
93 // Link recompiled script data with other data.
111 // business and should have link to the actual script updated.
181 var break_points_restorer = TemporaryRemoveBreakPoints(script, change_log);
185 // Create an old script only if there are function that should be linked
188 %LiveEditReplaceScript(script, new_source, null);
191 var old_script_name = CreateNameForOldScript(script);
193 // Update the script text and create a new script representing an old
194 // version of the script.
195 old_script = %LiveEditReplaceScript(script, new_source,
201 // We need to link to old script all former nested functions.
210 // Link to an actual script all the functions that we are going to use.
213 link_to_original_script_list[i].info.shared_function_info, script);
246 // Fully compiles source string as a script. Returns Array of
247 // FunctionCompileInfo -- a descriptions of all functions of the script.
252 // All functions get compiled linked to script provided as parameter script.
253 // TODO(LiveEdit): consider not using actual scripts as script, because
255 function GatherCompileInfo(source, script) {
258 var raw_compile_info = %LiveEditGatherCompileInfo(script, source);
265 // Remove all links to the actual script. Breakpoints system and
267 // particular script is a regular function.
334 // linked to a script and breakpoints subsystem does not really
363 // Makes a function associated with another instance of a script (the
408 // the script.
411 // of script.
528 // in script may have been shifted.
559 // Sometimes only function body is changed (functions in old and new script
569 // an actual tree of functions in script.
602 // positions from old to new in a current non-changed part of script.
696 // function in new script. Typically it should succeed (non-damaged functions
699 // in new script may become enclosed into other function; the innocent change
758 "No corresponding function in new script found";
768 "No corresponding function in new script found";
775 "No corresponding function in new script found";
805 "Script became damaged");
808 function FindLiveSharedInfos(old_code_tree, script) {
809 var shared_raw_list = %LiveEditFindSharedFunctionInfosForScript(script);
818 // in old version of the script.
887 // Adds a suffix to script name to mark that it is old version.
888 function CreateNameForOldScript(script) {
890 return script.name + " (old)";
998 function createPositionStruct(script, position) {
1000 var location = script.locationFromPosition(position, true);
1013 var script = e.scriptObject;
1016 start: createPositionStruct(script, e.startPosition),
1017 end: createPositionStruct(script, e.endPosition)
1029 // LiveEdit main entry point: changes a script text to a new string.
1030 function SetScriptSource(script, new_source, preview_only, change_log) {
1031 var old_source = script.source;
1033 return ApplyPatchMultiChunk(script, diff, new_source, preview_only,
1043 // Applies the change to the script.
1048 // @param {Script} script that is being changed
1051 function ApplySingleChunkPatch(script, change_pos, change_len, new_str,
1053 var old_source = script.source;
1059 return ApplyPatchMultiChunk(script,