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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 2156923002: [builtins] Introduce a builtin for Abort(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved comment one line down. Created 4 years, 5 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
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index f797237af523ab64e50017ee9393e40166a84365..681638d8e88005065c9c887e96dd4fb9af70da65 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -637,18 +637,17 @@ void MacroAssembler::Abort(BailoutReason reason) {
return;
}
#endif
-
- Move(kScratchRegister, Smi::FromInt(static_cast<int>(reason)),
- Assembler::RelocInfoNone());
- Push(kScratchRegister);
+ // Check if Abort() has already been initialized.
Michael Starzinger 2016/07/18 08:51:11 nit: Empty newline before this block for readabili
ahaas 2016/07/18 09:04:17 Done
+ DCHECK(isolate()->builtins()->Abort()->IsHeapObject());
+ Move(rdx, Smi::FromInt(static_cast<int>(reason)));
if (!has_frame_) {
// We don't actually want to generate a pile of code for this, so just
// claim there is a stack frame, without generating one.
FrameScope scope(this, StackFrame::NONE);
- CallRuntime(Runtime::kAbort);
+ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
} else {
- CallRuntime(Runtime::kAbort);
+ Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET);
}
// Control will not return here.
int3();
« src/mips64/macro-assembler-mips64.cc ('K') | « src/mips64/macro-assembler-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698