OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // in a particular script. It gets called from compiler all the time, but | 58 // in a particular script. It gets called from compiler all the time, but |
59 // actually records any data only when liveedit operation is in process; | 59 // actually records any data only when liveedit operation is in process; |
60 // in any other time this class is very cheap. | 60 // in any other time this class is very cheap. |
61 // | 61 // |
62 // The primary interest of the Tracker is to record function scope structures | 62 // The primary interest of the Tracker is to record function scope structures |
63 // in order to analyze whether function code maybe safely patched (with new | 63 // in order to analyze whether function code maybe safely patched (with new |
64 // code successfully reading existing data from function scopes). The Tracker | 64 // code successfully reading existing data from function scopes). The Tracker |
65 // also collects compiled function codes. | 65 // also collects compiled function codes. |
66 class LiveEditFunctionTracker { | 66 class LiveEditFunctionTracker { |
67 public: | 67 public: |
68 explicit LiveEditFunctionTracker(FunctionLiteral* fun); | 68 explicit LiveEditFunctionTracker(Isolate* isolate, FunctionLiteral* fun); |
69 ~LiveEditFunctionTracker(); | 69 ~LiveEditFunctionTracker(); |
70 void RecordFunctionInfo(Handle<SharedFunctionInfo> info, | 70 void RecordFunctionInfo(Handle<SharedFunctionInfo> info, |
71 FunctionLiteral* lit); | 71 FunctionLiteral* lit); |
72 void RecordRootFunctionInfo(Handle<Code> code); | 72 void RecordRootFunctionInfo(Handle<Code> code); |
73 | 73 |
74 static bool IsActive(); | 74 static bool IsActive(Isolate* isolate); |
| 75 |
| 76 private: |
| 77 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 78 Isolate* isolate_; |
| 79 #endif |
75 }; | 80 }; |
76 | 81 |
77 #ifdef ENABLE_DEBUGGER_SUPPORT | 82 #ifdef ENABLE_DEBUGGER_SUPPORT |
78 | 83 |
79 class LiveEdit : AllStatic { | 84 class LiveEdit : AllStatic { |
80 public: | 85 public: |
81 static JSArray* GatherCompileInfo(Handle<Script> script, | 86 static JSArray* GatherCompileInfo(Handle<Script> script, |
82 Handle<String> source); | 87 Handle<String> source); |
83 | 88 |
84 static void WrapSharedFunctionInfos(Handle<JSArray> array); | 89 static void WrapSharedFunctionInfos(Handle<JSArray> array); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 static void CalculateDifference(Input* input, | 170 static void CalculateDifference(Input* input, |
166 Output* result_writer); | 171 Output* result_writer); |
167 }; | 172 }; |
168 | 173 |
169 #endif // ENABLE_DEBUGGER_SUPPORT | 174 #endif // ENABLE_DEBUGGER_SUPPORT |
170 | 175 |
171 | 176 |
172 } } // namespace v8::internal | 177 } } // namespace v8::internal |
173 | 178 |
174 #endif /* V*_LIVEEDIT_H_ */ | 179 #endif /* V*_LIVEEDIT_H_ */ |
OLD | NEW |