diff options
author | Michaël Zasso <targos@protonmail.com> | 2017-02-14 11:27:26 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2017-02-22 15:55:42 +0100 |
commit | 7a77daf24344db7942e34c962b0f1ee729ab7af5 (patch) | |
tree | e7cbe7bf4e2f4b802a8f5bc18336c546cd6a0d7f /deps/v8/src/compiler/raw-machine-assembler.cc | |
parent | 5f08871ee93ea739148cc49e0f7679e33c70295a (diff) | |
download | android-node-v8-7a77daf24344db7942e34c962b0f1ee729ab7af5.tar.gz android-node-v8-7a77daf24344db7942e34c962b0f1ee729ab7af5.tar.bz2 android-node-v8-7a77daf24344db7942e34c962b0f1ee729ab7af5.zip |
deps: update V8 to 5.6.326.55
PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/src/compiler/raw-machine-assembler.cc')
-rw-r--r-- | deps/v8/src/compiler/raw-machine-assembler.cc | 48 |
1 files changed, 43 insertions, 5 deletions
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<int>(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) { |