Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 826 return_value.Bind(CallStub(callable.descriptor(), code_target, context, | 826 return_value.Bind(CallStub(callable.descriptor(), code_target, context, |
| 827 arg_count, new_target, constructor, | 827 arg_count, new_target, constructor, |
| 828 UndefinedConstant(), first_arg)); | 828 UndefinedConstant(), first_arg)); |
| 829 Goto(&end); | 829 Goto(&end); |
| 830 } | 830 } |
| 831 | 831 |
| 832 Bind(&end); | 832 Bind(&end); |
| 833 return return_value.value(); | 833 return return_value.value(); |
| 834 } | 834 } |
| 835 | 835 |
| 836 Node* InterpreterAssembler::CallConstructWithSpread(Node* constructor, | |
| 837 Node* context, | |
| 838 Node* new_target, | |
| 839 Node* first_arg, | |
| 840 Node* arg_count) { | |
| 841 Variable return_value(this, MachineRepresentation::kTagged); | |
| 842 Comment("call using ConstructWithSpread"); | |
|
rmcilroy
2017/01/11 15:24:45
Do we have any plans to add type feedback informat
petermarshall
2017/01/11 16:50:03
Yes we do plan to add type feedback information in
| |
| 843 Callable callable = | |
| 844 CodeFactory::InterpreterPushArgsAndConstructWithSpread(isolate()); | |
| 845 Node* code_target = HeapConstant(callable.code()); | |
| 846 return_value.Bind(CallStub(callable.descriptor(), code_target, context, | |
| 847 arg_count, new_target, constructor, | |
| 848 UndefinedConstant(), first_arg)); | |
| 849 | |
| 850 return return_value.value(); | |
| 851 } | |
| 852 | |
| 836 Node* InterpreterAssembler::CallRuntimeN(Node* function_id, Node* context, | 853 Node* InterpreterAssembler::CallRuntimeN(Node* function_id, Node* context, |
| 837 Node* first_arg, Node* arg_count, | 854 Node* first_arg, Node* arg_count, |
| 838 int result_size) { | 855 int result_size) { |
| 839 Callable callable = CodeFactory::InterpreterCEntry(isolate(), result_size); | 856 Callable callable = CodeFactory::InterpreterCEntry(isolate(), result_size); |
| 840 Node* code_target = HeapConstant(callable.code()); | 857 Node* code_target = HeapConstant(callable.code()); |
| 841 | 858 |
| 842 // Get the function entry from the function id. | 859 // Get the function entry from the function id. |
| 843 Node* function_table = ExternalConstant( | 860 Node* function_table = ExternalConstant( |
| 844 ExternalReference::runtime_function_table_address(isolate())); | 861 ExternalReference::runtime_function_table_address(isolate())); |
| 845 Node* function_offset = | 862 Node* function_offset = |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1304 Goto(&loop); | 1321 Goto(&loop); |
| 1305 } | 1322 } |
| 1306 Bind(&done_loop); | 1323 Bind(&done_loop); |
| 1307 | 1324 |
| 1308 return array; | 1325 return array; |
| 1309 } | 1326 } |
| 1310 | 1327 |
| 1311 } // namespace interpreter | 1328 } // namespace interpreter |
| 1312 } // namespace internal | 1329 } // namespace internal |
| 1313 } // namespace v8 | 1330 } // namespace v8 |
| OLD | NEW |