Thread the Lithium instruction down to DeoptimizeIf and friends.

This is a purely mechanical refactoring and a first step towards being
able to report more helpful deoptimization reasons. With this
refactoring, we know at least the mnemonic of the instruction causing
the deopt, although this is not used yet. Future steps will be using
the mnemonic, passing additional explicit deopt reasons and removing
the fragile machinery of searching for code comments.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/559143003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1debacf6
This diff is collapsed.
......@@ -234,10 +234,9 @@ class LCodeGen: public LCodeGenBase {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
void DeoptimizeIf(Condition condition, LInstruction* instr,
Deoptimizer::BailoutType bailout_type);
void DeoptimizeIf(Condition condition, LEnvironment* environment);
void DeoptimizeIf(Condition condition, LInstruction* instr);
void AddToTranslation(LEnvironment* environment,
Translation* translation,
......@@ -281,12 +280,8 @@ class LCodeGen: public LCodeGenBase {
void EmitBranch(InstrType instr, Condition condition);
template<class InstrType>
void EmitFalseBranch(InstrType instr, Condition condition);
void EmitNumberUntagD(Register input,
DwVfpRegister result,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode);
void EmitNumberUntagD(LNumberUntagD* instr, Register input,
DwVfpRegister result, NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
This diff is collapsed.
......@@ -213,27 +213,24 @@ class LCodeGen: public LCodeGenBase {
Register temp,
LOperand* index,
String::Encoding encoding);
void DeoptimizeBranch(
LEnvironment* environment,
BranchType branch_type, Register reg = NoReg, int bit = -1,
Deoptimizer::BailoutType* override_bailout_type = NULL);
void Deoptimize(LEnvironment* environment,
void DeoptimizeBranch(LInstruction* instr, BranchType branch_type,
Register reg = NoReg, int bit = -1,
Deoptimizer::BailoutType* override_bailout_type = NULL);
void Deoptimize(LInstruction* instr,
Deoptimizer::BailoutType* override_bailout_type = NULL);
void DeoptimizeIf(Condition cond, LEnvironment* environment);
void DeoptimizeIfZero(Register rt, LEnvironment* environment);
void DeoptimizeIfNotZero(Register rt, LEnvironment* environment);
void DeoptimizeIfNegative(Register rt, LEnvironment* environment);
void DeoptimizeIfSmi(Register rt, LEnvironment* environment);
void DeoptimizeIfNotSmi(Register rt, LEnvironment* environment);
void DeoptimizeIfRoot(Register rt,
Heap::RootListIndex index,
LEnvironment* environment);
void DeoptimizeIfNotRoot(Register rt,
Heap::RootListIndex index,
LEnvironment* environment);
void DeoptimizeIfMinusZero(DoubleRegister input, LEnvironment* environment);
void DeoptimizeIfBitSet(Register rt, int bit, LEnvironment* environment);
void DeoptimizeIfBitClear(Register rt, int bit, LEnvironment* environment);
void DeoptimizeIf(Condition cond, LInstruction* instr);
void DeoptimizeIfZero(Register rt, LInstruction* instr);
void DeoptimizeIfNotZero(Register rt, LInstruction* instr);
void DeoptimizeIfNegative(Register rt, LInstruction* instr);
void DeoptimizeIfSmi(Register rt, LInstruction* instr);
void DeoptimizeIfNotSmi(Register rt, LInstruction* instr);
void DeoptimizeIfRoot(Register rt, Heap::RootListIndex index,
LInstruction* instr);
void DeoptimizeIfNotRoot(Register rt, Heap::RootListIndex index,
LInstruction* instr);
void DeoptimizeIfMinusZero(DoubleRegister input, LInstruction* instr);
void DeoptimizeIfBitSet(Register rt, int bit, LInstruction* instr);
void DeoptimizeIfBitClear(Register rt, int bit, LInstruction* instr);
MemOperand PrepareKeyedExternalArrayOperand(Register key,
Register base,
......
This diff is collapsed.
......@@ -209,10 +209,9 @@ class LCodeGen: public LCodeGenBase {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition cc,
LEnvironment* environment,
void DeoptimizeIf(Condition cc, LInstruction* instr,
Deoptimizer::BailoutType bailout_type);
void DeoptimizeIf(Condition cc, LEnvironment* environment);
void DeoptimizeIf(Condition cc, LInstruction* instr);
bool DeoptEveryNTimes() {
return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
......@@ -269,14 +268,8 @@ class LCodeGen: public LCodeGenBase {
void EmitBranch(InstrType instr, Condition cc);
template<class InstrType>
void EmitFalseBranch(InstrType instr, Condition cc);
void EmitNumberUntagD(
Register input,
Register temp,
XMMRegister result,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
void EmitNumberUntagD(LNumberUntagD* instr, Register input, Register temp,
XMMRegister result, NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
This diff is collapsed.
......@@ -228,13 +228,11 @@ class LCodeGen: public LCodeGenBase {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
void DeoptimizeIf(Condition condition, LInstruction* instr,
Deoptimizer::BailoutType bailout_type,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
void DeoptimizeIf(Condition condition, LInstruction* instr,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
......@@ -297,12 +295,8 @@ class LCodeGen: public LCodeGenBase {
FPURegister src1,
FPURegister src2);
void EmitCmpI(LOperand* left, LOperand* right);
void EmitNumberUntagD(Register input,
DoubleRegister result,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode);
void EmitNumberUntagD(LNumberUntagD* instr, Register input,
DoubleRegister result, NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
This diff is collapsed.
......@@ -229,13 +229,11 @@ class LCodeGen: public LCodeGenBase {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
void DeoptimizeIf(Condition condition, LInstruction* instr,
Deoptimizer::BailoutType bailout_type,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
void DeoptimizeIf(Condition condition, LInstruction* instr,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
......@@ -298,12 +296,8 @@ class LCodeGen: public LCodeGenBase {
FPURegister src1,
FPURegister src2);
void EmitCmpI(LOperand* left, LOperand* right);
void EmitNumberUntagD(Register input,
DoubleRegister result,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode);
void EmitNumberUntagD(LNumberUntagD* instr, Register input,
DoubleRegister result, NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
This diff is collapsed.
......@@ -206,10 +206,9 @@ class LCodeGen: public LCodeGenBase {
int argc);
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition cc,
LEnvironment* environment,
void DeoptimizeIf(Condition cc, LInstruction* instr,
Deoptimizer::BailoutType bailout_type);
void DeoptimizeIf(Condition cc, LEnvironment* environment);
void DeoptimizeIf(Condition cc, LInstruction* instr);
bool DeoptEveryNTimes() {
return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
......@@ -263,13 +262,8 @@ class LCodeGen: public LCodeGenBase {
void EmitBranch(InstrType instr, Condition cc);
template<class InstrType>
void EmitFalseBranch(InstrType instr, Condition cc);
void EmitNumberUntagD(
Register input,
XMMRegister result,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
void EmitNumberUntagD(LNumberUntagD* instr, Register input,
XMMRegister result, NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
This diff is collapsed.
......@@ -234,10 +234,9 @@ class LCodeGen: public LCodeGenBase {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition cc,
LEnvironment* environment,
void DeoptimizeIf(Condition cc, LInstruction* instr,
Deoptimizer::BailoutType bailout_type);
void DeoptimizeIf(Condition cc, LEnvironment* environment);
void DeoptimizeIf(Condition cc, LInstruction* instr);
bool DeoptEveryNTimes() {
return FLAG_deopt_every_n_times != 0 && !info()->IsStub();
......@@ -294,14 +293,9 @@ class LCodeGen: public LCodeGenBase {
void EmitBranch(InstrType instr, Condition cc);
template<class InstrType>
void EmitFalseBranch(InstrType instr, Condition cc);
void EmitNumberUntagDNoSSE2(
Register input,
Register temp,
X87Register res_reg,
bool allow_undefined_as_nan,
bool deoptimize_on_minus_zero,
LEnvironment* env,
NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
void EmitNumberUntagDNoSSE2(LNumberUntagD* instr, Register input,
Register temp, X87Register res_reg,
NumberUntagDMode mode);
// Emits optimized code for typeof x == "y". Modifies input register.
// Returns the condition on which a final split to
......
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