| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/execution.h" | 5 #include "src/execution.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 300 } |
| 301 | 301 |
| 302 // If the Object doesn't have an instance-call handler we should | 302 // If the Object doesn't have an instance-call handler we should |
| 303 // throw a non-callable exception. | 303 // throw a non-callable exception. |
| 304 i::Handle<i::Object> error_obj = isolate->factory()->NewTypeError( | 304 i::Handle<i::Object> error_obj = isolate->factory()->NewTypeError( |
| 305 "called_non_callable", i::HandleVector<i::Object>(&object, 1)); | 305 "called_non_callable", i::HandleVector<i::Object>(&object, 1)); |
| 306 return isolate->Throw<Object>(error_obj); | 306 return isolate->Throw<Object>(error_obj); |
| 307 } | 307 } |
| 308 | 308 |
| 309 | 309 |
| 310 bool StackGuard::IsStackOverflow() { | |
| 311 ExecutionAccess access(isolate_); | |
| 312 return (thread_local_.jslimit_ != kInterruptLimit && | |
| 313 thread_local_.climit_ != kInterruptLimit); | |
| 314 } | |
| 315 | |
| 316 | |
| 317 void StackGuard::EnableInterrupts() { | 310 void StackGuard::EnableInterrupts() { |
| 318 ExecutionAccess access(isolate_); | 311 ExecutionAccess access(isolate_); |
| 319 if (has_pending_interrupts(access)) { | 312 if (has_pending_interrupts(access)) { |
| 320 set_interrupt_limits(access); | 313 set_interrupt_limits(access); |
| 321 } | 314 } |
| 322 } | 315 } |
| 323 | 316 |
| 324 | 317 |
| 325 void StackGuard::SetStackLimit(uintptr_t limit) { | 318 void StackGuard::SetStackLimit(uintptr_t limit) { |
| 326 ExecutionAccess access(isolate_); | 319 ExecutionAccess access(isolate_); |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 } | 682 } |
| 690 | 683 |
| 691 isolate_->counters()->stack_interrupts()->Increment(); | 684 isolate_->counters()->stack_interrupts()->Increment(); |
| 692 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 685 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
| 693 isolate_->runtime_profiler()->OptimizeNow(); | 686 isolate_->runtime_profiler()->OptimizeNow(); |
| 694 | 687 |
| 695 return isolate_->heap()->undefined_value(); | 688 return isolate_->heap()->undefined_value(); |
| 696 } | 689 } |
| 697 | 690 |
| 698 } } // namespace v8::internal | 691 } } // namespace v8::internal |
| OLD | NEW |