Chromium Code Reviews| Index: src/ic/ic-state.h |
| diff --git a/src/ic/ic-state.h b/src/ic/ic-state.h |
| index d3fdbe0dfbee75dd9d55286fdc297897bb424c3c..76c0155206b813531f6ea2a625b3ec36b01c5739 100644 |
| --- a/src/ic/ic-state.h |
| +++ b/src/ic/ic-state.h |
| @@ -57,9 +57,9 @@ std::ostream& operator<<(std::ostream& os, const CallICState& s); |
| class BinaryOpICState final BASE_EMBEDDED { |
| public: |
| BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state); |
| - |
| - BinaryOpICState(Isolate* isolate, Token::Value op) |
| + BinaryOpICState(Isolate* isolate, Token::Value op, LanguageMode language_mode) |
| : op_(op), |
| + strong_(is_strong(language_mode)), |
| left_kind_(NONE), |
| right_kind_(NONE), |
| result_kind_(NONE), |
| @@ -106,6 +106,10 @@ class BinaryOpICState final BASE_EMBEDDED { |
| return Max(left_kind_, right_kind_) == GENERIC; |
| } |
| + LanguageMode language_mode() const { |
| + return strong_ ? LanguageMode::STRONG : LanguageMode::SLOPPY; |
| + } |
| + |
| // Returns true if the IC should enable the inline smi code (i.e. if either |
| // parameter may be a smi). |
| bool UseInlinedSmiCode() const { |
| @@ -144,13 +148,15 @@ class BinaryOpICState final BASE_EMBEDDED { |
| class OpField : public BitField<int, 0, 4> {}; |
| class ResultKindField : public BitField<Kind, 4, 3> {}; |
| class LeftKindField : public BitField<Kind, 7, 3> {}; |
| + class StrongField : public BitField<bool, 10, 1> {}; |
|
arv (Not doing code reviews)
2015/04/24 14:14:23
We should update these to use kNext when we make c
|
| // When fixed right arg is set, we don't need to store the right kind. |
| // Thus the two fields can overlap. |
| - class HasFixedRightArgField : public BitField<bool, 10, 1> {}; |
| - class FixedRightArgValueField : public BitField<int, 11, 4> {}; |
| - class RightKindField : public BitField<Kind, 11, 3> {}; |
| + class HasFixedRightArgField : public BitField<bool, 11, 1> {}; |
| + class FixedRightArgValueField : public BitField<int, 12, 4> {}; |
| + class RightKindField : public BitField<Kind, 12, 3> {}; |
| Token::Value op_; |
| + bool strong_; |
| Kind left_kind_; |
| Kind right_kind_; |
| Kind result_kind_; |