| 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 "src/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| 11 | 11 |
| 12 #include "src/ast.h" | 12 #include "src/ast.h" |
| 13 #include "src/base/platform/platform.h" | 13 #include "src/base/platform/platform.h" |
| 14 #include "src/base/sys-info.h" | 14 #include "src/base/sys-info.h" |
| 15 #include "src/base/utils/random-number-generator.h" | 15 #include "src/base/utils/random-number-generator.h" |
| 16 #include "src/basic-block-profiler.h" | 16 #include "src/basic-block-profiler.h" |
| 17 #include "src/bootstrapper.h" | 17 #include "src/bootstrapper.h" |
| 18 #include "src/codegen.h" | 18 #include "src/codegen.h" |
| 19 #include "src/compilation-cache.h" | 19 #include "src/compilation-cache.h" |
| 20 #include "src/compilation-statistics.h" | 20 #include "src/compilation-statistics.h" |
| 21 #include "src/cpu-profiler.h" | 21 #include "src/cpu-profiler.h" |
| 22 #include "src/debug/debug.h" | 22 #include "src/debug/debug.h" |
| 23 #include "src/deoptimizer.h" | 23 #include "src/deoptimizer.h" |
| 24 #include "src/frames-inl.h" | 24 #include "src/frames-inl.h" |
| 25 #include "src/heap-profiler.h" | 25 #include "src/heap-profiler.h" |
| 26 #include "src/hydrogen.h" | 26 #include "src/hydrogen.h" |
| 27 #include "src/ic/stub-cache.h" | 27 #include "src/ic/stub-cache.h" |
| 28 #include "src/interpreter/interpreter.h" | 28 #include "src/interpreter/interpreter.h" |
| 29 #include "src/isolate-inl.h" |
| 29 #include "src/lithium-allocator.h" | 30 #include "src/lithium-allocator.h" |
| 30 #include "src/log.h" | 31 #include "src/log.h" |
| 31 #include "src/messages.h" | 32 #include "src/messages.h" |
| 32 #include "src/prototype.h" | 33 #include "src/prototype.h" |
| 33 #include "src/regexp/regexp-stack.h" | 34 #include "src/regexp/regexp-stack.h" |
| 34 #include "src/runtime-profiler.h" | 35 #include "src/runtime-profiler.h" |
| 35 #include "src/sampler.h" | 36 #include "src/sampler.h" |
| 36 #include "src/scopeinfo.h" | 37 #include "src/scopeinfo.h" |
| 37 #include "src/simulator.h" | 38 #include "src/simulator.h" |
| 38 #include "src/snapshot/serialize.h" | 39 #include "src/snapshot/serialize.h" |
| (...skipping 2752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2791 : isolate_(isolate), prev_(isolate->save_context()) { | 2792 : isolate_(isolate), prev_(isolate->save_context()) { |
| 2792 if (isolate->context() != NULL) { | 2793 if (isolate->context() != NULL) { |
| 2793 context_ = Handle<Context>(isolate->context()); | 2794 context_ = Handle<Context>(isolate->context()); |
| 2794 } | 2795 } |
| 2795 isolate->set_save_context(this); | 2796 isolate->set_save_context(this); |
| 2796 | 2797 |
| 2797 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top()); | 2798 c_entry_fp_ = isolate->c_entry_fp(isolate->thread_local_top()); |
| 2798 } | 2799 } |
| 2799 | 2800 |
| 2800 | 2801 |
| 2802 SaveContext::~SaveContext() { |
| 2803 isolate_->set_context(context_.is_null() ? NULL : *context_); |
| 2804 isolate_->set_save_context(prev_); |
| 2805 } |
| 2806 |
| 2807 |
| 2808 #ifdef DEBUG |
| 2809 AssertNoContextChange::AssertNoContextChange(Isolate* isolate) |
| 2810 : isolate_(isolate), context_(isolate->context(), isolate) {} |
| 2811 #endif // DEBUG |
| 2812 |
| 2813 |
| 2801 bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { | 2814 bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { |
| 2802 // First check whether the previous scope intercepts. | 2815 // First check whether the previous scope intercepts. |
| 2803 if (prev_ && prev_->Intercept(flag)) return true; | 2816 if (prev_ && prev_->Intercept(flag)) return true; |
| 2804 // Then check whether this scope intercepts. | 2817 // Then check whether this scope intercepts. |
| 2805 if ((flag & intercept_mask_)) { | 2818 if ((flag & intercept_mask_)) { |
| 2806 intercepted_flags_ |= flag; | 2819 intercepted_flags_ |= flag; |
| 2807 return true; | 2820 return true; |
| 2808 } | 2821 } |
| 2809 return false; | 2822 return false; |
| 2810 } | 2823 } |
| 2811 | 2824 |
| 2812 } // namespace internal | 2825 } // namespace internal |
| 2813 } // namespace v8 | 2826 } // namespace v8 |
| OLD | NEW |