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 #ifndef V8_DEBUG_LIVEEDIT_H_ | 5 #ifndef V8_DEBUG_LIVEEDIT_H_ |
6 #define V8_DEBUG_LIVEEDIT_H_ | 6 #define V8_DEBUG_LIVEEDIT_H_ |
7 | 7 |
8 | 8 |
9 // Live Edit feature implementation. | 9 // Live Edit feature implementation. |
10 // User should be able to change script on already running VM. This feature | 10 // User should be able to change script on already running VM. This feature |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // FUNCTION_BLOCKED_ACTIVE_GENERATOR. | 110 // FUNCTION_BLOCKED_ACTIVE_GENERATOR. |
111 static bool FindActiveGenerators(Handle<FixedArray> shared_info_array, | 111 static bool FindActiveGenerators(Handle<FixedArray> shared_info_array, |
112 Handle<FixedArray> result, int len); | 112 Handle<FixedArray> result, int len); |
113 | 113 |
114 // Checks listed functions on stack and return array with corresponding | 114 // Checks listed functions on stack and return array with corresponding |
115 // FunctionPatchabilityStatus statuses; extra array element may | 115 // FunctionPatchabilityStatus statuses; extra array element may |
116 // contain general error message. Modifies the current stack and | 116 // contain general error message. Modifies the current stack and |
117 // has restart the lowest found frames and drops all other frames above | 117 // has restart the lowest found frames and drops all other frames above |
118 // if possible and if do_drop is true. | 118 // if possible and if do_drop is true. |
119 static Handle<JSArray> CheckAndDropActivations( | 119 static Handle<JSArray> CheckAndDropActivations( |
120 Handle<JSArray> shared_info_array, bool do_drop); | 120 Handle<JSArray> old_shared_array, Handle<JSArray> new_shared_array, |
| 121 bool do_drop); |
121 | 122 |
122 // Restarts the call frame and completely drops all frames above it. | 123 // Restarts the call frame and completely drops all frames above it. |
123 // Return error message or NULL. | 124 // Return error message or NULL. |
124 static const char* RestartFrame(JavaScriptFrame* frame); | 125 static const char* RestartFrame(JavaScriptFrame* frame); |
125 | 126 |
126 // A copy of this is in liveedit.js. | 127 // A copy of this is in liveedit.js. |
127 enum FunctionPatchabilityStatus { | 128 enum FunctionPatchabilityStatus { |
128 FUNCTION_AVAILABLE_FOR_PATCH = 1, | 129 FUNCTION_AVAILABLE_FOR_PATCH = 1, |
129 FUNCTION_BLOCKED_ON_ACTIVE_STACK = 2, | 130 FUNCTION_BLOCKED_ON_ACTIVE_STACK = 2, |
130 FUNCTION_BLOCKED_ON_OTHER_STACK = 3, | 131 FUNCTION_BLOCKED_ON_OTHER_STACK = 3, |
131 FUNCTION_BLOCKED_UNDER_NATIVE_CODE = 4, | 132 FUNCTION_BLOCKED_UNDER_NATIVE_CODE = 4, |
132 FUNCTION_REPLACED_ON_ACTIVE_STACK = 5, | 133 FUNCTION_REPLACED_ON_ACTIVE_STACK = 5, |
133 FUNCTION_BLOCKED_UNDER_GENERATOR = 6, | 134 FUNCTION_BLOCKED_UNDER_GENERATOR = 6, |
134 FUNCTION_BLOCKED_ACTIVE_GENERATOR = 7 | 135 FUNCTION_BLOCKED_ACTIVE_GENERATOR = 7, |
| 136 FUNCTION_BLOCKED_NO_NEW_TARGET_ON_RESTART = 8 |
135 }; | 137 }; |
136 | 138 |
137 // Compares 2 strings line-by-line, then token-wise and returns diff in form | 139 // Compares 2 strings line-by-line, then token-wise and returns diff in form |
138 // of array of triplets (pos1, pos1_end, pos2_end) describing list | 140 // of array of triplets (pos1, pos1_end, pos2_end) describing list |
139 // of diff chunks. | 141 // of diff chunks. |
140 static Handle<JSArray> CompareStrings(Handle<String> s1, | 142 static Handle<JSArray> CompareStrings(Handle<String> s1, |
141 Handle<String> s2); | 143 Handle<String> s2); |
142 | 144 |
143 // Architecture-specific constant. | 145 // Architecture-specific constant. |
144 static const bool kFrameDropperSupported; | 146 static const bool kFrameDropperSupported; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 static const int kSharedInfoOffset_ = 3; | 364 static const int kSharedInfoOffset_ = 3; |
363 static const int kSize_ = 4; | 365 static const int kSize_ = 4; |
364 | 366 |
365 friend class JSArrayBasedStruct<SharedInfoWrapper>; | 367 friend class JSArrayBasedStruct<SharedInfoWrapper>; |
366 }; | 368 }; |
367 | 369 |
368 } // namespace internal | 370 } // namespace internal |
369 } // namespace v8 | 371 } // namespace v8 |
370 | 372 |
371 #endif /* V8_DEBUG_LIVEEDIT_H_ */ | 373 #endif /* V8_DEBUG_LIVEEDIT_H_ */ |
OLD | NEW |