Remove flags argument from EmitCallWithStub
R=ishell@chromium.org Review URL: https://codereview.chromium.org/135653003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
6b389902e1
commit
ca9ee7b53b
@ -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.
|
// Code common for calls using the call stub.
|
||||||
ZoneList<Expression*>* args = expr->arguments();
|
ZoneList<Expression*>* args = expr->arguments();
|
||||||
int arg_count = args->length();
|
int arg_count = args->length();
|
||||||
@ -2671,15 +2671,14 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
|
|||||||
// Record source position for debugger.
|
// Record source position for debugger.
|
||||||
SetSourcePosition(expr->position());
|
SetSourcePosition(expr->position());
|
||||||
|
|
||||||
// Record call targets in unoptimized code.
|
|
||||||
flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
|
|
||||||
Handle<Object> uninitialized =
|
Handle<Object> uninitialized =
|
||||||
TypeFeedbackCells::UninitializedSentinel(isolate());
|
TypeFeedbackCells::UninitializedSentinel(isolate());
|
||||||
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
||||||
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
||||||
__ mov(r2, Operand(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));
|
__ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
|
||||||
__ CallStub(&stub, expr->CallFeedbackId());
|
__ CallStub(&stub, expr->CallFeedbackId());
|
||||||
RecordJSReturnSite(expr);
|
RecordJSReturnSite(expr);
|
||||||
@ -2806,7 +2805,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|||||||
|
|
||||||
// The receiver is either the global receiver or an object found
|
// The receiver is either the global receiver or an object found
|
||||||
// by LoadContextSlot.
|
// by LoadContextSlot.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
} else if (property != NULL) {
|
} else if (property != NULL) {
|
||||||
{ PreservePositionScope scope(masm()->positions_recorder());
|
{ PreservePositionScope scope(masm()->positions_recorder());
|
||||||
VisitForStackValue(property->obj());
|
VisitForStackValue(property->obj());
|
||||||
@ -2826,7 +2825,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|||||||
__ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
|
__ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
|
||||||
__ push(r1);
|
__ push(r1);
|
||||||
// Emit function call.
|
// Emit function call.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -482,7 +482,7 @@ class FullCodeGenerator: public AstVisitor {
|
|||||||
void EmitReturnSequence();
|
void EmitReturnSequence();
|
||||||
|
|
||||||
// Platform-specific code sequences for calls
|
// 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 EmitCallWithIC(Call* expr, Handle<Object> name, ContextualMode mode);
|
||||||
void EmitKeyedCallWithIC(Call* expr, Expression* key);
|
void EmitKeyedCallWithIC(Call* expr, Expression* key);
|
||||||
|
|
||||||
|
@ -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.
|
// Code common for calls using the call stub.
|
||||||
ZoneList<Expression*>* args = expr->arguments();
|
ZoneList<Expression*>* args = expr->arguments();
|
||||||
int arg_count = args->length();
|
int arg_count = args->length();
|
||||||
@ -2625,15 +2625,14 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
|
|||||||
// Record source position for debugger.
|
// Record source position for debugger.
|
||||||
SetSourcePosition(expr->position());
|
SetSourcePosition(expr->position());
|
||||||
|
|
||||||
// Record call targets in unoptimized code.
|
|
||||||
flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
|
|
||||||
Handle<Object> uninitialized =
|
Handle<Object> uninitialized =
|
||||||
TypeFeedbackCells::UninitializedSentinel(isolate());
|
TypeFeedbackCells::UninitializedSentinel(isolate());
|
||||||
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
||||||
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
||||||
__ mov(ebx, 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));
|
__ mov(edi, Operand(esp, (arg_count + 1) * kPointerSize));
|
||||||
__ CallStub(&stub, expr->CallFeedbackId());
|
__ 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
|
// The receiver is either the global receiver or an object found by
|
||||||
// LoadContextSlot.
|
// LoadContextSlot.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
|
|
||||||
} else if (property != NULL) {
|
} else if (property != NULL) {
|
||||||
{ PreservePositionScope scope(masm()->positions_recorder());
|
{ PreservePositionScope scope(masm()->positions_recorder());
|
||||||
@ -2770,7 +2769,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|||||||
}
|
}
|
||||||
__ push(Immediate(isolate()->factory()->undefined_value()));
|
__ push(Immediate(isolate()->factory()->undefined_value()));
|
||||||
// Emit function call.
|
// Emit function call.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -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.
|
// Code common for calls using the call stub.
|
||||||
ZoneList<Expression*>* args = expr->arguments();
|
ZoneList<Expression*>* args = expr->arguments();
|
||||||
int arg_count = args->length();
|
int arg_count = args->length();
|
||||||
@ -2608,15 +2608,14 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
|
|||||||
// Record source position for debugger.
|
// Record source position for debugger.
|
||||||
SetSourcePosition(expr->position());
|
SetSourcePosition(expr->position());
|
||||||
|
|
||||||
// Record call targets in unoptimized code.
|
|
||||||
flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
|
|
||||||
Handle<Object> uninitialized =
|
Handle<Object> uninitialized =
|
||||||
TypeFeedbackCells::UninitializedSentinel(isolate());
|
TypeFeedbackCells::UninitializedSentinel(isolate());
|
||||||
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
|
||||||
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
|
||||||
__ Move(rbx, 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));
|
__ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize));
|
||||||
__ CallStub(&stub, expr->CallFeedbackId());
|
__ CallStub(&stub, expr->CallFeedbackId());
|
||||||
RecordJSReturnSite(expr);
|
RecordJSReturnSite(expr);
|
||||||
@ -2735,7 +2734,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|||||||
|
|
||||||
// The receiver is either the global receiver or an object found by
|
// The receiver is either the global receiver or an object found by
|
||||||
// LoadContextSlot.
|
// LoadContextSlot.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
} else if (property != NULL) {
|
} else if (property != NULL) {
|
||||||
{ PreservePositionScope scope(masm()->positions_recorder());
|
{ PreservePositionScope scope(masm()->positions_recorder());
|
||||||
VisitForStackValue(property->obj());
|
VisitForStackValue(property->obj());
|
||||||
@ -2754,7 +2753,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
|
|||||||
}
|
}
|
||||||
__ PushRoot(Heap::kUndefinedValueRootIndex);
|
__ PushRoot(Heap::kUndefinedValueRootIndex);
|
||||||
// Emit function call.
|
// Emit function call.
|
||||||
EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
|
EmitCallWithStub(expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user