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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 7862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7873 HValue* function, int argument_count, TailCallMode syntactic_tail_call_mode, | 7873 HValue* function, int argument_count, TailCallMode syntactic_tail_call_mode, |
7874 ConvertReceiverMode convert_mode, TailCallMode tail_call_mode, | 7874 ConvertReceiverMode convert_mode, TailCallMode tail_call_mode, |
7875 FeedbackVectorSlot slot) { | 7875 FeedbackVectorSlot slot) { |
7876 if (syntactic_tail_call_mode == TailCallMode::kAllow) { | 7876 if (syntactic_tail_call_mode == TailCallMode::kAllow) { |
7877 BuildEnsureCallable(function); | 7877 BuildEnsureCallable(function); |
7878 } else { | 7878 } else { |
7879 DCHECK_EQ(TailCallMode::kDisallow, tail_call_mode); | 7879 DCHECK_EQ(TailCallMode::kDisallow, tail_call_mode); |
7880 } | 7880 } |
7881 int arity = argument_count - 1; | 7881 int arity = argument_count - 1; |
7882 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate()); | 7882 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate()); |
| 7883 HValue* arity_val = Add<HConstant>(arity); |
7883 HValue* index_val = Add<HConstant>(vector->GetIndex(slot)); | 7884 HValue* index_val = Add<HConstant>(vector->GetIndex(slot)); |
7884 HValue* vector_val = Add<HConstant>(vector); | 7885 HValue* vector_val = Add<HConstant>(vector); |
7885 | 7886 |
7886 HValue* op_vals[] = {context(), function, index_val, vector_val}; | 7887 HValue* op_vals[] = {context(), function, arity_val, index_val, vector_val}; |
7887 | 7888 |
7888 Callable callable = CodeFactory::CallICInOptimizedCode( | 7889 Callable callable = CodeFactory::CallICInOptimizedCode( |
7889 isolate(), arity, convert_mode, tail_call_mode); | 7890 isolate(), convert_mode, tail_call_mode); |
7890 HConstant* stub = Add<HConstant>(callable.code()); | 7891 HConstant* stub = Add<HConstant>(callable.code()); |
7891 | 7892 |
7892 return New<HCallWithDescriptor>(stub, argument_count, callable.descriptor(), | 7893 return New<HCallWithDescriptor>(stub, argument_count, callable.descriptor(), |
7893 ArrayVector(op_vals), | 7894 ArrayVector(op_vals), |
7894 syntactic_tail_call_mode); | 7895 syntactic_tail_call_mode); |
7895 } | 7896 } |
7896 | 7897 |
7897 HInstruction* HOptimizedGraphBuilder::NewCallConstantFunction( | 7898 HInstruction* HOptimizedGraphBuilder::NewCallConstantFunction( |
7898 Handle<JSFunction> function, int argument_count, | 7899 Handle<JSFunction> function, int argument_count, |
7899 TailCallMode syntactic_tail_call_mode, TailCallMode tail_call_mode) { | 7900 TailCallMode syntactic_tail_call_mode, TailCallMode tail_call_mode) { |
(...skipping 5383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13283 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13284 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13284 } | 13285 } |
13285 | 13286 |
13286 #ifdef DEBUG | 13287 #ifdef DEBUG |
13287 graph_->Verify(false); // No full verify. | 13288 graph_->Verify(false); // No full verify. |
13288 #endif | 13289 #endif |
13289 } | 13290 } |
13290 | 13291 |
13291 } // namespace internal | 13292 } // namespace internal |
13292 } // namespace v8 | 13293 } // namespace v8 |
OLD | NEW |