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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 | 239 |
240 Code* IC::GetCode() const { | 240 Code* IC::GetCode() const { |
241 HandleScope scope(isolate()); | 241 HandleScope scope(isolate()); |
242 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate()); | 242 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate()); |
243 Code* code = shared->code(); | 243 Code* code = shared->code(); |
244 return code; | 244 return code; |
245 } | 245 } |
246 | 246 |
247 | |
248 bool IC::AddressIsOptimizedCode() const { | |
249 Code* host = | |
250 isolate()->inner_pointer_to_code_cache()->GetCacheEntry(address())->code; | |
251 return host->kind() == Code::OPTIMIZED_FUNCTION; | |
252 } | |
253 | |
254 static void LookupForRead(LookupIterator* it) { | 247 static void LookupForRead(LookupIterator* it) { |
255 for (; it->IsFound(); it->Next()) { | 248 for (; it->IsFound(); it->Next()) { |
256 switch (it->state()) { | 249 switch (it->state()) { |
257 case LookupIterator::NOT_FOUND: | 250 case LookupIterator::NOT_FOUND: |
258 case LookupIterator::TRANSITION: | 251 case LookupIterator::TRANSITION: |
259 UNREACHABLE(); | 252 UNREACHABLE(); |
260 case LookupIterator::JSPROXY: | 253 case LookupIterator::JSPROXY: |
261 return; | 254 return; |
262 case LookupIterator::INTERCEPTOR: { | 255 case LookupIterator::INTERCEPTOR: { |
263 // If there is a getter, return; otherwise loop to perform the lookup. | 256 // If there is a getter, return; otherwise loop to perform the lookup. |
(...skipping 2657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2921 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 2914 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
2922 it.Next(); | 2915 it.Next(); |
2923 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 2916 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
2924 Object::GetProperty(&it)); | 2917 Object::GetProperty(&it)); |
2925 } | 2918 } |
2926 | 2919 |
2927 return *result; | 2920 return *result; |
2928 } | 2921 } |
2929 } // namespace internal | 2922 } // namespace internal |
2930 } // namespace v8 | 2923 } // namespace v8 |
OLD | NEW |