| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "src/ic/ic.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-arguments-inl.h" | 8 #include "src/api-arguments-inl.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 183 } |
| 184 | 184 |
| 185 InlineCacheState IC::StateFromCode(Code* code) { | 185 InlineCacheState IC::StateFromCode(Code* code) { |
| 186 Isolate* isolate = code->GetIsolate(); | 186 Isolate* isolate = code->GetIsolate(); |
| 187 switch (code->kind()) { | 187 switch (code->kind()) { |
| 188 case Code::BINARY_OP_IC: { | 188 case Code::BINARY_OP_IC: { |
| 189 BinaryOpICState state(isolate, code->extra_ic_state()); | 189 BinaryOpICState state(isolate, code->extra_ic_state()); |
| 190 return state.GetICState(); | 190 return state.GetICState(); |
| 191 } | 191 } |
| 192 case Code::COMPARE_IC: { | 192 case Code::COMPARE_IC: { |
| 193 CompareICStub stub(isolate, code->extra_ic_state()); | 193 CompareICStub stub(code->stub_key(), isolate); |
| 194 return stub.GetICState(); | 194 return stub.GetICState(); |
| 195 } | 195 } |
| 196 case Code::TO_BOOLEAN_IC: { | 196 case Code::TO_BOOLEAN_IC: { |
| 197 ToBooleanICStub stub(isolate, code->extra_ic_state()); | 197 ToBooleanICStub stub(isolate, code->extra_ic_state()); |
| 198 return stub.GetICState(); | 198 return stub.GetICState(); |
| 199 } | 199 } |
| 200 default: | 200 default: |
| 201 if (code->is_debug_stub()) return UNINITIALIZED; | 201 if (code->is_debug_stub()) return UNINITIALIZED; |
| 202 UNREACHABLE(); | 202 UNREACHABLE(); |
| 203 return UNINITIALIZED; | 203 return UNINITIALIZED; |
| (...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3014 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, | 3014 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, |
| 3015 vector->GetKind(vector_slot)); | 3015 vector->GetKind(vector_slot)); |
| 3016 KeyedLoadICNexus nexus(vector, vector_slot); | 3016 KeyedLoadICNexus nexus(vector, vector_slot); |
| 3017 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 3017 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
| 3018 ic.UpdateState(receiver, key); | 3018 ic.UpdateState(receiver, key); |
| 3019 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 3019 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); |
| 3020 } | 3020 } |
| 3021 } | 3021 } |
| 3022 } // namespace internal | 3022 } // namespace internal |
| 3023 } // namespace v8 | 3023 } // namespace v8 |
| OLD | NEW |