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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 Handle<JSArray> result_; | 65 Handle<JSArray> result_; |
66 int len_; | 66 int len_; |
67 int current_parent_index_; | 67 int current_parent_index_; |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(LiveEditFunctionTracker); | 69 DISALLOW_COPY_AND_ASSIGN(LiveEditFunctionTracker); |
70 }; | 70 }; |
71 | 71 |
72 | 72 |
73 class LiveEdit : AllStatic { | 73 class LiveEdit : AllStatic { |
74 public: | 74 public: |
75 // Describes how exactly a frame has been dropped from stack. | |
76 enum FrameDropMode { | |
77 // No frame has been dropped. | |
78 FRAMES_UNTOUCHED, | |
79 // The top JS frame had been calling debug break slot stub. Patch the | |
80 // address this stub jumps to in the end. | |
81 FRAME_DROPPED_IN_DEBUG_SLOT_CALL, | |
82 // The top JS frame had been calling some C++ function. The return address | |
83 // gets patched automatically. | |
84 FRAME_DROPPED_IN_DIRECT_CALL, | |
85 FRAME_DROPPED_IN_RETURN_CALL, | |
86 CURRENTLY_SET_MODE | |
87 }; | |
88 | |
89 static void InitializeThreadLocal(Debug* debug); | 75 static void InitializeThreadLocal(Debug* debug); |
90 | 76 |
91 static bool SetAfterBreakTarget(Debug* debug); | 77 static bool SetAfterBreakTarget(Debug* debug); |
92 | 78 |
93 MUST_USE_RESULT static MaybeHandle<JSArray> GatherCompileInfo( | 79 MUST_USE_RESULT static MaybeHandle<JSArray> GatherCompileInfo( |
94 Handle<Script> script, | 80 Handle<Script> script, |
95 Handle<String> source); | 81 Handle<String> source); |
96 | 82 |
97 static void ReplaceFunctionCode(Handle<JSArray> new_compile_info_array, | 83 static void ReplaceFunctionCode(Handle<JSArray> new_compile_info_array, |
98 Handle<JSArray> shared_info_array); | 84 Handle<JSArray> shared_info_array); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 static const int kSharedInfoOffset_ = 3; | 349 static const int kSharedInfoOffset_ = 3; |
364 static const int kSize_ = 4; | 350 static const int kSize_ = 4; |
365 | 351 |
366 friend class JSArrayBasedStruct<SharedInfoWrapper>; | 352 friend class JSArrayBasedStruct<SharedInfoWrapper>; |
367 }; | 353 }; |
368 | 354 |
369 } // namespace internal | 355 } // namespace internal |
370 } // namespace v8 | 356 } // namespace v8 |
371 | 357 |
372 #endif /* V8_DEBUG_LIVEEDIT_H_ */ | 358 #endif /* V8_DEBUG_LIVEEDIT_H_ */ |
OLD | NEW |