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 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 global_handles_(NULL), | 1785 global_handles_(NULL), |
1786 eternal_handles_(NULL), | 1786 eternal_handles_(NULL), |
1787 context_switcher_(NULL), | 1787 context_switcher_(NULL), |
1788 thread_manager_(NULL), | 1788 thread_manager_(NULL), |
1789 fp_stubs_generated_(false), | 1789 fp_stubs_generated_(false), |
1790 has_installed_extensions_(false), | 1790 has_installed_extensions_(false), |
1791 string_tracker_(NULL), | 1791 string_tracker_(NULL), |
1792 regexp_stack_(NULL), | 1792 regexp_stack_(NULL), |
1793 date_cache_(NULL), | 1793 date_cache_(NULL), |
1794 code_stub_interface_descriptors_(NULL), | 1794 code_stub_interface_descriptors_(NULL), |
| 1795 use_crankshaft_(true), |
1795 initialized_from_snapshot_(false), | 1796 initialized_from_snapshot_(false), |
1796 cpu_profiler_(NULL), | 1797 cpu_profiler_(NULL), |
1797 heap_profiler_(NULL), | 1798 heap_profiler_(NULL), |
1798 function_entry_hook_(NULL), | 1799 function_entry_hook_(NULL), |
1799 deferred_handles_head_(NULL), | 1800 deferred_handles_head_(NULL), |
1800 optimizing_compiler_thread_(this), | 1801 optimizing_compiler_thread_(this), |
1801 marking_thread_(NULL), | 1802 marking_thread_(NULL), |
1802 sweeper_thread_(NULL), | 1803 sweeper_thread_(NULL), |
1803 stress_deopt_count_(0) { | 1804 stress_deopt_count_(0) { |
1804 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); | 1805 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 } | 2141 } |
2141 | 2142 |
2142 | 2143 |
2143 bool Isolate::Init(Deserializer* des) { | 2144 bool Isolate::Init(Deserializer* des) { |
2144 ASSERT(state_ != INITIALIZED); | 2145 ASSERT(state_ != INITIALIZED); |
2145 ASSERT(Isolate::Current() == this); | 2146 ASSERT(Isolate::Current() == this); |
2146 TRACE_ISOLATE(init); | 2147 TRACE_ISOLATE(init); |
2147 | 2148 |
2148 stress_deopt_count_ = FLAG_deopt_every_n_times; | 2149 stress_deopt_count_ = FLAG_deopt_every_n_times; |
2149 | 2150 |
| 2151 use_crankshaft_ = FLAG_crankshaft |
| 2152 && !Serializer::enabled() |
| 2153 && CPU::SupportsCrankshaft(); |
| 2154 |
2150 if (function_entry_hook() != NULL) { | 2155 if (function_entry_hook() != NULL) { |
2151 // When function entry hooking is in effect, we have to create the code | 2156 // When function entry hooking is in effect, we have to create the code |
2152 // stubs from scratch to get entry hooks, rather than loading the previously | 2157 // stubs from scratch to get entry hooks, rather than loading the previously |
2153 // generated stubs from disk. | 2158 // generated stubs from disk. |
2154 // If this assert fires, the initialization path has regressed. | 2159 // If this assert fires, the initialization path has regressed. |
2155 ASSERT(des == NULL); | 2160 ASSERT(des == NULL); |
2156 } | 2161 } |
2157 | 2162 |
2158 // The initialization process does not handle memory exhaustion. | 2163 // The initialization process does not handle memory exhaustion. |
2159 DisallowAllocationFailure disallow_allocation_failure; | 2164 DisallowAllocationFailure disallow_allocation_failure; |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2527 | 2532 |
2528 #ifdef DEBUG | 2533 #ifdef DEBUG |
2529 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2534 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2530 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2535 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2531 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2536 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2532 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2537 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2533 #undef ISOLATE_FIELD_OFFSET | 2538 #undef ISOLATE_FIELD_OFFSET |
2534 #endif | 2539 #endif |
2535 | 2540 |
2536 } } // namespace v8::internal | 2541 } } // namespace v8::internal |
OLD | NEW |