Reviewers: Jakob, Toon Verwaest, Paul Lind,
Message:
PTAL
Description:
Reland "Remove flags argument from EmitCallWithStub" and "MIPS: Remove flags
argument from EmitCallWithStub.""
This reverts commit r18606.
BUG=
[email protected]
Please review this at https://codereview.chromium.org/139013005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+21, -25 lines):
M src/arm/full-codegen-arm.cc
M src/full-codegen.h
M src/ia32/full-codegen-ia32.cc
M src/mips/full-codegen-mips.cc
M src/x64/full-codegen-x64.cc
Index: src/arm/full-codegen-arm.cc
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
index
68a8d70ecd27b63cb80b0ff62c0570e56b641994..b787f69c50cb3a79bda22b3cd27de0dcb8c5ff03
100644
--- a/src/arm/full-codegen-arm.cc
+++ b/src/arm/full-codegen-arm.cc
@@ -2659,7 +2659,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call*
expr,
}
-void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags
flags) {
+void FullCodeGenerator::EmitCallWithStub(Call* expr) {
// Code common for calls using the call stub.
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
@@ -2671,15 +2671,14 @@ void FullCodeGenerator::EmitCallWithStub(Call*
expr, CallFunctionFlags flags) {
// Record source position for debugger.
SetSourcePosition(expr->position());
- // Record call targets in unoptimized code.
- flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
Handle<Object> uninitialized =
TypeFeedbackCells::UninitializedSentinel(isolate());
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
__ mov(r2, Operand(cell));
- CallFunctionStub stub(arg_count, flags);
+ // Record call targets in unoptimized code.
+ CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ CallStub(&stub, expr->CallFeedbackId());
RecordJSReturnSite(expr);
@@ -2806,7 +2805,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
// The receiver is either the global receiver or an object found
// by LoadContextSlot.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
} else if (property != NULL) {
{ PreservePositionScope scope(masm()->positions_recorder());
VisitForStackValue(property->obj());
@@ -2826,7 +2825,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
__ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
__ push(r1);
// Emit function call.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
}
#ifdef DEBUG
Index: src/full-codegen.h
diff --git a/src/full-codegen.h b/src/full-codegen.h
index
edf333dee265c0c2c604b0d03a96c14fb5933bda..12f355abc5297669404f07f1b81cb93d2e53f695
100644
--- a/src/full-codegen.h
+++ b/src/full-codegen.h
@@ -482,7 +482,7 @@ class FullCodeGenerator: public AstVisitor {
void EmitReturnSequence();
// Platform-specific code sequences for calls
- void EmitCallWithStub(Call* expr, CallFunctionFlags flags);
+ void EmitCallWithStub(Call* expr);
void EmitCallWithIC(Call* expr, Handle<Object> name, ContextualMode
mode);
void EmitKeyedCallWithIC(Call* expr, Expression* key);
Index: src/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index
7159d5c84b21532619907903b911e3aab1d83a60..14e3df61d10a867966d0f69c945263a4fb8f73bb
100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -2613,7 +2613,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call*
expr,
}
-void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags
flags) {
+void FullCodeGenerator::EmitCallWithStub(Call* expr) {
// Code common for calls using the call stub.
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
@@ -2625,15 +2625,14 @@ void FullCodeGenerator::EmitCallWithStub(Call*
expr, CallFunctionFlags flags) {
// Record source position for debugger.
SetSourcePosition(expr->position());
- // Record call targets in unoptimized code.
- flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
Handle<Object> uninitialized =
TypeFeedbackCells::UninitializedSentinel(isolate());
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
__ mov(ebx, cell);
- CallFunctionStub stub(arg_count, flags);
+ // Record call targets in unoptimized code.
+ CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
__ CallStub(&stub, expr->CallFeedbackId());
@@ -2749,7 +2748,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
// The receiver is either the global receiver or an object found by
// LoadContextSlot.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
} else if (property != NULL) {
{ PreservePositionScope scope(masm()->positions_recorder());
@@ -2770,7 +2769,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
}
__ push(Immediate(isolate()->factory()->undefined_value()));
// Emit function call.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
}
#ifdef DEBUG
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
89a4168c803f5fa8b47300061fc8382232d6c748..1303fba5385530dc80fbea18f3ce96653cc1565b
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -2693,7 +2693,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call*
expr,
}
-void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags
flags) {
+void FullCodeGenerator::EmitCallWithStub(Call* expr) {
// Code common for calls using the call stub.
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
@@ -2705,15 +2705,14 @@ void FullCodeGenerator::EmitCallWithStub(Call*
expr, CallFunctionFlags flags) {
// Record source position for debugger.
SetSourcePosition(expr->position());
- // Record call targets.
- flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
Handle<Object> uninitialized =
TypeFeedbackCells::UninitializedSentinel(isolate());
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
__ li(a2, Operand(cell));
- CallFunctionStub stub(arg_count, flags);
+ // Record call targets in unoptimized code.
+ CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ CallStub(&stub, expr->CallFeedbackId());
RecordJSReturnSite(expr);
@@ -2839,7 +2838,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
// The receiver is either the global receiver or an object found
// by LoadContextSlot.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
} else if (property != NULL) {
{ PreservePositionScope scope(masm()->positions_recorder());
VisitForStackValue(property->obj());
@@ -2859,7 +2858,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
__ LoadRoot(a1, Heap::kUndefinedValueRootIndex);
__ push(a1);
// Emit function call.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
}
#ifdef DEBUG
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index
e4d982893f82c58df87b2995ac24a8b133b64f0c..3b4c07c89c9f9a22a720463119c82834db915352
100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -2596,7 +2596,7 @@ void FullCodeGenerator::EmitKeyedCallWithIC(Call*
expr,
}
-void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags
flags) {
+void FullCodeGenerator::EmitCallWithStub(Call* expr) {
// Code common for calls using the call stub.
ZoneList<Expression*>* args = expr->arguments();
int arg_count = args->length();
@@ -2608,15 +2608,14 @@ void FullCodeGenerator::EmitCallWithStub(Call*
expr, CallFunctionFlags flags) {
// Record source position for debugger.
SetSourcePosition(expr->position());
- // Record call targets in unoptimized code.
- flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
Handle<Object> uninitialized =
TypeFeedbackCells::UninitializedSentinel(isolate());
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
__ Move(rbx, cell);
- CallFunctionStub stub(arg_count, flags);
+ // Record call targets in unoptimized code.
+ CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
__ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
__ CallStub(&stub, expr->CallFeedbackId());
RecordJSReturnSite(expr);
@@ -2735,7 +2734,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
// The receiver is either the global receiver or an object found by
// LoadContextSlot.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
} else if (property != NULL) {
{ PreservePositionScope scope(masm()->positions_recorder());
VisitForStackValue(property->obj());
@@ -2754,7 +2753,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
}
__ PushRoot(Heap::kUndefinedValueRootIndex);
// Emit function call.
- EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
+ EmitCallWithStub(expr);
}
#ifdef DEBUG
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.