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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 HandleScope scope(isolate()); | 217 HandleScope scope(isolate()); |
218 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate()); | 218 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate()); |
219 DCHECK(Debug::HasDebugInfo(shared)); | 219 DCHECK(Debug::HasDebugInfo(shared)); |
220 Code* original_code = Debug::GetDebugInfo(shared)->original_code(); | 220 Code* original_code = Debug::GetDebugInfo(shared)->original_code(); |
221 DCHECK(original_code->IsCode()); | 221 DCHECK(original_code->IsCode()); |
222 return original_code; | 222 return original_code; |
223 } | 223 } |
224 | 224 |
225 | 225 |
226 bool IC::AddressIsOptimizedCode() const { | 226 bool IC::AddressIsOptimizedCode() const { |
227 Object* maybe_function = | 227 Code* host = |
228 Memory::Object_at(fp() + JavaScriptFrameConstants::kFunctionOffset); | 228 isolate()->inner_pointer_to_code_cache()->GetCacheEntry(address())->code; |
229 if (maybe_function->IsJSFunction()) { | 229 return host->kind() == Code::OPTIMIZED_FUNCTION; |
230 JSFunction* function = JSFunction::cast(maybe_function); | |
231 return function->IsOptimized(); | |
232 } | |
233 return false; | |
234 } | 230 } |
235 | 231 |
236 | 232 |
237 static void LookupForRead(LookupIterator* it) { | 233 static void LookupForRead(LookupIterator* it) { |
238 for (; it->IsFound(); it->Next()) { | 234 for (; it->IsFound(); it->Next()) { |
239 switch (it->state()) { | 235 switch (it->state()) { |
240 case LookupIterator::NOT_FOUND: | 236 case LookupIterator::NOT_FOUND: |
241 case LookupIterator::TRANSITION: | 237 case LookupIterator::TRANSITION: |
242 UNREACHABLE(); | 238 UNREACHABLE(); |
243 case LookupIterator::JSPROXY: | 239 case LookupIterator::JSPROXY: |
(...skipping 2756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3000 static const Address IC_utilities[] = { | 2996 static const Address IC_utilities[] = { |
3001 #define ADDR(name) FUNCTION_ADDR(name), | 2997 #define ADDR(name) FUNCTION_ADDR(name), |
3002 IC_UTIL_LIST(ADDR) NULL | 2998 IC_UTIL_LIST(ADDR) NULL |
3003 #undef ADDR | 2999 #undef ADDR |
3004 }; | 3000 }; |
3005 | 3001 |
3006 | 3002 |
3007 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3003 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
3008 } | 3004 } |
3009 } // namespace v8::internal | 3005 } // namespace v8::internal |
OLD | NEW |