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_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 CancelableTaskManager* cancelable_task_manager() { | 1103 CancelableTaskManager* cancelable_task_manager() { |
1104 return cancelable_task_manager_; | 1104 return cancelable_task_manager_; |
1105 } | 1105 } |
1106 | 1106 |
1107 interpreter::Interpreter* interpreter() const { return interpreter_; } | 1107 interpreter::Interpreter* interpreter() const { return interpreter_; } |
1108 | 1108 |
1109 base::AccountingAllocator* allocator() { return &allocator_; } | 1109 base::AccountingAllocator* allocator() { return &allocator_; } |
1110 | 1110 |
1111 bool IsInAnyContext(Object* object, uint32_t index); | 1111 bool IsInAnyContext(Object* object, uint32_t index); |
1112 | 1112 |
| 1113 void SetRAILMode(RAILMode rail_mode); |
| 1114 |
1113 protected: | 1115 protected: |
1114 explicit Isolate(bool enable_serializer); | 1116 explicit Isolate(bool enable_serializer); |
1115 bool IsArrayOrObjectPrototype(Object* object); | 1117 bool IsArrayOrObjectPrototype(Object* object); |
1116 | 1118 |
1117 private: | 1119 private: |
1118 friend struct GlobalState; | 1120 friend struct GlobalState; |
1119 friend struct InitializeGlobalState; | 1121 friend struct InitializeGlobalState; |
1120 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, | 1122 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, |
1121 const char* name); | 1123 const char* name); |
1122 | 1124 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 // If there is no external try-catch or message was successfully propagated, | 1216 // If there is no external try-catch or message was successfully propagated, |
1215 // then return true. | 1217 // then return true. |
1216 bool PropagatePendingExceptionToExternalTryCatch(); | 1218 bool PropagatePendingExceptionToExternalTryCatch(); |
1217 | 1219 |
1218 // Remove per-frame stored materialized objects when we are unwinding | 1220 // Remove per-frame stored materialized objects when we are unwinding |
1219 // the frame. | 1221 // the frame. |
1220 void RemoveMaterializedObjectsOnUnwind(StackFrame* frame); | 1222 void RemoveMaterializedObjectsOnUnwind(StackFrame* frame); |
1221 | 1223 |
1222 void RunMicrotasksInternal(); | 1224 void RunMicrotasksInternal(); |
1223 | 1225 |
| 1226 const char* RAILModeName(RAILMode rail_mode) const { |
| 1227 switch (rail_mode) { |
| 1228 case PERFORMANCE_DEFAULT: |
| 1229 return "DEFAULT"; |
| 1230 case PERFORMANCE_RESPONSE: |
| 1231 return "RESPONSE"; |
| 1232 case PERFORMANCE_ANIMATION: |
| 1233 return "ANIMATION"; |
| 1234 case PERFORMANCE_IDLE: |
| 1235 return "IDLE"; |
| 1236 case PERFORMANCE_LOAD: |
| 1237 return "LOAD"; |
| 1238 default: |
| 1239 UNREACHABLE(); |
| 1240 } |
| 1241 return ""; |
| 1242 } |
| 1243 |
1224 base::Atomic32 id_; | 1244 base::Atomic32 id_; |
1225 EntryStackItem* entry_stack_; | 1245 EntryStackItem* entry_stack_; |
1226 int stack_trace_nesting_level_; | 1246 int stack_trace_nesting_level_; |
1227 StringStream* incomplete_message_; | 1247 StringStream* incomplete_message_; |
1228 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1248 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
1229 Bootstrapper* bootstrapper_; | 1249 Bootstrapper* bootstrapper_; |
1230 RuntimeProfiler* runtime_profiler_; | 1250 RuntimeProfiler* runtime_profiler_; |
1231 CompilationCache* compilation_cache_; | 1251 CompilationCache* compilation_cache_; |
1232 Counters* counters_; | 1252 Counters* counters_; |
1233 base::RecursiveMutex break_access_; | 1253 base::RecursiveMutex break_access_; |
(...skipping 26 matching lines...) Expand all Loading... |
1260 Builtins builtins_; | 1280 Builtins builtins_; |
1261 bool has_installed_extensions_; | 1281 bool has_installed_extensions_; |
1262 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; | 1282 unibrow::Mapping<unibrow::Ecma262UnCanonicalize> jsregexp_uncanonicalize_; |
1263 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; | 1283 unibrow::Mapping<unibrow::CanonicalizationRange> jsregexp_canonrange_; |
1264 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1284 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
1265 regexp_macro_assembler_canonicalize_; | 1285 regexp_macro_assembler_canonicalize_; |
1266 RegExpStack* regexp_stack_; | 1286 RegExpStack* regexp_stack_; |
1267 DateCache* date_cache_; | 1287 DateCache* date_cache_; |
1268 CallInterfaceDescriptorData* call_descriptor_data_; | 1288 CallInterfaceDescriptorData* call_descriptor_data_; |
1269 base::RandomNumberGenerator* random_number_generator_; | 1289 base::RandomNumberGenerator* random_number_generator_; |
| 1290 RAILMode rail_mode_; |
1270 | 1291 |
1271 // Whether the isolate has been created for snapshotting. | 1292 // Whether the isolate has been created for snapshotting. |
1272 bool serializer_enabled_; | 1293 bool serializer_enabled_; |
1273 | 1294 |
1274 // True if fatal error has been signaled for this isolate. | 1295 // True if fatal error has been signaled for this isolate. |
1275 bool has_fatal_error_; | 1296 bool has_fatal_error_; |
1276 | 1297 |
1277 // True if this isolate was initialized from a snapshot. | 1298 // True if this isolate was initialized from a snapshot. |
1278 bool initialized_from_snapshot_; | 1299 bool initialized_from_snapshot_; |
1279 | 1300 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 | 1614 |
1594 EmbeddedVector<char, 128> filename_; | 1615 EmbeddedVector<char, 128> filename_; |
1595 FILE* file_; | 1616 FILE* file_; |
1596 int scope_depth_; | 1617 int scope_depth_; |
1597 }; | 1618 }; |
1598 | 1619 |
1599 } // namespace internal | 1620 } // namespace internal |
1600 } // namespace v8 | 1621 } // namespace v8 |
1601 | 1622 |
1602 #endif // V8_ISOLATE_H_ | 1623 #endif // V8_ISOLATE_H_ |
OLD | NEW |