| 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/compiler/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
| 9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
| 10 | 10 |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 return value; | 785 return value; |
| 786 } | 786 } |
| 787 | 787 |
| 788 | 788 |
| 789 void BytecodeGraphBuilder::VisitNew( | 789 void BytecodeGraphBuilder::VisitNew( |
| 790 const interpreter::BytecodeArrayIterator& iterator) { | 790 const interpreter::BytecodeArrayIterator& iterator) { |
| 791 interpreter::Register callee = iterator.GetRegisterOperand(0); | 791 interpreter::Register callee = iterator.GetRegisterOperand(0); |
| 792 interpreter::Register first_arg = iterator.GetRegisterOperand(1); | 792 interpreter::Register first_arg = iterator.GetRegisterOperand(1); |
| 793 size_t arg_count = iterator.GetCountOperand(2); | 793 size_t arg_count = iterator.GetCountOperand(2); |
| 794 | 794 |
| 795 const Operator* call = | 795 // TODO(turbofan): Pass the feedback here. |
| 796 javascript()->CallConstruct(static_cast<int>(arg_count) + 2); | 796 const Operator* call = javascript()->CallConstruct( |
| 797 static_cast<int>(arg_count) + 2, VectorSlotPair()); |
| 797 Node* value = ProcessCallNewArguments(call, callee, first_arg, arg_count + 2); | 798 Node* value = ProcessCallNewArguments(call, callee, first_arg, arg_count + 2); |
| 798 AddEmptyFrameStateInputs(value); | 799 AddEmptyFrameStateInputs(value); |
| 799 environment()->BindAccumulator(value); | 800 environment()->BindAccumulator(value); |
| 800 } | 801 } |
| 801 | 802 |
| 802 | 803 |
| 803 void BytecodeGraphBuilder::VisitThrow( | 804 void BytecodeGraphBuilder::VisitThrow( |
| 804 const interpreter::BytecodeArrayIterator& iterator) { | 805 const interpreter::BytecodeArrayIterator& iterator) { |
| 805 UNIMPLEMENTED(); | 806 UNIMPLEMENTED(); |
| 806 } | 807 } |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 | 1228 |
| 1228 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1229 if (environment()->IsMarkedAsUnreachable()) return; | 1230 if (environment()->IsMarkedAsUnreachable()) return; |
| 1230 environment()->MarkAsUnreachable(); | 1231 environment()->MarkAsUnreachable(); |
| 1231 exit_controls_.push_back(exit); | 1232 exit_controls_.push_back(exit); |
| 1232 } | 1233 } |
| 1233 | 1234 |
| 1234 } // namespace compiler | 1235 } // namespace compiler |
| 1235 } // namespace internal | 1236 } // namespace internal |
| 1236 } // namespace v8 | 1237 } // namespace v8 |
| OLD | NEW |