| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/handler-compiler.h" | 5 #include "src/ic/handler-compiler.h" |
| 6 | 6 |
| 7 #include "src/field-type.h" | 7 #include "src/field-type.h" |
| 8 #include "src/ic/call-optimization.h" | 8 #include "src/ic/call-optimization.h" |
| 9 #include "src/ic/handler-configuration-inl.h" | 9 #include "src/ic/handler-configuration-inl.h" |
| 10 #include "src/ic/ic-inl.h" | 10 #include "src/ic/ic-inl.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 if (IC::ShouldPushPopSlotAndVector(kind())) { | 205 if (IC::ShouldPushPopSlotAndVector(kind())) { |
| 206 DiscardVectorAndSlot(); | 206 DiscardVectorAndSlot(); |
| 207 } | 207 } |
| 208 GenerateLoadConstant(isolate()->factory()->undefined_value()); | 208 GenerateLoadConstant(isolate()->factory()->undefined_value()); |
| 209 FrontendFooter(name, &miss); | 209 FrontendFooter(name, &miss); |
| 210 return GetCode(kind(), name); | 210 return GetCode(kind(), name); |
| 211 } | 211 } |
| 212 | 212 |
| 213 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( | 213 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( |
| 214 Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) { | 214 Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) { |
| 215 if (V8_UNLIKELY(FLAG_runtime_stats)) { | 215 if (FLAG_runtime_call_stats) { |
| 216 GenerateTailCall(masm(), slow_stub); | 216 GenerateTailCall(masm(), slow_stub); |
| 217 } | 217 } |
| 218 Register reg = Frontend(name); | 218 Register reg = Frontend(name); |
| 219 GenerateLoadCallback(reg, callback); | 219 GenerateLoadCallback(reg, callback); |
| 220 return GetCode(kind(), name); | 220 return GetCode(kind(), name); |
| 221 } | 221 } |
| 222 | 222 |
| 223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( | 223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( |
| 224 Handle<Name> name, const CallOptimization& call_optimization, | 224 Handle<Name> name, const CallOptimization& call_optimization, |
| 225 int accessor_index, Handle<Code> slow_stub) { | 225 int accessor_index, Handle<Code> slow_stub) { |
| 226 DCHECK(call_optimization.is_simple_api_call()); | 226 DCHECK(call_optimization.is_simple_api_call()); |
| 227 if (V8_UNLIKELY(FLAG_runtime_stats)) { | 227 if (FLAG_runtime_call_stats) { |
| 228 GenerateTailCall(masm(), slow_stub); | 228 GenerateTailCall(masm(), slow_stub); |
| 229 } | 229 } |
| 230 Register holder = Frontend(name); | 230 Register holder = Frontend(name); |
| 231 GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(), | 231 GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(), |
| 232 scratch2(), false, no_reg, holder, accessor_index); | 232 scratch2(), false, no_reg, holder, accessor_index); |
| 233 return GetCode(kind(), name); | 233 return GetCode(kind(), name); |
| 234 } | 234 } |
| 235 | 235 |
| 236 | 236 |
| 237 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) { | 237 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) { |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 GenerateStoreViaSetter(masm(), map(), receiver(), holder, accessor_index, | 571 GenerateStoreViaSetter(masm(), map(), receiver(), holder, accessor_index, |
| 572 expected_arguments, scratch2()); | 572 expected_arguments, scratch2()); |
| 573 | 573 |
| 574 return GetCode(kind(), name); | 574 return GetCode(kind(), name); |
| 575 } | 575 } |
| 576 | 576 |
| 577 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 577 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 578 Handle<JSObject> object, Handle<Name> name, | 578 Handle<JSObject> object, Handle<Name> name, |
| 579 const CallOptimization& call_optimization, int accessor_index, | 579 const CallOptimization& call_optimization, int accessor_index, |
| 580 Handle<Code> slow_stub) { | 580 Handle<Code> slow_stub) { |
| 581 if (V8_UNLIKELY(FLAG_runtime_stats)) { | 581 if (FLAG_runtime_call_stats) { |
| 582 GenerateTailCall(masm(), slow_stub); | 582 GenerateTailCall(masm(), slow_stub); |
| 583 } | 583 } |
| 584 Register holder = Frontend(name); | 584 Register holder = Frontend(name); |
| 585 if (Descriptor::kPassLastArgsOnStack) { | 585 if (Descriptor::kPassLastArgsOnStack) { |
| 586 __ LoadParameterFromStack<Descriptor>(value(), Descriptor::kValue); | 586 __ LoadParameterFromStack<Descriptor>(value(), Descriptor::kValue); |
| 587 } | 587 } |
| 588 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), | 588 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), |
| 589 receiver(), scratch2(), true, value(), holder, | 589 receiver(), scratch2(), true, value(), holder, |
| 590 accessor_index); | 590 accessor_index); |
| 591 return GetCode(kind(), name); | 591 return GetCode(kind(), name); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 } | 647 } |
| 648 | 648 |
| 649 void ElementHandlerCompiler::CompileElementHandlers( | 649 void ElementHandlerCompiler::CompileElementHandlers( |
| 650 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { | 650 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { |
| 651 for (int i = 0; i < receiver_maps->length(); ++i) { | 651 for (int i = 0; i < receiver_maps->length(); ++i) { |
| 652 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); | 652 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); |
| 653 } | 653 } |
| 654 } | 654 } |
| 655 } // namespace internal | 655 } // namespace internal |
| 656 } // namespace v8 | 656 } // namespace v8 |
| OLD | NEW |