Index: src/mips64/full-codegen-mips64.cc |
diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc |
index 4df952ee3d37fd1a8b3bea49e9b539d68b42950e..94a67b51854b42bfce2a5d210311c9f07389fedc 100644 |
--- a/src/mips64/full-codegen-mips64.cc |
+++ b/src/mips64/full-codegen-mips64.cc |
@@ -500,10 +500,29 @@ |
} |
+void FullCodeGenerator::EffectContext::Plug(Variable* var) const { |
+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
+} |
+ |
+ |
+void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const { |
+ DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
+ codegen()->GetVar(result_register(), var); |
+} |
+ |
+ |
void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
codegen()->GetVar(result_register(), var); |
__ push(result_register()); |
+} |
+ |
+ |
+void FullCodeGenerator::TestContext::Plug(Variable* var) const { |
+ // For simplicity we always test the accumulator register. |
+ codegen()->GetVar(result_register(), var); |
+ codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); |
+ codegen()->DoTest(this); |
} |
@@ -664,6 +683,10 @@ |
Label* materialize_false) const { |
DCHECK(materialize_true == true_label_); |
DCHECK(materialize_false == false_label_); |
+} |
+ |
+ |
+void FullCodeGenerator::EffectContext::Plug(bool flag) const { |
} |
@@ -936,6 +959,35 @@ |
break; |
} |
} |
+} |
+ |
+ |
+void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { |
+ VariableProxy* proxy = declaration->proxy(); |
+ Variable* variable = proxy->var(); |
+ switch (variable->location()) { |
+ case VariableLocation::GLOBAL: |
+ case VariableLocation::UNALLOCATED: |
+ // TODO(rossberg) |
+ break; |
+ |
+ case VariableLocation::CONTEXT: { |
+ Comment cmnt(masm_, "[ ImportDeclaration"); |
+ EmitDebugCheckDeclarationContext(variable); |
+ // TODO(rossberg) |
+ break; |
+ } |
+ |
+ case VariableLocation::PARAMETER: |
+ case VariableLocation::LOCAL: |
+ case VariableLocation::LOOKUP: |
+ UNREACHABLE(); |
+ } |
+} |
+ |
+ |
+void FullCodeGenerator::VisitExportDeclaration(ExportDeclaration* declaration) { |
+ // TODO(rossberg) |
} |
@@ -1261,6 +1313,12 @@ |
__ CallRuntime(Runtime::kNewClosure, 3); |
} |
context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { |
+ Comment cmnt(masm_, "[ VariableProxy"); |
+ EmitVariableLoad(expr); |
} |
@@ -3836,6 +3894,33 @@ |
} |
+void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
+ // Load the arguments on the stack and call the stub. |
+ SubStringStub stub(isolate()); |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK(args->length() == 3); |
+ VisitForStackValue(args->at(0)); |
+ VisitForStackValue(args->at(1)); |
+ VisitForStackValue(args->at(2)); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { |
+ // Load the arguments on the stack and call the stub. |
+ RegExpExecStub stub(isolate()); |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK(args->length() == 4); |
+ VisitForStackValue(args->at(0)); |
+ VisitForStackValue(args->at(1)); |
+ VisitForStackValue(args->at(2)); |
+ VisitForStackValue(args->at(3)); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |
@@ -3992,6 +4077,18 @@ |
} |
+void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { |
+ // Load the arguments on the stack and call the runtime function. |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK(args->length() == 2); |
+ VisitForStackValue(args->at(0)); |
+ VisitForStackValue(args->at(1)); |
+ MathPowStub stub(isolate(), MathPowStub::ON_STACK); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 2); |
@@ -4017,6 +4114,20 @@ |
a1, JSValue::kValueOffset, a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); |
__ bind(&done); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(args->length(), 1); |
+ |
+ // Load the argument into a0 and call the stub. |
+ VisitForAccumulatorValue(args->at(0)); |
+ __ mov(a0, result_register()); |
+ |
+ NumberToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
context()->Plug(v0); |
} |
@@ -4145,6 +4256,19 @@ |
__ pop(a1); |
__ mov(a0, result_register()); // StringAddStub requires args in a0, a1. |
StringAddStub stub(isolate(), STRING_ADD_CHECK_BOTH, NOT_TENURED); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(2, args->length()); |
+ |
+ VisitForStackValue(args->at(0)); |
+ VisitForStackValue(args->at(1)); |
+ |
+ StringCompareStub stub(isolate()); |
__ CallStub(&stub); |
context()->Plug(v0); |
} |