Commit 40d6a6cf authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: Refactor bailout reasons

Port fba4cdf1

Original Commit Message:

    This patch breaks out bailout reasons into two enum classes.

    This helps save 3 bits on the SharedFunctionInfo as we don't have to
    track the abort reasons.

R=gsathya@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ib2b2ce10b2f1ef6380193964aa9d868168fe129a
Reviewed-on: https://chromium-review.googlesource.com/855016Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#50419}
parent 92183d8a
......@@ -1649,12 +1649,12 @@ void MacroAssembler::DecrementCounter(StatsCounter* counter, int value,
}
}
void TurboAssembler::Assert(Condition cond, BailoutReason reason,
void TurboAssembler::Assert(Condition cond, AbortReason reason,
CRegister cr) {
if (emit_debug_code()) Check(cond, reason, cr);
}
void TurboAssembler::Check(Condition cond, BailoutReason reason, CRegister cr) {
void TurboAssembler::Check(Condition cond, AbortReason reason, CRegister cr) {
Label L;
b(cond, &L, cr);
Abort(reason);
......@@ -1662,7 +1662,7 @@ void TurboAssembler::Check(Condition cond, BailoutReason reason, CRegister cr) {
bind(&L);
}
void TurboAssembler::Abort(BailoutReason reason) {
void TurboAssembler::Abort(AbortReason reason) {
Label abort_start;
bind(&abort_start);
#ifdef DEBUG
......
......@@ -404,13 +404,13 @@ class TurboAssembler : public Assembler {
// Calls Abort(msg) if the condition cond is not satisfied.
// Use --debug_code to enable.
void Assert(Condition cond, BailoutReason reason, CRegister cr = cr7);
void Assert(Condition cond, AbortReason reason, CRegister cr = cr7);
// Like Assert(), but always enabled.
void Check(Condition cond, BailoutReason reason, CRegister cr = cr7);
void Check(Condition cond, AbortReason reason, CRegister cr = cr7);
// Print a message to stdout and abort execution.
void Abort(BailoutReason reason);
void Abort(AbortReason reason);
inline bool AllowThisStubCall(CodeStub* stub);
#if !V8_TARGET_ARCH_PPC64
......
......@@ -873,13 +873,13 @@ class TurboAssembler : public Assembler {
// Calls Abort(msg) if the condition cond is not satisfied.
// Use --debug_code to enable.
void Assert(Condition cond, BailoutReason reason, CRegister cr = cr7);
void Assert(Condition cond, AbortReason reason, CRegister cr = cr7);
// Like Assert(), but always enabled.
void Check(Condition cond, BailoutReason reason, CRegister cr = cr7);
void Check(Condition cond, AbortReason reason, CRegister cr = cr7);
// Print a message to stdout and abort execution.
void Abort(BailoutReason reason);
void Abort(AbortReason reason);
void set_has_frame(bool value) { has_frame_ = value; }
bool has_frame() { return has_frame_; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment