Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 1010883002: Switch full-codegen from StackHandlers to handler table. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-isolate-dead-code
Patch Set: Fix debugger-pause-on-promise-rejection. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-generator.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index e5bc596699a90fd3ecd38c70fbc8c901b38e96d9..de106cc084ff6b8f701ffc1aa988d8cc692da7f3 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2472,9 +2472,8 @@ void CEntryStub::Generate(MacroAssembler* masm) {
__ movp(rsp, masm->ExternalOperand(pending_handler_sp_address));
__ movp(rbp, masm->ExternalOperand(pending_handler_fp_address));
- // If the handler is a JS frame, restore the context to the frame.
- // (kind == ENTRY) == (rbp == 0) == (rsi == 0), so we could test either
- // rbp or rsi.
+ // If the handler is a JS frame, restore the context to the frame. Note that
+ // the context will be set to (rsi == 0) for non-JS frames.
Label skip;
__ testp(rsi, rsi);
__ j(zero, &skip, Label::kNear);
@@ -2574,10 +2573,9 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
__ LoadRoot(rax, Heap::kExceptionRootIndex);
__ jmp(&exit);
- // Invoke: Link this frame into the handler chain. There's only one
- // handler block in this code object, so its index is 0.
+ // Invoke: Link this frame into the handler chain.
__ bind(&invoke);
- __ PushTryHandler(StackHandler::JS_ENTRY, 0);
+ __ PushStackHandler();
// Clear any pending exceptions.
__ LoadRoot(rax, Heap::kTheHoleValueRootIndex);
@@ -2603,7 +2601,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
__ call(kScratchRegister);
// Unlink this frame from the handler chain.
- __ PopTryHandler();
+ __ PopStackHandler();
__ bind(&exit);
// Check if the current stack frame is marked as the outermost JS frame.
« no previous file with comments | « src/runtime/runtime-generator.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698