| 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 V(bool, jump_target_compiling_deferred_code, false) \ | 309 V(bool, jump_target_compiling_deferred_code, false) \ |
| 310 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ | 310 V(DebugObjectCache*, string_stream_debug_object_cache, NULL) \ |
| 311 V(Object*, string_stream_current_security_token, NULL) \ | 311 V(Object*, string_stream_current_security_token, NULL) \ |
| 312 /* TODO(isolates): Release this on destruction? */ \ | 312 /* TODO(isolates): Release this on destruction? */ \ |
| 313 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ | 313 V(int*, irregexp_interpreter_backtrack_stack_cache, NULL) \ |
| 314 /* Serializer state. */ \ | 314 /* Serializer state. */ \ |
| 315 V(ExternalReferenceTable*, external_reference_table, NULL) \ | 315 V(ExternalReferenceTable*, external_reference_table, NULL) \ |
| 316 /* AstNode state. */ \ | 316 /* AstNode state. */ \ |
| 317 V(unsigned, ast_node_id, 0) \ | 317 V(unsigned, ast_node_id, 0) \ |
| 318 V(unsigned, ast_node_count, 0) \ | 318 V(unsigned, ast_node_count, 0) \ |
| 319 /* SafeStackFrameIterator activations count. */ \ |
| 320 V(int, safe_stack_iterator_counter, 0) \ |
| 319 ISOLATE_PLATFORM_INIT_LIST(V) \ | 321 ISOLATE_PLATFORM_INIT_LIST(V) \ |
| 320 ISOLATE_LOGGING_INIT_LIST(V) \ | 322 ISOLATE_LOGGING_INIT_LIST(V) \ |
| 321 ISOLATE_DEBUGGER_INIT_LIST(V) | 323 ISOLATE_DEBUGGER_INIT_LIST(V) |
| 322 | 324 |
| 323 class Isolate { | 325 class Isolate { |
| 324 // These forward declarations are required to make the friend declarations in | 326 // These forward declarations are required to make the friend declarations in |
| 325 // PerIsolateThreadData work on some older versions of gcc. | 327 // PerIsolateThreadData work on some older versions of gcc. |
| 326 class ThreadDataTable; | 328 class ThreadDataTable; |
| 327 class EntryStackItem; | 329 class EntryStackItem; |
| 328 public: | 330 public: |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 explicit SaveContext(Isolate* isolate) : prev_(isolate->save_context()) { | 1137 explicit SaveContext(Isolate* isolate) : prev_(isolate->save_context()) { |
| 1136 if (isolate->context() != NULL) { | 1138 if (isolate->context() != NULL) { |
| 1137 context_ = Handle<Context>(isolate->context()); | 1139 context_ = Handle<Context>(isolate->context()); |
| 1138 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300 | 1140 #if __GNUC_VERSION__ >= 40100 && __GNUC_VERSION__ < 40300 |
| 1139 dummy_ = Handle<Context>(isolate->context()); | 1141 dummy_ = Handle<Context>(isolate->context()); |
| 1140 #endif | 1142 #endif |
| 1141 } | 1143 } |
| 1142 isolate->set_save_context(this); | 1144 isolate->set_save_context(this); |
| 1143 | 1145 |
| 1144 // If there is no JS frame under the current C frame, use the value 0. | 1146 // If there is no JS frame under the current C frame, use the value 0. |
| 1145 JavaScriptFrameIterator it; | 1147 JavaScriptFrameIterator it(isolate); |
| 1146 js_sp_ = it.done() ? 0 : it.frame()->sp(); | 1148 js_sp_ = it.done() ? 0 : it.frame()->sp(); |
| 1147 } | 1149 } |
| 1148 | 1150 |
| 1149 ~SaveContext() { | 1151 ~SaveContext() { |
| 1150 if (context_.is_null()) { | 1152 if (context_.is_null()) { |
| 1151 Isolate* isolate = Isolate::Current(); | 1153 Isolate* isolate = Isolate::Current(); |
| 1152 isolate->set_context(NULL); | 1154 isolate->set_context(NULL); |
| 1153 isolate->set_save_context(prev_); | 1155 isolate->set_save_context(prev_); |
| 1154 } else { | 1156 } else { |
| 1155 Isolate* isolate = context_->GetIsolate(); | 1157 Isolate* isolate = context_->GetIsolate(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 | 1297 |
| 1296 } } // namespace v8::internal | 1298 } } // namespace v8::internal |
| 1297 | 1299 |
| 1298 // TODO(isolates): Get rid of these -inl.h includes and place them only where | 1300 // TODO(isolates): Get rid of these -inl.h includes and place them only where |
| 1299 // they're needed. | 1301 // they're needed. |
| 1300 #include "allocation-inl.h" | 1302 #include "allocation-inl.h" |
| 1301 #include "zone-inl.h" | 1303 #include "zone-inl.h" |
| 1302 #include "frames-inl.h" | 1304 #include "frames-inl.h" |
| 1303 | 1305 |
| 1304 #endif // V8_ISOLATE_H_ | 1306 #endif // V8_ISOLATE_H_ |
| OLD | NEW |