From 7a77daf24344db7942e34c962b0f1ee729ab7af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 14 Feb 2017 11:27:26 +0100 Subject: deps: update V8 to 5.6.326.55 PR-URL: https://github.com/nodejs/node/pull/10992 Reviewed-By: Ben Noordhuis --- deps/v8/src/compiler/raw-machine-assembler.cc | 48 ++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 5 deletions(-) (limited to 'deps/v8/src/compiler/raw-machine-assembler.cc') diff --git a/deps/v8/src/compiler/raw-machine-assembler.cc b/deps/v8/src/compiler/raw-machine-assembler.cc index cdf45ab776..14695c11b8 100644 --- a/deps/v8/src/compiler/raw-machine-assembler.cc +++ b/deps/v8/src/compiler/raw-machine-assembler.cc @@ -120,23 +120,46 @@ void RawMachineAssembler::Switch(Node* index, RawMachineLabel* default_label, } void RawMachineAssembler::Return(Node* value) { - Node* ret = MakeNode(common()->Return(), 1, &value); + Node* values[] = {Int32Constant(0), value}; + Node* ret = MakeNode(common()->Return(1), 2, values); schedule()->AddReturn(CurrentBlock(), ret); current_block_ = nullptr; } void RawMachineAssembler::Return(Node* v1, Node* v2) { - Node* values[] = {v1, v2}; - Node* ret = MakeNode(common()->Return(2), 2, values); + Node* values[] = {Int32Constant(0), v1, v2}; + Node* ret = MakeNode(common()->Return(2), 3, values); schedule()->AddReturn(CurrentBlock(), ret); current_block_ = nullptr; } void RawMachineAssembler::Return(Node* v1, Node* v2, Node* v3) { - Node* values[] = {v1, v2, v3}; - Node* ret = MakeNode(common()->Return(3), 3, values); + Node* values[] = {Int32Constant(0), v1, v2, v3}; + Node* ret = MakeNode(common()->Return(3), 4, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; +} + +void RawMachineAssembler::PopAndReturn(Node* pop, Node* value) { + Node* values[] = {pop, value}; + Node* ret = MakeNode(common()->Return(1), 2, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; +} + +void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2) { + Node* values[] = {pop, v1, v2}; + Node* ret = MakeNode(common()->Return(2), 3, values); + schedule()->AddReturn(CurrentBlock(), ret); + current_block_ = nullptr; +} + +void RawMachineAssembler::PopAndReturn(Node* pop, Node* v1, Node* v2, + Node* v3) { + Node* values[] = {pop, v1, v2, v3}; + Node* ret = MakeNode(common()->Return(3), 4, values); schedule()->AddReturn(CurrentBlock(), ret); current_block_ = nullptr; } @@ -253,6 +276,21 @@ Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function, ref, arity, context); } +Node* RawMachineAssembler::CallRuntime5(Runtime::FunctionId function, + Node* arg1, Node* arg2, Node* arg3, + Node* arg4, Node* arg5, Node* context) { + CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor( + zone(), function, 5, Operator::kNoProperties, CallDescriptor::kNoFlags); + int return_count = static_cast(descriptor->ReturnCount()); + + Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); + Node* ref = AddNode( + common()->ExternalConstant(ExternalReference(function, isolate()))); + Node* arity = Int32Constant(5); + + return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4, + arg5, ref, arity, context); +} Node* RawMachineAssembler::TailCallN(CallDescriptor* desc, Node* function, Node** args) { -- cgit v1.2.1