Chromium Code Reviews| 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() { serializer_enabled_ = true; } | |
| 967 | |
| 968 bool serializer_enabled() { return serializer_enabled_; } | |
|
Sven Panne
2014/05/22 08:04:15
const
Yang
2014/05/22 08:46:06
Done.
| |
| 969 | |
| 966 bool IsDead() { return has_fatal_error_; } | 970 bool IsDead() { return has_fatal_error_; } |
| 967 void SignalFatalError() { has_fatal_error_ = true; } | 971 void SignalFatalError() { has_fatal_error_ = true; } |
| 968 | 972 |
| 969 bool use_crankshaft() const { return use_crankshaft_; } | 973 bool use_crankshaft() const { |
| 974 return use_crankshaft_ && !serializer_enabled_; | |
|
Sven Panne
2014/05/22 08:04:15
Hmmm, why do we need this additional term?
Yang
2014/05/22 08:46:06
My mistake. Some point during refactoring I though
| |
| 975 } | |
| 970 | 976 |
| 971 bool initialized_from_snapshot() { return initialized_from_snapshot_; } | 977 bool initialized_from_snapshot() { return initialized_from_snapshot_; } |
| 972 | 978 |
| 973 double time_millis_since_init() { | 979 double time_millis_since_init() { |
| 974 return OS::TimeCurrentMillis() - time_millis_at_init_; | 980 return OS::TimeCurrentMillis() - time_millis_at_init_; |
| 975 } | 981 } |
| 976 | 982 |
| 977 DateCache* date_cache() { | 983 DateCache* date_cache() { |
| 978 return date_cache_; | 984 return date_cache_; |
| 979 } | 985 } |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1225 StaticResource<ConsStringIteratorOp> objects_string_iterator_; | 1231 StaticResource<ConsStringIteratorOp> objects_string_iterator_; |
| 1226 unibrow::Mapping<unibrow::Ecma262Canonicalize> | 1232 unibrow::Mapping<unibrow::Ecma262Canonicalize> |
| 1227 regexp_macro_assembler_canonicalize_; | 1233 regexp_macro_assembler_canonicalize_; |
| 1228 RegExpStack* regexp_stack_; | 1234 RegExpStack* regexp_stack_; |
| 1229 DateCache* date_cache_; | 1235 DateCache* date_cache_; |
| 1230 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; | 1236 unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_; |
| 1231 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; | 1237 CodeStubInterfaceDescriptor* code_stub_interface_descriptors_; |
| 1232 CallInterfaceDescriptor* call_descriptors_; | 1238 CallInterfaceDescriptor* call_descriptors_; |
| 1233 RandomNumberGenerator* random_number_generator_; | 1239 RandomNumberGenerator* random_number_generator_; |
| 1234 | 1240 |
| 1241 // Whether the isolate has been created for snapshotting. | |
| 1242 bool serializer_enabled_; | |
| 1243 | |
| 1235 // True if fatal error has been signaled for this isolate. | 1244 // True if fatal error has been signaled for this isolate. |
| 1236 bool has_fatal_error_; | 1245 bool has_fatal_error_; |
| 1237 | 1246 |
| 1238 // True if we are using the Crankshaft optimizing compiler. | 1247 // True if we are using the Crankshaft optimizing compiler. |
| 1239 bool use_crankshaft_; | 1248 bool use_crankshaft_; |
| 1240 | 1249 |
| 1241 // True if this isolate was initialized from a snapshot. | 1250 // True if this isolate was initialized from a snapshot. |
| 1242 bool initialized_from_snapshot_; | 1251 bool initialized_from_snapshot_; |
| 1243 | 1252 |
| 1244 // Time stamp at initialization. | 1253 // Time stamp at initialization. |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1483 } | 1492 } |
| 1484 | 1493 |
| 1485 EmbeddedVector<char, 128> filename_; | 1494 EmbeddedVector<char, 128> filename_; |
| 1486 FILE* file_; | 1495 FILE* file_; |
| 1487 int scope_depth_; | 1496 int scope_depth_; |
| 1488 }; | 1497 }; |
| 1489 | 1498 |
| 1490 } } // namespace v8::internal | 1499 } } // namespace v8::internal |
| 1491 | 1500 |
| 1492 #endif // V8_ISOLATE_H_ | 1501 #endif // V8_ISOLATE_H_ |
| OLD | NEW |