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 <iostream> | 7 #include <iostream> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/api-arguments-inl.h" | 10 #include "src/api-arguments-inl.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 kind_ = target->kind(); | 251 kind_ = target->kind(); |
252 state_ = UseVector() ? nexus->StateFromFeedback() : StateFromCode(target); | 252 state_ = UseVector() ? nexus->StateFromFeedback() : StateFromCode(target); |
253 old_state_ = state_; | 253 old_state_ = state_; |
254 extra_ic_state_ = target->extra_ic_state(); | 254 extra_ic_state_ = target->extra_ic_state(); |
255 } | 255 } |
256 | 256 |
257 // The ICs that don't pass slot and vector through the stack have to | 257 // The ICs that don't pass slot and vector through the stack have to |
258 // save/restore them in the dispatcher. | 258 // save/restore them in the dispatcher. |
259 bool IC::ShouldPushPopSlotAndVector(Code::Kind kind) { | 259 bool IC::ShouldPushPopSlotAndVector(Code::Kind kind) { |
260 if (kind == Code::LOAD_IC || kind == Code::LOAD_GLOBAL_IC || | 260 if (kind == Code::LOAD_IC || kind == Code::LOAD_GLOBAL_IC || |
261 kind == Code::KEYED_LOAD_IC || kind == Code::CALL_IC) { | 261 kind == Code::KEYED_LOAD_IC) { |
262 return true; | 262 return true; |
263 } | 263 } |
264 if (kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC) { | 264 if (kind == Code::STORE_IC || kind == Code::KEYED_STORE_IC) { |
265 return !StoreWithVectorDescriptor::kPassLastArgsOnStack; | 265 return !StoreWithVectorDescriptor::kPassLastArgsOnStack; |
266 } | 266 } |
267 return false; | 267 return false; |
268 } | 268 } |
269 | 269 |
270 InlineCacheState IC::StateFromCode(Code* code) { | 270 InlineCacheState IC::StateFromCode(Code* code) { |
271 Isolate* isolate = code->GetIsolate(); | 271 Isolate* isolate = code->GetIsolate(); |
(...skipping 2868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3140 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 3140 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
3141 it.Next(); | 3141 it.Next(); |
3142 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 3142 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
3143 Object::GetProperty(&it)); | 3143 Object::GetProperty(&it)); |
3144 } | 3144 } |
3145 | 3145 |
3146 return *result; | 3146 return *result; |
3147 } | 3147 } |
3148 } // namespace internal | 3148 } // namespace internal |
3149 } // namespace v8 | 3149 } // namespace v8 |
OLD | NEW |