OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // LiveEdit feature implementation. The script should be executed after | 5 // LiveEdit feature implementation. The script should be executed after |
6 // debug-debugger.js. | 6 // debug.js. |
7 | 7 |
8 // A LiveEdit namespace. It contains functions that modifies JavaScript code | 8 // A LiveEdit namespace. It contains functions that modifies JavaScript code |
9 // according to changes of script source (if possible). | 9 // according to changes of script source (if possible). |
10 // | 10 // |
11 // When new script source is put in, the difference is calculated textually, | 11 // When new script source is put in, the difference is calculated textually, |
12 // in form of list of delete/add/change chunks. The functions that include | 12 // in form of list of delete/add/change chunks. The functions that include |
13 // change chunk(s) get recompiled, or their enclosing functions are | 13 // change chunk(s) get recompiled, or their enclosing functions are |
14 // recompiled instead. | 14 // recompiled instead. |
15 // If the function may not be recompiled (e.g. it was completely erased in new | 15 // If the function may not be recompiled (e.g. it was completely erased in new |
16 // version of the script) it remains unchanged, but the code that could | 16 // version of the script) it remains unchanged, but the code that could |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 return ProcessOldNode(old_code_tree); | 1098 return ProcessOldNode(old_code_tree); |
1099 } | 1099 } |
1100 | 1100 |
1101 // Functions are public for tests. | 1101 // Functions are public for tests. |
1102 this.TestApi = { | 1102 this.TestApi = { |
1103 PosTranslator: PosTranslator, | 1103 PosTranslator: PosTranslator, |
1104 CompareStrings: CompareStrings, | 1104 CompareStrings: CompareStrings, |
1105 ApplySingleChunkPatch: ApplySingleChunkPatch | 1105 ApplySingleChunkPatch: ApplySingleChunkPatch |
1106 }; | 1106 }; |
1107 }; | 1107 }; |
OLD | NEW |