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/compiler-dispatcher/optimizing-compile-dispatcher.h" | 9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // You should hold the ExecutionAccess lock when you call this. | 429 // You should hold the ExecutionAccess lock when you call this. |
430 if (stored_limit != 0) { | 430 if (stored_limit != 0) { |
431 SetStackLimit(stored_limit); | 431 SetStackLimit(stored_limit); |
432 } | 432 } |
433 } | 433 } |
434 | 434 |
435 | 435 |
436 // --- C a l l s t o n a t i v e s --- | 436 // --- C a l l s t o n a t i v e s --- |
437 | 437 |
438 | 438 |
439 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, | |
440 Handle<JSFunction> fun, | |
441 Handle<Object> pos, | |
442 Handle<Object> is_global) { | |
443 Isolate* isolate = fun->GetIsolate(); | |
444 Handle<Object> strict_mode = isolate->factory()->ToBoolean(false); | |
445 | |
446 MaybeHandle<Object> maybe_callsite = | |
447 CallSiteUtils::Construct(isolate, recv, fun, pos, strict_mode); | |
448 if (maybe_callsite.is_null()) { | |
449 isolate->clear_pending_exception(); | |
450 return isolate->factory()->empty_string(); | |
451 } | |
452 | |
453 MaybeHandle<String> maybe_to_string = | |
454 CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked()); | |
455 if (maybe_to_string.is_null()) { | |
456 isolate->clear_pending_exception(); | |
457 return isolate->factory()->empty_string(); | |
458 } | |
459 | |
460 return maybe_to_string.ToHandleChecked(); | |
461 } | |
462 | |
463 | |
464 void StackGuard::HandleGCInterrupt() { | 439 void StackGuard::HandleGCInterrupt() { |
465 if (CheckAndClearInterrupt(GC_REQUEST)) { | 440 if (CheckAndClearInterrupt(GC_REQUEST)) { |
466 isolate_->heap()->HandleGCRequest(); | 441 isolate_->heap()->HandleGCRequest(); |
467 } | 442 } |
468 } | 443 } |
469 | 444 |
470 | 445 |
471 Object* StackGuard::HandleInterrupts() { | 446 Object* StackGuard::HandleInterrupts() { |
472 if (FLAG_verify_predictable) { | 447 if (FLAG_verify_predictable) { |
473 // Advance synthetic time by making a time request. | 448 // Advance synthetic time by making a time request. |
(...skipping 28 matching lines...) Expand all Loading... |
502 | 477 |
503 isolate_->counters()->stack_interrupts()->Increment(); | 478 isolate_->counters()->stack_interrupts()->Increment(); |
504 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 479 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
505 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); | 480 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); |
506 | 481 |
507 return isolate_->heap()->undefined_value(); | 482 return isolate_->heap()->undefined_value(); |
508 } | 483 } |
509 | 484 |
510 } // namespace internal | 485 } // namespace internal |
511 } // namespace v8 | 486 } // namespace v8 |
OLD | NEW |