| 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 "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 thread_manager_(NULL), | 1498 thread_manager_(NULL), |
| 1499 has_installed_extensions_(false), | 1499 has_installed_extensions_(false), |
| 1500 string_tracker_(NULL), | 1500 string_tracker_(NULL), |
| 1501 regexp_stack_(NULL), | 1501 regexp_stack_(NULL), |
| 1502 date_cache_(NULL), | 1502 date_cache_(NULL), |
| 1503 call_descriptor_data_(NULL), | 1503 call_descriptor_data_(NULL), |
| 1504 // TODO(bmeurer) Initialized lazily because it depends on flags; can | 1504 // TODO(bmeurer) Initialized lazily because it depends on flags; can |
| 1505 // be fixed once the default isolate cleanup is done. | 1505 // be fixed once the default isolate cleanup is done. |
| 1506 random_number_generator_(NULL), | 1506 random_number_generator_(NULL), |
| 1507 serializer_enabled_(false), | 1507 serializer_enabled_(false), |
| 1508 #ifdef _WIN64 |
| 1509 exception_filter_(NULL), |
| 1510 #endif |
| 1508 has_fatal_error_(false), | 1511 has_fatal_error_(false), |
| 1509 initialized_from_snapshot_(false), | 1512 initialized_from_snapshot_(false), |
| 1510 cpu_profiler_(NULL), | 1513 cpu_profiler_(NULL), |
| 1511 heap_profiler_(NULL), | 1514 heap_profiler_(NULL), |
| 1512 function_entry_hook_(NULL), | 1515 function_entry_hook_(NULL), |
| 1513 deferred_handles_head_(NULL), | 1516 deferred_handles_head_(NULL), |
| 1514 optimizing_compiler_thread_(NULL), | 1517 optimizing_compiler_thread_(NULL), |
| 1515 sweeper_thread_(NULL), | 1518 sweeper_thread_(NULL), |
| 1516 num_sweeper_threads_(0), | 1519 num_sweeper_threads_(0), |
| 1517 stress_deopt_count_(0), | 1520 stress_deopt_count_(0), |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1901 stack_guard_.InitThread(lock); | 1904 stack_guard_.InitThread(lock); |
| 1902 } | 1905 } |
| 1903 | 1906 |
| 1904 // SetUp the object heap. | 1907 // SetUp the object heap. |
| 1905 DCHECK(!heap_.HasBeenSetUp()); | 1908 DCHECK(!heap_.HasBeenSetUp()); |
| 1906 if (!heap_.SetUp()) { | 1909 if (!heap_.SetUp()) { |
| 1907 V8::FatalProcessOutOfMemory("heap setup"); | 1910 V8::FatalProcessOutOfMemory("heap setup"); |
| 1908 return false; | 1911 return false; |
| 1909 } | 1912 } |
| 1910 | 1913 |
| 1914 #ifdef _WIN64 |
| 1915 CHECK(serializer_enabled_ || exception_filter_); |
| 1916 if (exception_filter_) { |
| 1917 InstallExceptionFilter(this, exception_filter_); |
| 1918 } |
| 1919 #endif |
| 1920 |
| 1911 deoptimizer_data_ = new DeoptimizerData(memory_allocator_); | 1921 deoptimizer_data_ = new DeoptimizerData(memory_allocator_); |
| 1912 | 1922 |
| 1913 const bool create_heap_objects = (des == NULL); | 1923 const bool create_heap_objects = (des == NULL); |
| 1914 if (create_heap_objects && !heap_.CreateHeapObjects()) { | 1924 if (create_heap_objects && !heap_.CreateHeapObjects()) { |
| 1915 V8::FatalProcessOutOfMemory("heap object creation"); | 1925 V8::FatalProcessOutOfMemory("heap object creation"); |
| 1916 return false; | 1926 return false; |
| 1917 } | 1927 } |
| 1918 | 1928 |
| 1919 if (create_heap_objects) { | 1929 if (create_heap_objects) { |
| 1920 // Terminate the cache array with the sentinel so we can iterate. | 1930 // Terminate the cache array with the sentinel so we can iterate. |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2380 if (prev_ && prev_->Intercept(flag)) return true; | 2390 if (prev_ && prev_->Intercept(flag)) return true; |
| 2381 // Then check whether this scope intercepts. | 2391 // Then check whether this scope intercepts. |
| 2382 if ((flag & intercept_mask_)) { | 2392 if ((flag & intercept_mask_)) { |
| 2383 intercepted_flags_ |= flag; | 2393 intercepted_flags_ |= flag; |
| 2384 return true; | 2394 return true; |
| 2385 } | 2395 } |
| 2386 return false; | 2396 return false; |
| 2387 } | 2397 } |
| 2388 | 2398 |
| 2389 } } // namespace v8::internal | 2399 } } // namespace v8::internal |
| OLD | NEW |