Lines Matching refs:Function
38 // If the function may not be recompiled (e.g. it was completely erased in new
40 // create a new instance of this function goes away. An old version of script
41 // is created to back up this obsolete function.
44 // LiveEdit namespace is declared inside a single function constructor.
45 Debug.LiveEdit = new function() {
53 function ApplyPatchMultiChunk(script, diff_array, new_source, preview_only,
90 function HarvestTodo(old_node) {
91 function CollectDamaged(node) {
100 function CollectNew(node_list) {
156 // Check that function being patched is not currently on stack or drop them.
168 // Create an old script only if there are function that should be linked
214 forEach(function (info) {
225 // Function is public.
238 function GatherCompileInfo(source, script) {
239 // Get function info, elements are partially sorted (it is a tree of
243 // Sort function infos by start position field.
249 // LiveEdit itself believe that any function in heap that points to a
250 // particular script is a regular function.
278 // The recursive function, that goes over all children of a particular
279 // node (i.e. function info).
280 function ResetIndexes(new_parent_index, old_parent_index) {
305 // Replaces function's Code.
306 function PatchFunctionCode(old_node, change_log) {
309 old_node.live_shared_function_infos.forEach(function (old_info) {
313 // The function got a new code. However, this new code brings all new
327 forEach(function (old_child_info) {
345 // Makes a function associated with another instance of a script (the
346 // one representing its old version). This way the function still
348 function LinkToOldScript(old_info_node, old_script, report_array) {
351 forEach(function (info) {
363 // Returns function that restores breakpoints.
364 function TemporaryRemoveBreakPoints(original_script, change_log) {
391 return function (pos_translator, old_script_copy_opt) {
435 function Assert(condition, message) {
445 function DiffChunk(pos1, pos2, len1, len2) {
452 function PosTranslator(diff_array) {
466 PosTranslator.prototype.GetChunks = function() {
470 PosTranslator.prototype.Translate = function(pos, inside_chunk_handler) {
497 PosTranslator.DefaultInsideChunkHandler = function(pos, diff_chunk) {
502 function(pos, diff_chunk) {
509 // No change to function or its inner functions; however its positions
512 // The code of a function remains unchanged, but something happened inside
515 // The code of a function is changed or some nested function cannot be
516 // properly patched so this function must be recompiled.
518 // Function is changed but cannot be patched.
522 function CodeInfoTreeNode(code_info, children, array_index) {
541 // Sometimes only function body is changed (functions in old and new script
543 // as an old function deleted and new function created.
550 // From array of function infos that is implicitly a tree creates
552 function BuildCodeInfoTree(code_info_array) {
553 // Throughtout all function we iterate over input array.
556 // Recursive function that builds a branch of tree.
557 function BuildNode() {
579 // Determines status of each function (from unchanged to damaged). However
581 function MarkChangedFunctions(code_info_tree, chunks) {
585 var chunk_it = new function() {
588 this.current = function() { return chunks[chunk_index]; }
589 this.next = function() {
594 this.done = function() { return chunk_index >= chunks.length; }
595 this.TranslatePos = function(pos) { return pos + pos_diff; }
598 // A recursive function that processes internals of a function and all its
600 // below function start.
601 function ProcessInternals(info_node) {
636 "Text diff overlaps with function boundary";
649 "Text diff overlaps with function boundary";
669 function ProcessUnchangedChild(node) {
677 // For ecah old function (if it is not damaged) tries to find a corresponding
678 // function in new script. Typically it should succeed (non-damaged functions
680 // reasons for corresponence not to be found; function with unmodified text
681 // in new script may become enclosed into other function; the innocent change
682 // inside function body may in fact be something like "} function B() {" that
683 // splits a function into 2 functions.
684 function FindCorrespondingFunctions(old_code_tree, new_code_tree) {
686 // A recursive function that tries to find a correspondence for all
688 function ProcessChildren(old_node, new_node) {
727 "No corresponding function in new script found";
737 "No corresponding function in new script found";
744 "No corresponding function in new script found";
778 function FindLiveSharedInfos(old_code_tree, script) {
789 function FindFunctionInfos(compile_info) {
805 function TraverseTree(node) {
817 // An object describing function compilation details. Its index fields
819 function FunctionCompileInfo(raw_array) {
833 function SharedInfoWrapper(raw_array) {
841 // Changes positions (including all statments) in function.
842 function PatchPositions(old_info_node, diff_array, report_array) {
844 old_info_node.live_shared_function_infos.forEach(function (info) {
851 // TODO(LiveEdit): function is not compiled yet or is already collected.
858 function CreateNameForOldScript(script) {
863 function interface old and new version, whether it
865 function WhyFunctionExpectationsDiffer(function_info1, function_info2) {
866 // Check that function has the same number of parameters (there may exist
867 // an adapter, that won't survive function parameter number change).
900 // For array of wrapped shared function infos checks that none of them
903 function CheckStackActivations(shared_wrapper_list, change_log) {
951 FunctionPatchabilityStatus.SymbolName = function(code) {
963 function Failure(message) {
966 // Function (constructor) is public.
969 Failure.prototype.toString = function() {
974 function GetPcFromSourcePos(func, source_pos) {
977 // Function is public.
981 function SetScriptSource(script, new_source, preview_only, change_log) {
987 // Function is public.
990 function CompareStrings(s1, s2) {
1002 function ApplySingleChunkPatch(script, change_pos, change_len, new_str,
1016 function DescribeChangeTree(old_code_tree) {
1018 function ProcessOldNode(node) {
1049 function ProcessNewNode(node) {
1065 function DescribePositions(node) {