Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: src/compiler/raw-machine-assembler.cc

Issue 1391333003: Adding support for multiple returns in compiled functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compiler/raw-machine-assembler.cc
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
index f590902df380a543049a659135c6f60cdf15bed4..56a696b1b623173c2dab8322f15ee9d04cec1ef2 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -101,6 +101,22 @@ void RawMachineAssembler::Return(Node* value) {
}
+void RawMachineAssembler::Return(Node* v1, Node* v2) {
+ Node* values[] = {v1, v2};
+ Node* ret = MakeNode(common()->Return(2), 2, 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);
+ schedule()->AddReturn(CurrentBlock(), ret);
+ current_block_ = nullptr;
+}
+
+
Node* RawMachineAssembler::CallN(CallDescriptor* desc, Node* function,
Node** args) {
int param_count =

Powered by Google App Engine
This is Rietveld 408576698