| 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/type-info.h" | 5 #include "src/type-info.h" | 
| 6 | 6 | 
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" | 
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" | 
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" | 
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" | 
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 145     *store_mode = nexus.GetKeyedAccessStoreMode(); | 145     *store_mode = nexus.GetKeyedAccessStoreMode(); | 
| 146     *key_type = nexus.GetKeyType(); | 146     *key_type = nexus.GetKeyType(); | 
| 147   } else { | 147   } else { | 
| 148     *store_mode = STANDARD_STORE; | 148     *store_mode = STANDARD_STORE; | 
| 149     *key_type = ELEMENT; | 149     *key_type = ELEMENT; | 
| 150   } | 150   } | 
| 151 } | 151 } | 
| 152 | 152 | 
| 153 | 153 | 
| 154 Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(FeedbackVectorSlot slot) { | 154 Handle<JSFunction> TypeFeedbackOracle::GetCallTarget(FeedbackVectorSlot slot) { | 
| 155   CallICNexus nexus(feedback_vector_, slot); | 155   Handle<Object> info = GetInfo(slot); | 
| 156   Handle<Object> info = nexus.GetCallFeedback(); |  | 
| 157   if (info->IsAllocationSite()) { | 156   if (info->IsAllocationSite()) { | 
| 158     return Handle<JSFunction>(isolate()->native_context()->array_function()); | 157     return Handle<JSFunction>(isolate()->native_context()->array_function()); | 
| 159   } | 158   } | 
| 160 | 159 | 
| 161   return Handle<JSFunction>::cast(info); | 160   return Handle<JSFunction>::cast(info); | 
| 162 } | 161 } | 
| 163 | 162 | 
| 164 | 163 | 
| 165 Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget( | 164 Handle<JSFunction> TypeFeedbackOracle::GetCallNewTarget( | 
| 166     FeedbackVectorSlot slot) { | 165     FeedbackVectorSlot slot) { | 
| 167   ConstructICNexus nexus(feedback_vector_, slot); | 166   Handle<Object> info = GetInfo(slot); | 
| 168   Handle<Object> info = nexus.GetCallFeedback(); |  | 
| 169   if (info->IsJSFunction()) { | 167   if (info->IsJSFunction()) { | 
| 170     return Handle<JSFunction>::cast(info); | 168     return Handle<JSFunction>::cast(info); | 
| 171   } | 169   } | 
| 172 | 170 | 
| 173   DCHECK(info->IsAllocationSite()); | 171   DCHECK(info->IsAllocationSite()); | 
| 174   return Handle<JSFunction>(isolate()->native_context()->array_function()); | 172   return Handle<JSFunction>(isolate()->native_context()->array_function()); | 
| 175 } | 173 } | 
| 176 | 174 | 
| 177 | 175 | 
| 178 Handle<AllocationSite> TypeFeedbackOracle::GetCallAllocationSite( | 176 Handle<AllocationSite> TypeFeedbackOracle::GetCallAllocationSite( | 
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 476   // Dictionary has been allocated with sufficient size for all elements. | 474   // Dictionary has been allocated with sufficient size for all elements. | 
| 477   DisallowHeapAllocation no_need_to_resize_dictionary; | 475   DisallowHeapAllocation no_need_to_resize_dictionary; | 
| 478   HandleScope scope(isolate()); | 476   HandleScope scope(isolate()); | 
| 479   USE(UnseededNumberDictionary::AtNumberPut( | 477   USE(UnseededNumberDictionary::AtNumberPut( | 
| 480       dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 478       dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 
| 481 } | 479 } | 
| 482 | 480 | 
| 483 | 481 | 
| 484 }  // namespace internal | 482 }  // namespace internal | 
| 485 }  // namespace v8 | 483 }  // namespace v8 | 
| OLD | NEW | 
|---|