Commit 8a144cd4 authored by cdai2's avatar cdai2

X87: Remove the obsolete OverwriteMode optimization.

port 634b0f20 (r26454).

original commit message:

BUG=
R=weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#26520}
parent f77e016e
...@@ -1951,18 +1951,14 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) { ...@@ -1951,18 +1951,14 @@ void FullCodeGenerator::VisitAssignment(Assignment* expr) {
__ push(eax); // Left operand goes on the stack. __ push(eax); // Left operand goes on the stack.
VisitForAccumulatorValue(expr->value()); VisitForAccumulatorValue(expr->value());
OverwriteMode mode = expr->value()->ResultOverwriteAllowed()
? OVERWRITE_RIGHT
: NO_OVERWRITE;
SetSourcePosition(expr->position() + 1); SetSourcePosition(expr->position() + 1);
if (ShouldInlineSmiCase(op)) { if (ShouldInlineSmiCase(op)) {
EmitInlineSmiBinaryOp(expr->binary_operation(), EmitInlineSmiBinaryOp(expr->binary_operation(),
op, op,
mode,
expr->target(), expr->target(),
expr->value()); expr->value());
} else { } else {
EmitBinaryOp(expr->binary_operation(), op, mode); EmitBinaryOp(expr->binary_operation(), op);
} }
// Deoptimization point in case the binary operation may have side effects. // Deoptimization point in case the binary operation may have side effects.
...@@ -2343,7 +2339,6 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) { ...@@ -2343,7 +2339,6 @@ void FullCodeGenerator::EmitKeyedSuperPropertyLoad(Property* prop) {
void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
Token::Value op, Token::Value op,
OverwriteMode mode,
Expression* left, Expression* left,
Expression* right) { Expression* right) {
// Do combined smi check of the operands. Left operand is on the // Do combined smi check of the operands. Left operand is on the
...@@ -2357,7 +2352,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr, ...@@ -2357,7 +2352,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ bind(&stub_call); __ bind(&stub_call);
__ mov(eax, ecx); __ mov(eax, ecx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code(); Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
CallIC(code, expr->BinaryOperationFeedbackId()); CallIC(code, expr->BinaryOperationFeedbackId());
patch_site.EmitPatchInfo(); patch_site.EmitPatchInfo();
__ jmp(&done, Label::kNear); __ jmp(&done, Label::kNear);
...@@ -2489,11 +2484,9 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) { ...@@ -2489,11 +2484,9 @@ void FullCodeGenerator::EmitClassDefineProperties(ClassLiteral* lit) {
} }
void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) {
Token::Value op,
OverwriteMode mode) {
__ pop(edx); __ pop(edx);
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op, mode).code(); Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code();
JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
CallIC(code, expr->BinaryOperationFeedbackId()); CallIC(code, expr->BinaryOperationFeedbackId());
patch_site.EmitPatchInfo(); patch_site.EmitPatchInfo();
...@@ -4764,8 +4757,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { ...@@ -4764,8 +4757,8 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
__ bind(&stub_call); __ bind(&stub_call);
__ mov(edx, eax); __ mov(edx, eax);
__ mov(eax, Immediate(Smi::FromInt(1))); __ mov(eax, Immediate(Smi::FromInt(1)));
Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), expr->binary_op(), Handle<Code> code =
NO_OVERWRITE).code(); CodeFactory::BinaryOpIC(isolate(), expr->binary_op()).code();
CallIC(code, expr->CountBinOpFeedbackId()); CallIC(code, expr->CountBinOpFeedbackId());
patch_site.EmitPatchInfo(); patch_site.EmitPatchInfo();
__ bind(&done); __ bind(&done);
......
...@@ -2317,8 +2317,7 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) { ...@@ -2317,8 +2317,7 @@ void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
DCHECK(ToRegister(instr->right()).is(eax)); DCHECK(ToRegister(instr->right()).is(eax));
DCHECK(ToRegister(instr->result()).is(eax)); DCHECK(ToRegister(instr->result()).is(eax));
Handle<Code> code = Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), instr->op()).code();
CodeFactory::BinaryOpIC(isolate(), instr->op(), NO_OVERWRITE).code();
CallCode(code, RelocInfo::CODE_TARGET, instr); CallCode(code, RelocInfo::CODE_TARGET, instr);
} }
......
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