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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "v8.h" | 7 #include "v8.h" |
8 | 8 |
9 #include "ast.h" | 9 #include "ast.h" |
10 #include "bootstrapper.h" | 10 #include "bootstrapper.h" |
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 thread_manager_(NULL), | 1450 thread_manager_(NULL), |
1451 has_installed_extensions_(false), | 1451 has_installed_extensions_(false), |
1452 string_tracker_(NULL), | 1452 string_tracker_(NULL), |
1453 regexp_stack_(NULL), | 1453 regexp_stack_(NULL), |
1454 date_cache_(NULL), | 1454 date_cache_(NULL), |
1455 code_stub_interface_descriptors_(NULL), | 1455 code_stub_interface_descriptors_(NULL), |
1456 call_descriptors_(NULL), | 1456 call_descriptors_(NULL), |
1457 // TODO(bmeurer) Initialized lazily because it depends on flags; can | 1457 // TODO(bmeurer) Initialized lazily because it depends on flags; can |
1458 // be fixed once the default isolate cleanup is done. | 1458 // be fixed once the default isolate cleanup is done. |
1459 random_number_generator_(NULL), | 1459 random_number_generator_(NULL), |
| 1460 serializer_enabled_(false), |
1460 has_fatal_error_(false), | 1461 has_fatal_error_(false), |
1461 use_crankshaft_(true), | 1462 use_crankshaft_(true), |
1462 initialized_from_snapshot_(false), | 1463 initialized_from_snapshot_(false), |
1463 cpu_profiler_(NULL), | 1464 cpu_profiler_(NULL), |
1464 heap_profiler_(NULL), | 1465 heap_profiler_(NULL), |
1465 function_entry_hook_(NULL), | 1466 function_entry_hook_(NULL), |
1466 deferred_handles_head_(NULL), | 1467 deferred_handles_head_(NULL), |
1467 optimizing_compiler_thread_(NULL), | 1468 optimizing_compiler_thread_(NULL), |
1468 sweeper_thread_(NULL), | 1469 sweeper_thread_(NULL), |
1469 num_sweeper_threads_(0), | 1470 num_sweeper_threads_(0), |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 | 1770 |
1770 | 1771 |
1771 bool Isolate::Init(Deserializer* des) { | 1772 bool Isolate::Init(Deserializer* des) { |
1772 ASSERT(state_ != INITIALIZED); | 1773 ASSERT(state_ != INITIALIZED); |
1773 TRACE_ISOLATE(init); | 1774 TRACE_ISOLATE(init); |
1774 | 1775 |
1775 stress_deopt_count_ = FLAG_deopt_every_n_times; | 1776 stress_deopt_count_ = FLAG_deopt_every_n_times; |
1776 | 1777 |
1777 has_fatal_error_ = false; | 1778 has_fatal_error_ = false; |
1778 | 1779 |
1779 use_crankshaft_ = FLAG_crankshaft | 1780 use_crankshaft_ = FLAG_crankshaft && CpuFeatures::SupportsCrankshaft(); |
1780 && !Serializer::enabled(this) | |
1781 && CpuFeatures::SupportsCrankshaft(); | |
1782 | 1781 |
1783 if (function_entry_hook() != NULL) { | 1782 if (function_entry_hook() != NULL) { |
1784 // When function entry hooking is in effect, we have to create the code | 1783 // When function entry hooking is in effect, we have to create the code |
1785 // stubs from scratch to get entry hooks, rather than loading the previously | 1784 // stubs from scratch to get entry hooks, rather than loading the previously |
1786 // generated stubs from disk. | 1785 // generated stubs from disk. |
1787 // If this assert fires, the initialization path has regressed. | 1786 // If this assert fires, the initialization path has regressed. |
1788 ASSERT(des == NULL); | 1787 ASSERT(des == NULL); |
1789 } | 1788 } |
1790 | 1789 |
1791 // The initialization process does not handle memory exhaustion. | 1790 // The initialization process does not handle memory exhaustion. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1958 // Now that the heap is consistent, it's OK to generate the code for the | 1957 // Now that the heap is consistent, it's OK to generate the code for the |
1959 // deopt entry table that might have been referred to by optimized code in | 1958 // deopt entry table that might have been referred to by optimized code in |
1960 // the snapshot. | 1959 // the snapshot. |
1961 HandleScope scope(this); | 1960 HandleScope scope(this); |
1962 Deoptimizer::EnsureCodeForDeoptimizationEntry( | 1961 Deoptimizer::EnsureCodeForDeoptimizationEntry( |
1963 this, | 1962 this, |
1964 Deoptimizer::LAZY, | 1963 Deoptimizer::LAZY, |
1965 kDeoptTableSerializeEntryCount - 1); | 1964 kDeoptTableSerializeEntryCount - 1); |
1966 } | 1965 } |
1967 | 1966 |
1968 if (!Serializer::enabled(this)) { | 1967 if (!serializer_enabled()) { |
1969 // Ensure that all stubs which need to be generated ahead of time, but | 1968 // Ensure that all stubs which need to be generated ahead of time, but |
1970 // cannot be serialized into the snapshot have been generated. | 1969 // cannot be serialized into the snapshot have been generated. |
1971 HandleScope scope(this); | 1970 HandleScope scope(this); |
1972 CodeStub::GenerateFPStubs(this); | 1971 CodeStub::GenerateFPStubs(this); |
1973 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); | 1972 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); |
1974 StubFailureTrampolineStub::GenerateAheadOfTime(this); | 1973 StubFailureTrampolineStub::GenerateAheadOfTime(this); |
1975 // Ensure interface descriptors are initialized even when stubs have been | 1974 // Ensure interface descriptors are initialized even when stubs have been |
1976 // deserialized out of the snapshot without using the graph builder. | 1975 // deserialized out of the snapshot without using the graph builder. |
1977 FastCloneShallowArrayStub::InstallDescriptors(this); | 1976 FastCloneShallowArrayStub::InstallDescriptors(this); |
1978 BinaryOpICStub::InstallDescriptors(this); | 1977 BinaryOpICStub::InstallDescriptors(this); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 Execution::Call(this, microtask, factory()->undefined_value(), | 2284 Execution::Call(this, microtask, factory()->undefined_value(), |
2286 0, NULL).Check(); | 2285 0, NULL).Check(); |
2287 } | 2286 } |
2288 } | 2287 } |
2289 | 2288 |
2290 handle_scope_implementer()->DecrementCallDepth(); | 2289 handle_scope_implementer()->DecrementCallDepth(); |
2291 } | 2290 } |
2292 | 2291 |
2293 | 2292 |
2294 } } // namespace v8::internal | 2293 } } // namespace v8::internal |
OLD | NEW |