| 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/ic/ic-state.h" | 5 #include "src/ic/ic-state.h" |
| 6 | 6 |
| 7 #include "src/ic/ic.h" | 7 #include "src/ic/ic.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 void ICUtility::Clear(Isolate* isolate, Address address, | 13 void ICUtility::Clear(Isolate* isolate, Address address, |
| 14 Address constant_pool) { | 14 Address constant_pool) { |
| 15 IC::Clear(isolate, address, constant_pool); | 15 IC::Clear(isolate, address, constant_pool); |
| 16 } | 16 } |
| 17 | 17 |
| 18 | 18 |
| 19 CallICState::CallICState(ExtraICState extra_ic_state) | |
| 20 : argc_(ArgcBits::decode(extra_ic_state)), | |
| 21 call_type_(CallTypeBits::decode(extra_ic_state)) {} | |
| 22 | |
| 23 | |
| 24 ExtraICState CallICState::GetExtraICState() const { | 19 ExtraICState CallICState::GetExtraICState() const { |
| 25 ExtraICState extra_ic_state = | 20 ExtraICState extra_ic_state = ArgcBits::encode(argc_); |
| 26 ArgcBits::encode(argc_) | CallTypeBits::encode(call_type_); | |
| 27 return extra_ic_state; | 21 return extra_ic_state; |
| 28 } | 22 } |
| 29 | 23 |
| 30 | 24 |
| 31 std::ostream& operator<<(std::ostream& os, const CallICState& s) { | 25 std::ostream& operator<<(std::ostream& os, const CallICState& s) { |
| 32 return os << "(args(" << s.arg_count() << "), " | 26 return os << "(args(" << s.arg_count() << "), " |
| 33 << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION") | |
| 34 << ", "; | 27 << ", "; |
| 35 } | 28 } |
| 36 | 29 |
| 37 | 30 |
| 38 // static | 31 // static |
| 39 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::FIRST_TOKEN; | 32 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::FIRST_TOKEN; |
| 40 | 33 |
| 41 | 34 |
| 42 // static | 35 // static |
| 43 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::LAST_TOKEN; | 36 STATIC_CONST_MEMBER_DEFINITION const int BinaryOpICState::LAST_TOKEN; |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 case OBJECT: | 508 case OBJECT: |
| 516 case GENERIC: | 509 case GENERIC: |
| 517 return GENERIC; | 510 return GENERIC; |
| 518 } | 511 } |
| 519 UNREACHABLE(); | 512 UNREACHABLE(); |
| 520 return GENERIC; // Make the compiler happy. | 513 return GENERIC; // Make the compiler happy. |
| 521 } | 514 } |
| 522 | 515 |
| 523 } // namespace internal | 516 } // namespace internal |
| 524 } // namespace v8 | 517 } // namespace v8 |
| OLD | NEW |