| 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 "../include/v8-debug.h" | 8 #include "../include/v8-debug.h" |
| 9 #include "allocation.h" | 9 #include "allocation.h" |
| 10 #include "assert-scope.h" | 10 #include "assert-scope.h" |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 ASSERT(slot < Internals::kNumIsolateDataSlots); | 956 ASSERT(slot < Internals::kNumIsolateDataSlots); |
| 957 embedder_data_[slot] = data; | 957 embedder_data_[slot] = data; |
| 958 } | 958 } |
| 959 void* GetData(uint32_t slot) { | 959 void* GetData(uint32_t slot) { |
| 960 ASSERT(slot < Internals::kNumIsolateDataSlots); | 960 ASSERT(slot < Internals::kNumIsolateDataSlots); |
| 961 return embedder_data_[slot]; | 961 return embedder_data_[slot]; |
| 962 } | 962 } |
| 963 | 963 |
| 964 THREAD_LOCAL_TOP_ACCESSOR(LookupResult*, top_lookup_result) | 964 THREAD_LOCAL_TOP_ACCESSOR(LookupResult*, top_lookup_result) |
| 965 | 965 |
| 966 void enable_serializer() { |
| 967 // The serializer can only be enabled before the isolate init. |
| 968 ASSERT(state_ != INITIALIZED); |
| 969 serializer_enabled_ = true; |
| 970 } |
| 971 |
| 972 bool serializer_enabled() const { return serializer_enabled_; } |
| 973 |
| 966 bool IsDead() { return has_fatal_error_; } | 974 bool IsDead() { return has_fatal_error_; } |
| 967 void SignalFatalError() { has_fatal_error_ = true; } | 975 void SignalFatalError() { has_fatal_error_ = true; } |
| 968 | 976 |
| 969 bool use_crankshaft() const { return use_crankshaft_; } | 977 bool use_crankshaft() const; |
| 970 | 978 |
| 971 bool initialized_from_snapshot() { return initialized_from_snapshot_; } | 979 bool initialized_from_snapshot() { return initialized_from_snapshot_; } |
| 972 | 980 |
| 973 double time_millis_since_init() { | 981 double time_millis_since_init() { |
| 974 return OS::TimeCurrentMillis() - time_millis_at_init_; | 982 return OS::TimeCurrentMillis() - time_millis_at_init_; |
| 975 } | 983 } |
| 976 | 984 |
| 977 DateCache* date_cache() { | 985 DateCache* date_cache() { |
| 978 return date_cache_; | 986 return date_cache_; |
| 979 } | 987 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 StaticResource<ConsStringIteratorOp> objects_string_iterator_; | 1233 StaticResource<ConsStringIteratorOp> objects_string_iterator_; |
| 1226 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1234 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1227 regexp_macro_assembler_canonicalize_; | 1235 regexp_macro_assembler_canonicalize_; |
| 1228 RegExpStack* regexp_stack_; | 1236 RegExpStack* regexp_stack_; |
| 1229 DateCache* date_cache_; | 1237 DateCache* date_cache_; |
| 1230 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1238 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1231 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; | 1239 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; |
| 1232 CallInterfaceDescriptor* call_descriptors_; | 1240 CallInterfaceDescriptor* call_descriptors_; |
| 1233 RandomNumberGenerator* random_number_generator_; | 1241 RandomNumberGenerator* random_number_generator_; |
| 1234 | 1242 |
| 1243 // Whether the isolate has been created for snapshotting. |
| 1244 bool serializer_enabled_; |
| 1245 |
| 1235 // True if fatal error has been signaled for this isolate. | 1246 // True if fatal error has been signaled for this isolate. |
| 1236 bool has_fatal_error_; | 1247 bool has_fatal_error_; |
| 1237 | 1248 |
| 1238 // True if we are using the Crankshaft optimizing compiler. | |
| 1239 bool use_crankshaft_; | |
| 1240 | |
| 1241 // True if this isolate was initialized from a snapshot. | 1249 // True if this isolate was initialized from a snapshot. |
| 1242 bool initialized_from_snapshot_; | 1250 bool initialized_from_snapshot_; |
| 1243 | 1251 |
| 1244 // Time stamp at initialization. | 1252 // Time stamp at initialization. |
| 1245 double time_millis_at_init_; | 1253 double time_millis_at_init_; |
| 1246 | 1254 |
| 1247 #ifdef DEBUG | 1255 #ifdef DEBUG |
| 1248 // A static array of histogram info for each type. | 1256 // A static array of histogram info for each type. |
| 1249 HistogramInfo heap_histograms_[LAST_TYPE + 1]; | 1257 HistogramInfo heap_histograms_[LAST_TYPE + 1]; |
| 1250 JSObject::SpillInformation js_spill_information_; | 1258 JSObject::SpillInformation js_spill_information_; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 } | 1491 } |
| 1484 | 1492 |
| 1485 EmbeddedVector<char, 128> filename_; | 1493 EmbeddedVector<char, 128> filename_; |
| 1486 FILE* file_; | 1494 FILE* file_; |
| 1487 int scope_depth_; | 1495 int scope_depth_; |
| 1488 }; | 1496 }; |
| 1489 | 1497 |
| 1490 } } // namespace v8::internal | 1498 } } // namespace v8::internal |
| 1491 | 1499 |
| 1492 #endif // V8_ISOLATE_H_ | 1500 #endif // V8_ISOLATE_H_ |
| OLD | NEW |