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

Unified Diff: src/ic/ic.cc

Issue 1130283002: [strong] Disallow implicit conversions for comparison (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback Created 5 years, 7 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
« no previous file with comments | « src/ic/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index daf7704c71d5ffa5d197ce4fb06bbb95255e8b4d..a02329a6dbab90ffd1bea54956d012fe3b239e01 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -601,7 +601,8 @@ 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_OBJECT) return;
- SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
+ SetTargetAtAddress(address,
+ GetRawUninitialized(isolate, stub.op(), stub.strong()),
constant_pool);
PatchInlinedSmiCode(address, DISABLE_INLINED_SMI_CHECK);
}
@@ -2680,8 +2681,9 @@ RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite) {
}
-Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
- CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
+Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op,
+ bool strong) {
+ CompareICStub stub(isolate, op, strong, CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED);
Code* code = NULL;
@@ -2690,8 +2692,9 @@ Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
}
-Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op) {
- CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
+Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op,
+ bool strong) {
+ CompareICStub stub(isolate, op, strong, CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED,
CompareICState::UNINITIALIZED);
return stub.GetCode();
@@ -2708,7 +2711,8 @@ 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_, new_left, new_right, state);
+ CompareICStub stub(isolate(), op_, old_stub.strong(), new_left, new_right,
+ state);
if (state == CompareICState::KNOWN_OBJECT) {
stub.set_known_map(
Handle<Map>(Handle<JSObject>::cast(x)->map(), isolate()));
« no previous file with comments | « src/ic/ic.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698