Index: src/ic.h |
diff --git a/src/ic.h b/src/ic.h |
index d1d2b6139d06c09e526a130bf8e2d7dc8e3467a0..308ab9530898caf8e00ea7f74216d5113c9e1703 100644 |
--- a/src/ic.h |
+++ b/src/ic.h |
@@ -861,10 +861,27 @@ class BinaryOpIC: public IC { |
right_kind_ > SMI && right_kind_ <= NUMBER)); |
} |
+ // Returns true if the IC _could_ create allocation mementos. |
+ bool CouldCreateAllocationMementos() const { |
+ if (left_kind_ == STRING || right_kind_ == STRING) { |
+ ASSERT_EQ(Token::ADD, op_); |
+ return true; |
+ } |
+ return false; |
+ } |
+ |
+ // Returns true if the IC _should_ create allocation mementos. |
+ bool ShouldCreateAllocationMementos() const { |
+ return FLAG_allocation_site_pretenuring && |
+ CouldCreateAllocationMementos(); |
+ } |
+ |
bool HasSideEffects() const { |
return Max(left_kind_, right_kind_) == GENERIC; |
} |
+ // Returns true if the IC should enable the inline smi code (i.e. if either |
+ // parameter may be a smi). |
bool UseInlinedSmiCode() const { |
return KindMaybeSmi(left_kind_) || KindMaybeSmi(right_kind_); |
} |
@@ -926,8 +943,9 @@ class BinaryOpIC: public IC { |
static Builtins::JavaScript TokenToJSBuiltin(Token::Value op); |
- MUST_USE_RESULT MaybeObject* Transition(Handle<Object> left, |
- Handle<Object> right); |
+ MaybeObject* Transition(Handle<AllocationSite> allocation_site, |
+ Handle<Object> left, |
+ Handle<Object> right) V8_WARN_UNUSED_RESULT; |
}; |
@@ -1036,6 +1054,7 @@ DECLARE_RUNTIME_FUNCTION(MaybeObject*, StoreIC_MissFromStubFailure); |
DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); |
DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
+DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); |
DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |