diff options
Diffstat (limited to 'deps/v8/src/compiler/raw-machine-assembler.cc')
-rw-r--r-- | deps/v8/src/compiler/raw-machine-assembler.cc | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/deps/v8/src/compiler/raw-machine-assembler.cc b/deps/v8/src/compiler/raw-machine-assembler.cc index bed2f628d9..ed67c06cc7 100644 --- a/deps/v8/src/compiler/raw-machine-assembler.cc +++ b/deps/v8/src/compiler/raw-machine-assembler.cc @@ -134,7 +134,6 @@ void RawMachineAssembler::Return(Node* value) { current_block_ = nullptr; } - void RawMachineAssembler::Return(Node* v1, Node* v2) { Node* values[] = {Int32Constant(0), v1, v2}; Node* ret = MakeNode(common()->Return(2), 3, values); @@ -142,7 +141,6 @@ void RawMachineAssembler::Return(Node* v1, Node* v2) { current_block_ = nullptr; } - void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3) { Node* values[] = {Int32Constant(0), v1, v2, v3}; Node* ret = MakeNode(common()->Return(3), 4, values); @@ -150,6 +148,24 @@ void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3) { current_block_ = nullptr; } +void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3, Node* v4) { + Node* values[] = {Int32Constant(0), v1, v2, v3, v4}; + Node* ret = MakeNode(common()->Return(4), 5, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; +} + +void RawMachineAssembler::Return(int count, Node* vs[]) { + typedef Node* Node_ptr; + Node** values = new Node_ptr[count + 1]; + values[0] = Int32Constant(0); + for (int i = 0; i < count; ++i) values[i + 1] = vs[i]; + Node* ret = MakeNode(common()->Return(count), count + 1, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; + delete[] values; +} + void RawMachineAssembler::PopAndReturn(Node* pop, Node* value) { Node* values[] = {pop, value}; Node* ret = MakeNode(common()->Return(1), 2, values); @@ -172,6 +188,14 @@ void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, current_block_ = nullptr; } +void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, Node* v3, + Node* v4) { + Node* values[] = {pop, v1, v2, v3, v4}; + Node* ret = MakeNode(common()->Return(4), 5, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; +} + void RawMachineAssembler::DebugAbort(Node* message) { AddNode(machine()->DebugAbort(), message); } @@ -430,7 +454,7 @@ void RawMachineAssembler::Bind(RawMachineLabel* label, str << "Binding label without closing previous block:" << "\n# label: " << info << "\n# previous block: " << *current_block_; - FATAL(str.str().c_str()); + FATAL("%s", str.str().c_str()); } Bind(label); current_block_->set_debug_info(info); @@ -495,7 +519,7 @@ RawMachineLabel::~RawMachineLabel() { } else { str << "A label has been used but it's not bound."; } - FATAL(str.str().c_str()); + FATAL("%s", str.str().c_str()); #endif // DEBUG } |