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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1048 return date_cache_; | 1048 return date_cache_; |
1049 } | 1049 } |
1050 | 1050 |
1051 void set_date_cache(DateCache* date_cache) { | 1051 void set_date_cache(DateCache* date_cache) { |
1052 if (date_cache != date_cache_) { | 1052 if (date_cache != date_cache_) { |
1053 delete date_cache_; | 1053 delete date_cache_; |
1054 } | 1054 } |
1055 date_cache_ = date_cache; | 1055 date_cache_ = date_cache; |
1056 } | 1056 } |
1057 | 1057 |
1058 void IterateDeferredHandles(ObjectVisitor* visitor); | |
1059 | |
1058 private: | 1060 private: |
1059 Isolate(); | 1061 Isolate(); |
1060 | 1062 |
1061 friend struct GlobalState; | 1063 friend struct GlobalState; |
1062 friend struct InitializeGlobalState; | 1064 friend struct InitializeGlobalState; |
1063 | 1065 |
1064 enum State { | 1066 enum State { |
1065 UNINITIALIZED, // Some components may not have been allocated. | 1067 UNINITIALIZED, // Some components may not have been allocated. |
1066 INITIALIZED // All components are fully initialized. | 1068 INITIALIZED // All components are fully initialized. |
1067 }; | 1069 }; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1166 void FillCache(); | 1168 void FillCache(); |
1167 | 1169 |
1168 void PropagatePendingExceptionToExternalTryCatch(); | 1170 void PropagatePendingExceptionToExternalTryCatch(); |
1169 | 1171 |
1170 void InitializeDebugger(); | 1172 void InitializeDebugger(); |
1171 | 1173 |
1172 // Traverse prototype chain to find out whether the object is derived from | 1174 // Traverse prototype chain to find out whether the object is derived from |
1173 // the Error object. | 1175 // the Error object. |
1174 bool IsErrorObject(Handle<Object> obj); | 1176 bool IsErrorObject(Handle<Object> obj); |
1175 | 1177 |
1178 void DestroyDeferredHandles(DeferredHandles* deferred); | |
1179 | |
1176 EntryStackItem* entry_stack_; | 1180 EntryStackItem* entry_stack_; |
1177 int stack_trace_nesting_level_; | 1181 int stack_trace_nesting_level_; |
1178 StringStream* incomplete_message_; | 1182 StringStream* incomplete_message_; |
1179 // The preallocated memory thread singleton. | 1183 // The preallocated memory thread singleton. |
1180 PreallocatedMemoryThread* preallocated_memory_thread_; | 1184 PreallocatedMemoryThread* preallocated_memory_thread_; |
1181 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT | 1185 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT |
1182 NoAllocationStringAllocator* preallocated_message_space_; | 1186 NoAllocationStringAllocator* preallocated_message_space_; |
1183 Bootstrapper* bootstrapper_; | 1187 Bootstrapper* bootstrapper_; |
1184 RuntimeProfiler* runtime_profiler_; | 1188 RuntimeProfiler* runtime_profiler_; |
1185 CompilationCache* compilation_cache_; | 1189 CompilationCache* compilation_cache_; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1271 // This class is huge and has a number of fields controlled by | 1275 // This class is huge and has a number of fields controlled by |
1272 // preprocessor defines. Make sure the offsets of these fields agree | 1276 // preprocessor defines. Make sure the offsets of these fields agree |
1273 // between compilation units. | 1277 // between compilation units. |
1274 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1278 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1275 static const intptr_t name##_debug_offset_; | 1279 static const intptr_t name##_debug_offset_; |
1276 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1280 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1277 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1281 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1278 #undef ISOLATE_FIELD_OFFSET | 1282 #undef ISOLATE_FIELD_OFFSET |
1279 #endif | 1283 #endif |
1280 | 1284 |
1285 DeferredHandles* deferred_handles_head_; | |
1286 | |
1287 friend class DeferredHandles; | |
danno
2012/07/18 13:36:17
No friend in this direction.
sanjoy
2012/07/18 14:00:44
Done.
| |
1281 friend class ExecutionAccess; | 1288 friend class ExecutionAccess; |
1282 friend class IsolateInitializer; | 1289 friend class IsolateInitializer; |
1283 friend class ThreadManager; | 1290 friend class ThreadManager; |
1284 friend class Simulator; | 1291 friend class Simulator; |
1285 friend class StackGuard; | 1292 friend class StackGuard; |
1286 friend class ThreadId; | 1293 friend class ThreadId; |
1287 friend class TestMemoryAllocatorScope; | 1294 friend class TestMemoryAllocatorScope; |
1288 friend class v8::Isolate; | 1295 friend class v8::Isolate; |
1289 friend class v8::Locker; | 1296 friend class v8::Locker; |
1290 friend class v8::Unlocker; | 1297 friend class v8::Unlocker; |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1428 | 1435 |
1429 // Mark the global context with out of memory. | 1436 // Mark the global context with out of memory. |
1430 inline void Context::mark_out_of_memory() { | 1437 inline void Context::mark_out_of_memory() { |
1431 global_context()->set_out_of_memory(HEAP->true_value()); | 1438 global_context()->set_out_of_memory(HEAP->true_value()); |
1432 } | 1439 } |
1433 | 1440 |
1434 | 1441 |
1435 } } // namespace v8::internal | 1442 } } // namespace v8::internal |
1436 | 1443 |
1437 #endif // V8_ISOLATE_H_ | 1444 #endif // V8_ISOLATE_H_ |
OLD | NEW |