OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 7375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7386 HValue* fun, int argument_count, bool pass_argument_count) { | 7386 HValue* fun, int argument_count, bool pass_argument_count) { |
7387 return New<HCallJSFunction>( | 7387 return New<HCallJSFunction>( |
7388 fun, argument_count, pass_argument_count); | 7388 fun, argument_count, pass_argument_count); |
7389 } | 7389 } |
7390 | 7390 |
7391 | 7391 |
7392 HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall( | 7392 HInstruction* HOptimizedGraphBuilder::NewArgumentAdaptorCall( |
7393 HValue* fun, HValue* context, | 7393 HValue* fun, HValue* context, |
7394 int argument_count, HValue* expected_param_count) { | 7394 int argument_count, HValue* expected_param_count) { |
7395 CallInterfaceDescriptor* descriptor = | 7395 CallInterfaceDescriptor* descriptor = |
7396 isolate()->call_descriptor(Isolate::ArgumentAdaptorCall); | 7396 isolate()->call_descriptor(CallDescriptorKey::ArgumentAdaptorCall); |
7397 | 7397 |
7398 HValue* arity = Add<HConstant>(argument_count - 1); | 7398 HValue* arity = Add<HConstant>(argument_count - 1); |
7399 | 7399 |
7400 HValue* op_vals[] = { context, fun, arity, expected_param_count }; | 7400 HValue* op_vals[] = { context, fun, arity, expected_param_count }; |
7401 | 7401 |
7402 Handle<Code> adaptor = | 7402 Handle<Code> adaptor = |
7403 isolate()->builtins()->ArgumentsAdaptorTrampoline(); | 7403 isolate()->builtins()->ArgumentsAdaptorTrampoline(); |
7404 HConstant* adaptor_value = Add<HConstant>(adaptor); | 7404 HConstant* adaptor_value = Add<HConstant>(adaptor); |
7405 | 7405 |
7406 return New<HCallWithDescriptor>( | 7406 return New<HCallWithDescriptor>( |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8637 | 8637 |
8638 HValue* op_vals[] = { | 8638 HValue* op_vals[] = { |
8639 context(), | 8639 context(), |
8640 Add<HConstant>(function), | 8640 Add<HConstant>(function), |
8641 call_data, | 8641 call_data, |
8642 holder, | 8642 holder, |
8643 api_function_address | 8643 api_function_address |
8644 }; | 8644 }; |
8645 | 8645 |
8646 CallInterfaceDescriptor* descriptor = | 8646 CallInterfaceDescriptor* descriptor = |
8647 isolate()->call_descriptor(Isolate::ApiFunctionCall); | 8647 isolate()->call_descriptor(CallDescriptorKey::ApiFunctionCall); |
8648 | 8648 |
8649 CallApiFunctionStub stub(isolate(), is_store, call_data_is_undefined, argc); | 8649 CallApiFunctionStub stub(isolate(), is_store, call_data_is_undefined, argc); |
8650 Handle<Code> code = stub.GetCode(); | 8650 Handle<Code> code = stub.GetCode(); |
8651 HConstant* code_value = Add<HConstant>(code); | 8651 HConstant* code_value = Add<HConstant>(code); |
8652 | 8652 |
8653 DCHECK((sizeof(op_vals) / kPointerSize) == | 8653 DCHECK((sizeof(op_vals) / kPointerSize) == |
8654 descriptor->GetEnvironmentLength()); | 8654 descriptor->GetEnvironmentLength()); |
8655 | 8655 |
8656 HInstruction* call = New<HCallWithDescriptor>( | 8656 HInstruction* call = New<HCallWithDescriptor>( |
8657 code_value, argc + 1, descriptor, | 8657 code_value, argc + 1, descriptor, |
(...skipping 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12488 if (ShouldProduceTraceOutput()) { | 12488 if (ShouldProduceTraceOutput()) { |
12489 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12489 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12490 } | 12490 } |
12491 | 12491 |
12492 #ifdef DEBUG | 12492 #ifdef DEBUG |
12493 graph_->Verify(false); // No full verify. | 12493 graph_->Verify(false); // No full verify. |
12494 #endif | 12494 #endif |
12495 } | 12495 } |
12496 | 12496 |
12497 } } // namespace v8::internal | 12497 } } // namespace v8::internal |
OLD | NEW |