| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 | 1097 |
| 1098 void IterateDeferredHandles(ObjectVisitor* visitor); | 1098 void IterateDeferredHandles(ObjectVisitor* visitor); |
| 1099 void LinkDeferredHandles(DeferredHandles* deferred_handles); | 1099 void LinkDeferredHandles(DeferredHandles* deferred_handles); |
| 1100 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); | 1100 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); |
| 1101 | 1101 |
| 1102 #ifdef DEBUG | 1102 #ifdef DEBUG |
| 1103 bool IsDeferredHandle(Object** location); | 1103 bool IsDeferredHandle(Object** location); |
| 1104 #endif // DEBUG | 1104 #endif // DEBUG |
| 1105 | 1105 |
| 1106 OptimizingCompilerThread* optimizing_compiler_thread() { | 1106 OptimizingCompilerThread* optimizing_compiler_thread() { |
| 1107 return &optimizing_compiler_thread_; | 1107 return optimizing_compiler_thread_; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 // PreInits and returns a default isolate. Needed when a new thread tries | 1110 // PreInits and returns a default isolate. Needed when a new thread tries |
| 1111 // to create a Locker for the first time (the lock itself is in the isolate). | 1111 // to create a Locker for the first time (the lock itself is in the isolate). |
| 1112 // TODO(svenpanne) This method is on death row... | 1112 // TODO(svenpanne) This method is on death row... |
| 1113 static v8::Isolate* GetDefaultIsolateForLocking(); | 1113 static v8::Isolate* GetDefaultIsolateForLocking(); |
| 1114 | 1114 |
| 1115 MarkingThread** marking_threads() { | 1115 MarkingThread** marking_threads() { |
| 1116 return marking_thread_; | 1116 return marking_thread_; |
| 1117 } | 1117 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1130 function_entry_hook_ = function_entry_hook; | 1130 function_entry_hook_ = function_entry_hook; |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 void* stress_deopt_count_address() { return &stress_deopt_count_; } | 1133 void* stress_deopt_count_address() { return &stress_deopt_count_; } |
| 1134 | 1134 |
| 1135 inline RandomNumberGenerator* random_number_generator(); | 1135 inline RandomNumberGenerator* random_number_generator(); |
| 1136 | 1136 |
| 1137 // Given an address occupied by a live code object, return that object. | 1137 // Given an address occupied by a live code object, return that object. |
| 1138 Object* FindCodeObject(Address a); | 1138 Object* FindCodeObject(Address a); |
| 1139 | 1139 |
| 1140 bool is_memory_constrained() const { | |
| 1141 return is_memory_constrained_; | |
| 1142 } | |
| 1143 void set_is_memory_constrained(bool value) { | |
| 1144 is_memory_constrained_ = value; | |
| 1145 } | |
| 1146 | |
| 1147 private: | 1140 private: |
| 1148 Isolate(); | 1141 Isolate(); |
| 1149 | 1142 |
| 1150 friend struct GlobalState; | 1143 friend struct GlobalState; |
| 1151 friend struct InitializeGlobalState; | 1144 friend struct InitializeGlobalState; |
| 1152 | 1145 |
| 1153 enum State { | 1146 enum State { |
| 1154 UNINITIALIZED, // Some components may not have been allocated. | 1147 UNINITIALIZED, // Some components may not have been allocated. |
| 1155 INITIALIZED // All components are fully initialized. | 1148 INITIALIZED // All components are fully initialized. |
| 1156 }; | 1149 }; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 ConsStringIteratorOp objects_string_compare_iterator_a_; | 1302 ConsStringIteratorOp objects_string_compare_iterator_a_; |
| 1310 ConsStringIteratorOp objects_string_compare_iterator_b_; | 1303 ConsStringIteratorOp objects_string_compare_iterator_b_; |
| 1311 StaticResource<ConsStringIteratorOp> objects_string_iterator_; | 1304 StaticResource<ConsStringIteratorOp> objects_string_iterator_; |
| 1312 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1305 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1313 regexp_macro_assembler_canonicalize_; | 1306 regexp_macro_assembler_canonicalize_; |
| 1314 RegExpStack* regexp_stack_; | 1307 RegExpStack* regexp_stack_; |
| 1315 DateCache* date_cache_; | 1308 DateCache* date_cache_; |
| 1316 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1309 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1317 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; | 1310 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; |
| 1318 RandomNumberGenerator* random_number_generator_; | 1311 RandomNumberGenerator* random_number_generator_; |
| 1319 bool is_memory_constrained_; | |
| 1320 | 1312 |
| 1321 // True if fatal error has been signaled for this isolate. | 1313 // True if fatal error has been signaled for this isolate. |
| 1322 bool has_fatal_error_; | 1314 bool has_fatal_error_; |
| 1323 | 1315 |
| 1324 // True if we are using the Crankshaft optimizing compiler. | 1316 // True if we are using the Crankshaft optimizing compiler. |
| 1325 bool use_crankshaft_; | 1317 bool use_crankshaft_; |
| 1326 | 1318 |
| 1327 // True if this isolate was initialized from a snapshot. | 1319 // True if this isolate was initialized from a snapshot. |
| 1328 bool initialized_from_snapshot_; | 1320 bool initialized_from_snapshot_; |
| 1329 | 1321 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 // preprocessor defines. Make sure the offsets of these fields agree | 1360 // preprocessor defines. Make sure the offsets of these fields agree |
| 1369 // between compilation units. | 1361 // between compilation units. |
| 1370 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1362 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1371 static const intptr_t name##_debug_offset_; | 1363 static const intptr_t name##_debug_offset_; |
| 1372 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1364 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1373 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1365 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1374 #undef ISOLATE_FIELD_OFFSET | 1366 #undef ISOLATE_FIELD_OFFSET |
| 1375 #endif | 1367 #endif |
| 1376 | 1368 |
| 1377 DeferredHandles* deferred_handles_head_; | 1369 DeferredHandles* deferred_handles_head_; |
| 1378 OptimizingCompilerThread optimizing_compiler_thread_; | 1370 OptimizingCompilerThread* optimizing_compiler_thread_; |
| 1379 MarkingThread** marking_thread_; | 1371 MarkingThread** marking_thread_; |
| 1380 SweeperThread** sweeper_thread_; | 1372 SweeperThread** sweeper_thread_; |
| 1381 | 1373 |
| 1382 // Counts deopt points if deopt_every_n_times is enabled. | 1374 // Counts deopt points if deopt_every_n_times is enabled. |
| 1383 unsigned int stress_deopt_count_; | 1375 unsigned int stress_deopt_count_; |
| 1384 | 1376 |
| 1385 friend class ExecutionAccess; | 1377 friend class ExecutionAccess; |
| 1386 friend class HandleScopeImplementer; | 1378 friend class HandleScopeImplementer; |
| 1387 friend class IsolateInitializer; | 1379 friend class IsolateInitializer; |
| 1388 friend class MarkingThread; | 1380 friend class MarkingThread; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 | 1530 |
| 1539 // Mark the native context with out of memory. | 1531 // Mark the native context with out of memory. |
| 1540 inline void Context::mark_out_of_memory() { | 1532 inline void Context::mark_out_of_memory() { |
| 1541 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); | 1533 native_context()->set_out_of_memory(GetIsolate()->heap()->true_value()); |
| 1542 } | 1534 } |
| 1543 | 1535 |
| 1544 | 1536 |
| 1545 } } // namespace v8::internal | 1537 } } // namespace v8::internal |
| 1546 | 1538 |
| 1547 #endif // V8_ISOLATE_H_ | 1539 #endif // V8_ISOLATE_H_ |
| OLD | NEW |