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

Unified Diff: src/ic/ic.cc

Issue 1693833002: Remove strong mode support from binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 10 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/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 921910690cd848b296d90b628a1c4d64f70d78dc..98df6d2cda3f920c6260234ff7d8a689072d1d45 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -546,8 +546,7 @@ void CompareIC::Clear(Isolate* isolate, Address address, Code* target,
CompareICStub stub(target->stub_key(), isolate);
// Only clear CompareICs that can retain objects.
if (stub.state() != CompareICState::KNOWN_RECEIVER) return;
- SetTargetAtAddress(address,
- GetRawUninitialized(isolate, stub.op(), stub.strength()),
+ SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
constant_pool);
PatchInlinedSmiCode(isolate, address, DISABLE_INLINED_SMI_CHECK);
}
@@ -2503,60 +2502,52 @@ MaybeHandle<Object> BinaryOpIC::Transition(
default:
UNREACHABLE();
case Token::ADD:
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::Add(isolate(), left, right, state.strength()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Object::Add(isolate(), left, right), Object);
break;
case Token::SUB:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::Subtract(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::Subtract(isolate(), left, right), Object);
break;
case Token::MUL:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::Multiply(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::Multiply(isolate(), left, right), Object);
break;
case Token::DIV:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::Divide(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::Divide(isolate(), left, right), Object);
break;
case Token::MOD:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::Modulus(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::Modulus(isolate(), left, right), Object);
break;
case Token::BIT_OR:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::BitwiseOr(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::BitwiseOr(isolate(), left, right), Object);
break;
case Token::BIT_AND:
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::BitwiseAnd(isolate(), left, right, state.strength()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Object::BitwiseAnd(isolate(), left, right),
+ Object);
break;
case Token::BIT_XOR:
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::BitwiseXor(isolate(), left, right, state.strength()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Object::BitwiseXor(isolate(), left, right),
+ Object);
break;
case Token::SAR:
- ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::ShiftRight(isolate(), left, right, state.strength()), Object);
+ ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
+ Object::ShiftRight(isolate(), left, right),
+ Object);
break;
case Token::SHR:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::ShiftRightLogical(isolate(), left, right, state.strength()),
+ isolate(), result, Object::ShiftRightLogical(isolate(), left, right),
Object);
break;
case Token::SHL:
ASSIGN_RETURN_ON_EXCEPTION(
- isolate(), result,
- Object::ShiftLeft(isolate(), left, right, state.strength()), Object);
+ isolate(), result, Object::ShiftLeft(isolate(), left, right), Object);
break;
}
@@ -2652,10 +2643,8 @@ RUNTIME_FUNCTION(Runtime_BinaryOpIC_MissWithAllocationSite) {
return *result;
}
-
-Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op,
- Strength strength) {
- CompareICStub stub(isolate, op, strength, CompareICState::UNINITIALIZED,
+Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
+ CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED);
Code* code = NULL;
@@ -2663,10 +2652,8 @@ Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op,
return code;
}
-
-Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op,
- Strength strength) {
- CompareICStub stub(isolate, op, strength, CompareICState::UNINITIALIZED,
+Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op) {
+ CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED);
return stub.GetCode();
@@ -2683,8 +2670,7 @@ Code* CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) {
CompareICState::State state = CompareICState::TargetState(
old_stub.state(), old_stub.left(), old_stub.right(), op_,
HasInlinedSmiCode(address()), x, y);
- CompareICStub stub(isolate(), op_, old_stub.strength(), new_left, new_right,
- state);
+ CompareICStub stub(isolate(), op_, new_left, new_right, state);
if (state == CompareICState::KNOWN_RECEIVER) {
stub.set_known_map(
Handle<Map>(Handle<JSReceiver>::cast(x)->map(), isolate()));
« src/crankshaft/hydrogen-instructions.h ('K') | « src/ic/ic.h ('k') | src/ic/ic-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698