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 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 // static | 13 // static |
14 void ICUtility::Clear(Isolate* isolate, Address address, | 14 void ICUtility::Clear(Isolate* isolate, Address address, |
15 ConstantPoolArray* constant_pool) { | 15 ConstantPoolArray* constant_pool) { |
16 IC::Clear(isolate, address, constant_pool); | 16 IC::Clear(isolate, address, constant_pool); |
17 } | 17 } |
18 | 18 |
19 | 19 |
20 CallICState::CallICState(ExtraICState extra_ic_state) | 20 CallICState::CallICState(ExtraICState extra_ic_state) |
21 : argc_(ArgcBits::decode(extra_ic_state)), | 21 : argc_(ArgcBits::decode(extra_ic_state)), |
22 call_type_(CallTypeBits::decode(extra_ic_state)) {} | 22 call_type_(CallTypeBits::decode(extra_ic_state)), |
| 23 is_spread_(IsSpreadBits::decode(extra_ic_state)) {} |
23 | 24 |
24 | 25 |
25 ExtraICState CallICState::GetExtraICState() const { | 26 ExtraICState CallICState::GetExtraICState() const { |
26 ExtraICState extra_ic_state = | 27 ExtraICState extra_ic_state = |
27 ArgcBits::encode(argc_) | CallTypeBits::encode(call_type_); | 28 ArgcBits::encode(argc_) | CallTypeBits::encode(call_type_) | |
| 29 IsSpreadBits::encode(is_spread_); |
28 return extra_ic_state; | 30 return extra_ic_state; |
29 } | 31 } |
30 | 32 |
31 | 33 |
32 std::ostream& operator<<(std::ostream& os, const CallICState& s) { | 34 std::ostream& operator<<(std::ostream& os, const CallICState& s) { |
33 return os << "(args(" << s.arg_count() << "), " | 35 return os << "(args(" << s.arg_count() << "), " |
34 << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION") | 36 << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION") |
35 << ", "; | 37 << ", "; |
36 } | 38 } |
37 | 39 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 case UNIQUE_NAME: | 508 case UNIQUE_NAME: |
507 case OBJECT: | 509 case OBJECT: |
508 case GENERIC: | 510 case GENERIC: |
509 return GENERIC; | 511 return GENERIC; |
510 } | 512 } |
511 UNREACHABLE(); | 513 UNREACHABLE(); |
512 return GENERIC; // Make the compiler happy. | 514 return GENERIC; // Make the compiler happy. |
513 } | 515 } |
514 } | 516 } |
515 } // namespace v8::internal | 517 } // namespace v8::internal |
OLD | NEW |