Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 3c22580c2c7e2b36d851444304435e6f433d4a17..a55160a394e7f362842e70fb95cd30e65646a7fd 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -390,6 +390,7 @@ void IC::Clear(Address address) { |
case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target); |
case Code::COMPARE_IC: return CompareIC::Clear(address, target); |
case Code::COMPARE_NIL_IC: return CompareNilIC::Clear(address, target); |
+ case Code::UNARY_OP_IC: |
case Code::BINARY_OP_IC: |
case Code::TO_BOOLEAN_IC: |
// Clearing these is tricky and does not |
@@ -2588,6 +2589,27 @@ void BinaryOpIC::StubInfoToType(int minor_key, |
} |
+MaybeObject* UnaryOpIC::Transition(Handle<Object> object) { |
+ Code::ExtraICState extra_ic_state = target()->extended_extra_ic_state(); |
+ UnaryOpStub stub(extra_ic_state); |
+ |
+ stub.UpdateStatus(object); |
+ |
+ Handle<Code> code = stub.GetCode(isolate()); |
+ set_target(*code); |
+ |
+ return stub.Result(object, isolate()); |
+} |
+ |
+ |
+RUNTIME_FUNCTION(MaybeObject*, UnaryOpIC_Miss) { |
+ HandleScope scope(isolate); |
+ Handle<Object> object = args.at<Object>(0); |
+ UnaryOpIC ic(isolate); |
+ return ic.Transition(object); |
+} |
+ |
+ |
static BinaryOpIC::TypeInfo TypeInfoFromValue(Handle<Object> value, |
Token::Value op) { |
v8::internal::TypeInfo type = v8::internal::TypeInfo::FromValue(value); |