From 0fe2fbd173c5e547e021476428001cac6fcdf7a9 Mon Sep 17 00:00:00 2001 From: yangguo Date: Thu, 23 Jul 2015 04:45:57 -0700 Subject: [PATCH] Reduce duplicate code in full-codegen across platforms. R=mvstanton@chromium.org Committed: https://crrev.com/937d4efbf9c399339fdc8e041bec8e80baa7b58f Cr-Commit-Position: refs/heads/master@{#29798} Review URL: https://codereview.chromium.org/1255613002 Cr-Commit-Position: refs/heads/master@{#29805} --- src/arm/full-codegen-arm.cc | 111 -------------------------------------- src/arm64/full-codegen-arm64.cc | 110 ------------------------------------- src/full-codegen.cc | 111 ++++++++++++++++++++++++++++++++++++++ src/ia32/full-codegen-ia32.cc | 111 -------------------------------------- src/mips/full-codegen-mips.cc | 110 ------------------------------------- src/mips64/full-codegen-mips64.cc | 110 ------------------------------------- src/ppc/full-codegen-ppc.cc | 109 ------------------------------------- src/x64/full-codegen-x64.cc | 109 ------------------------------------- src/x87/full-codegen-x87.cc | 110 ------------------------------------- 9 files changed, 111 insertions(+), 880 deletions(-) diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index b2be863..34ac1a5 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -509,17 +509,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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); @@ -527,15 +516,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -void FullCodeGenerator::TestContext::Plug(Variable* var) const { - DCHECK(var->IsStackAllocated() || var->IsContextSlot()); - // For simplicity we always test the accumulator register. - codegen()->GetVar(result_register(), var); - codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); - codegen()->DoTest(this); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { } @@ -694,10 +674,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -966,35 +942,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. // The context is the first argument. @@ -1326,12 +1273,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3906,33 +3847,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(r0); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(r0); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 1); @@ -4078,19 +3992,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } - -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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(r0); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4254,18 +4155,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(r0); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc index 388e06a..10d1cc2 100644 --- a/src/arm64/full-codegen-arm64.cc +++ b/src/arm64/full-codegen-arm64.cc @@ -506,17 +506,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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); @@ -524,15 +513,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -void FullCodeGenerator::TestContext::Plug(Variable* var) const { - DCHECK(var->IsStackAllocated() || var->IsContextSlot()); - // For simplicity we always test the accumulator register. - codegen()->GetVar(result_register(), var); - codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); - codegen()->DoTest(this); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { // Root values have no side effects. } @@ -690,10 +670,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -967,35 +943,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. __ Mov(x11, Operand(pairs)); @@ -1318,12 +1265,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3616,33 +3557,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(x0); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(x0); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ASM_LOCATION("FullCodeGenerator::EmitValueOf"); ZoneList* args = expr->arguments(); @@ -3782,18 +3696,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the MathPow stub. - ZoneList* 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(x0); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -3965,18 +3867,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(x0); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ASM_LOCATION("FullCodeGenerator::EmitCallFunction"); ZoneList* args = expr->arguments(); diff --git a/src/full-codegen.cc b/src/full-codegen.cc index 361c1e5..2d7f6e8 100644 --- a/src/full-codegen.cc +++ b/src/full-codegen.cc @@ -274,6 +274,26 @@ bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) { } +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::TestContext::Plug(Variable* var) const { + DCHECK(var->IsStackAllocated() || var->IsContextSlot()); + // For simplicity we always test the accumulator register. + codegen()->GetVar(result_register(), var); + codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); + codegen()->DoTest(this); +} + + void FullCodeGenerator::EffectContext::Plug(Register reg) const { } @@ -296,6 +316,9 @@ void FullCodeGenerator::TestContext::Plug(Register reg) const { } +void FullCodeGenerator::EffectContext::Plug(bool flag) const {} + + void FullCodeGenerator::EffectContext::PlugTOS() const { __ Drop(1); } @@ -394,6 +417,41 @@ void FullCodeGenerator::VisitDeclarations( } +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) +} + + +void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { + Comment cmnt(masm_, "[ VariableProxy"); + EmitVariableLoad(expr); +} + + int FullCodeGenerator::DeclareGlobalsFlags() { DCHECK(DeclareGlobalsLanguageMode::is_valid(language_mode())); return DeclareGlobalsEvalFlag::encode(is_eval()) | @@ -402,6 +460,59 @@ int FullCodeGenerator::DeclareGlobalsFlags() { } +void FullCodeGenerator::EmitSubString(CallRuntime* expr) { + // Load the arguments on the stack and call the stub. + SubStringStub stub(isolate()); + ZoneList* args = expr->arguments(); + DCHECK(args->length() == 3); + VisitForStackValue(args->at(0)); + VisitForStackValue(args->at(1)); + VisitForStackValue(args->at(2)); + __ CallStub(&stub); + context()->Plug(result_register()); +} + + +void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { + // Load the arguments on the stack and call the stub. + RegExpExecStub stub(isolate()); + ZoneList* 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(result_register()); +} + + +void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { + // Load the arguments on the stack and call the runtime function. + ZoneList* 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(result_register()); +} + + +void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { + ZoneList* args = expr->arguments(); + DCHECK_EQ(2, args->length()); + + VisitForStackValue(args->at(0)); + VisitForStackValue(args->at(1)); + + StringCompareStub stub(isolate()); + __ CallStub(&stub); + context()->Plug(result_register()); +} + + bool RecordStatementPosition(MacroAssembler* masm, int pos) { if (pos == RelocInfo::kNoPosition) return false; masm->positions_recorder()->RecordStatementPosition(pos); diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index 7627267..588b04e 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -468,17 +468,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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()); MemOperand operand = codegen()->VarOperand(var, result_register()); @@ -487,14 +476,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -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); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { UNREACHABLE(); // Not used on IA32. } @@ -645,10 +626,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Handle value = flag ? isolate()->factory()->true_value() @@ -909,35 +886,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. __ push(esi); // The context is the first argument. @@ -1254,12 +1202,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3797,33 +3739,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(eax); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(eax); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 1); @@ -3971,19 +3886,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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(eax); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4152,19 +4054,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(eax); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index beaff83..d0904a6 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -504,17 +504,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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); @@ -522,14 +511,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -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); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { } @@ -690,10 +671,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -966,35 +943,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. // The context is the first argument. @@ -1320,12 +1268,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3893,33 +3835,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* 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* 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* args = expr->arguments(); DCHECK(args->length() == 1); @@ -4075,18 +3990,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4259,19 +4162,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(v0); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc index 94a67b5..1aacde6 100644 --- a/src/mips64/full-codegen-mips64.cc +++ b/src/mips64/full-codegen-mips64.cc @@ -500,17 +500,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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); @@ -518,14 +507,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -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); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { } @@ -686,10 +667,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -962,35 +939,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. // The context is the first argument. @@ -1316,12 +1264,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3894,33 +3836,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* 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* 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* args = expr->arguments(); DCHECK(args->length() == 1); @@ -4077,18 +3992,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4261,19 +4164,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(v0); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/ppc/full-codegen-ppc.cc b/src/ppc/full-codegen-ppc.cc index 44fe92a..5bb755f 100644 --- a/src/ppc/full-codegen-ppc.cc +++ b/src/ppc/full-codegen-ppc.cc @@ -497,17 +497,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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); @@ -515,15 +504,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -void FullCodeGenerator::TestContext::Plug(Variable* var) const { - DCHECK(var->IsStackAllocated() || var->IsContextSlot()); - // For simplicity we always test the accumulator register. - codegen()->GetVar(result_register(), var); - codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); - codegen()->DoTest(this); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const {} @@ -673,9 +653,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const {} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -927,35 +904,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. // The context is the first argument. @@ -1288,12 +1236,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3914,33 +3856,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(r3); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(r3); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 1); @@ -4086,18 +4001,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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(r3); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4252,18 +4155,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(r3); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index 36a7eed..acd47cb 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -472,17 +472,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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()); MemOperand operand = codegen()->VarOperand(var, result_register()); @@ -490,13 +479,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -void FullCodeGenerator::TestContext::Plug(Variable* var) const { - codegen()->GetVar(result_register(), var); - codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL); - codegen()->DoTest(this); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { } @@ -659,10 +641,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Heap::RootListIndex value_root_index = flag ? Heap::kTrueValueRootIndex : Heap::kFalseValueRootIndex; @@ -923,35 +901,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { - VariableProxy* proxy = declaration->proxy(); - Variable* variable = proxy->var(); - switch (variable->location()) { - case VariableLocation::UNALLOCATED: - case VariableLocation::GLOBAL: - // 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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. __ Push(rsi); // The context is the first argument. @@ -1281,12 +1230,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3783,33 +3726,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(rax); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(rax); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 1); @@ -3962,18 +3878,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* 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(rax); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4141,19 +4045,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(rax); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc index 1e6a88c..dca00d2 100644 --- a/src/x87/full-codegen-x87.cc +++ b/src/x87/full-codegen-x87.cc @@ -465,17 +465,6 @@ void FullCodeGenerator::EmitReturnSequence() { } -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()); MemOperand operand = codegen()->VarOperand(var, result_register()); @@ -484,14 +473,6 @@ void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { } -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); -} - - void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { UNREACHABLE(); // Not used on X87. } @@ -642,10 +623,6 @@ void FullCodeGenerator::TestContext::Plug(Label* materialize_true, } -void FullCodeGenerator::EffectContext::Plug(bool flag) const { -} - - void FullCodeGenerator::AccumulatorValueContext::Plug(bool flag) const { Handle value = flag ? isolate()->factory()->true_value() @@ -902,35 +879,6 @@ void FullCodeGenerator::VisitFunctionDeclaration( } -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) -} - - void FullCodeGenerator::DeclareGlobals(Handle pairs) { // Call the runtime to declare the globals. __ push(esi); // The context is the first argument. @@ -1247,12 +1195,6 @@ void FullCodeGenerator::EmitNewClosure(Handle info, } -void FullCodeGenerator::VisitVariableProxy(VariableProxy* expr) { - Comment cmnt(masm_, "[ VariableProxy"); - EmitVariableLoad(expr); -} - - void FullCodeGenerator::EmitSetHomeObjectIfNeeded(Expression* initializer, int offset, FeedbackVectorICSlot slot) { @@ -3788,33 +3730,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { } -void FullCodeGenerator::EmitSubString(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - SubStringStub stub(isolate()); - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 3); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - VisitForStackValue(args->at(2)); - __ CallStub(&stub); - context()->Plug(eax); -} - - -void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { - // Load the arguments on the stack and call the stub. - RegExpExecStub stub(isolate()); - ZoneList* 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(eax); -} - - void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 1); @@ -3962,18 +3877,6 @@ void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { } -void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { - // Load the arguments on the stack and call the runtime function. - ZoneList* args = expr->arguments(); - DCHECK(args->length() == 2); - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - __ CallRuntime(Runtime::kMathPowSlow, 2); - context()->Plug(eax); -} - - void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() == 2); @@ -4142,19 +4045,6 @@ void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { } -void FullCodeGenerator::EmitStringCompare(CallRuntime* expr) { - ZoneList* args = expr->arguments(); - DCHECK_EQ(2, args->length()); - - VisitForStackValue(args->at(0)); - VisitForStackValue(args->at(1)); - - StringCompareStub stub(isolate()); - __ CallStub(&stub); - context()->Plug(eax); -} - - void FullCodeGenerator::EmitCallFunction(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK(args->length() >= 2); -- 2.7.4