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 14 matching lines...) Expand all Loading... | |
25 // instantiate newly compiled functions. | 25 // instantiate newly compiled functions. |
26 | 26 |
27 | 27 |
28 #include "src/allocation.h" | 28 #include "src/allocation.h" |
29 #include "src/compiler.h" | 29 #include "src/compiler.h" |
30 | 30 |
31 namespace v8 { | 31 namespace v8 { |
32 namespace internal { | 32 namespace internal { |
33 | 33 |
34 // This class collects some specific information on structure of functions | 34 // This class collects some specific information on structure of functions |
35 // in a particular script. It gets called from compiler all the time, but | 35 // in a particular script. |
36 // actually records any data only when liveedit operation is in process; | |
37 // in any other time this class is very cheap. | |
38 // | 36 // |
39 // The primary interest of the Tracker is to record function scope structures | 37 // The primary interest of the Tracker is to record function scope structures |
40 // in order to analyze whether function code maybe safely patched (with new | 38 // in order to analyze whether function code may be safely patched (with new |
41 // code successfully reading existing data from function scopes). The Tracker | 39 // code successfully reading existing data from function scopes). The Tracker |
42 // also collects compiled function codes. | 40 // also collects compiled function codes. |
43 class LiveEditFunctionTracker { | 41 class LiveEditFunctionTracker : AllStatic { |
Yang
2016/05/11 07:29:09
As previously described, we should merge the funct
jgruber1
2016/05/12 12:30:25
Done.
| |
44 public: | 42 public: |
45 explicit LiveEditFunctionTracker(Isolate* isolate, FunctionLiteral* fun); | 43 static void Collect(Handle<Script> script, ParseInfo* parse_info, |
46 ~LiveEditFunctionTracker(); | 44 Isolate* isolate); |
47 void RecordFunctionInfo(Handle<SharedFunctionInfo> info, | |
48 FunctionLiteral* lit, Zone* zone); | |
49 | 45 |
50 static bool IsActive(Isolate* isolate); | 46 static bool IsActive(Isolate* isolate); |
51 | |
52 private: | |
53 Isolate* isolate_; | |
54 }; | 47 }; |
55 | 48 |
56 | 49 |
57 class LiveEdit : AllStatic { | 50 class LiveEdit : AllStatic { |
58 public: | 51 public: |
59 // Describes how exactly a frame has been dropped from stack. | 52 // Describes how exactly a frame has been dropped from stack. |
60 enum FrameDropMode { | 53 enum FrameDropMode { |
61 // No frame has been dropped. | 54 // No frame has been dropped. |
62 FRAMES_UNTOUCHED, | 55 FRAMES_UNTOUCHED, |
63 // The top JS frame had been calling debug break slot stub. Patch the | 56 // The top JS frame had been calling debug break slot stub. Patch the |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
356 static const int kSharedInfoOffset_ = 3; | 349 static const int kSharedInfoOffset_ = 3; |
357 static const int kSize_ = 4; | 350 static const int kSize_ = 4; |
358 | 351 |
359 friend class JSArrayBasedStruct<SharedInfoWrapper>; | 352 friend class JSArrayBasedStruct<SharedInfoWrapper>; |
360 }; | 353 }; |
361 | 354 |
362 } // namespace internal | 355 } // namespace internal |
363 } // namespace v8 | 356 } // namespace v8 |
364 | 357 |
365 #endif /* V8_DEBUG_LIVEEDIT_H_ */ | 358 #endif /* V8_DEBUG_LIVEEDIT_H_ */ |
OLD | NEW |