| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // static | 39 // static |
| 40 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::FIRST_TOKEN; | 40 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::FIRST_TOKEN; |
| 41 | 41 |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::LAST_TOKEN; | 44 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::LAST_TOKEN; |
| 45 | 45 |
| 46 | 46 |
| 47 BinaryOpICState::BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state) | 47 BinaryOpICState::BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state) |
| 48 : isolate_(isolate) { | 48 : fixed_right_arg_(Nothing<int>()), isolate_(isolate) { |
| 49 op_ = | 49 op_ = |
| 50 static_cast<Token::Value>(FIRST_TOKEN + OpField::decode(extra_ic_state)); | 50 static_cast<Token::Value>(FIRST_TOKEN + OpField::decode(extra_ic_state)); |
| 51 fixed_right_arg_ = | 51 fixed_right_arg_ = |
| 52 Maybe<int>(HasFixedRightArgField::decode(extra_ic_state), | 52 Maybe<int>(HasFixedRightArgField::decode(extra_ic_state), |
| 53 1 << FixedRightArgValueField::decode(extra_ic_state)); | 53 1 << FixedRightArgValueField::decode(extra_ic_state)); |
| 54 left_kind_ = LeftKindField::decode(extra_ic_state); | 54 left_kind_ = LeftKindField::decode(extra_ic_state); |
| 55 if (fixed_right_arg_.has_value) { | 55 if (fixed_right_arg_.has_value) { |
| 56 right_kind_ = Smi::IsValid(fixed_right_arg_.value) ? SMI : INT32; | 56 right_kind_ = Smi::IsValid(fixed_right_arg_.value) ? SMI : INT32; |
| 57 } else { | 57 } else { |
| 58 right_kind_ = RightKindField::decode(extra_ic_state); | 58 right_kind_ = RightKindField::decode(extra_ic_state); |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 case UNIQUE_NAME: | 506 case UNIQUE_NAME: |
| 507 case OBJECT: | 507 case OBJECT: |
| 508 case GENERIC: | 508 case GENERIC: |
| 509 return GENERIC; | 509 return GENERIC; |
| 510 } | 510 } |
| 511 UNREACHABLE(); | 511 UNREACHABLE(); |
| 512 return GENERIC; // Make the compiler happy. | 512 return GENERIC; // Make the compiler happy. |
| 513 } | 513 } |
| 514 } | 514 } |
| 515 } // namespace v8::internal | 515 } // namespace v8::internal |
| OLD | NEW |