From: svenpanne@chromium.org Date: Fri, 29 Apr 2011 20:07:41 +0000 (+0000) Subject: Removed InvokeJSFlags enum, we already have InvokeFlag for the same purpose. X-Git-Tag: upstream/4.7.83~19535 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b60baa0b70a983ae08b24ad7542f9db1a417914a;p=platform%2Fupstream%2Fv8.git Removed InvokeJSFlags enum, we already have InvokeFlag for the same purpose. Review URL: http://codereview.chromium.org/6880321 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc index 5235dd3..e05ef51 100644 --- a/src/arm/builtins-arm.cc +++ b/src/arm/builtins-arm.cc @@ -584,7 +584,7 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) { __ IncrementCounter(counters->string_ctor_conversions(), 1, r3, r4); __ EnterInternalFrame(); __ push(r0); - __ InvokeBuiltin(Builtins::TO_STRING, CALL_JS); + __ InvokeBuiltin(Builtins::TO_STRING, CALL_FUNCTION); __ LeaveInternalFrame(); __ pop(function); __ mov(argument, r0); @@ -1270,7 +1270,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { __ push(r0); __ push(r2); - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS); + __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); __ mov(r2, r0); __ pop(r0); @@ -1378,7 +1378,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { __ push(r0); __ ldr(r0, MemOperand(fp, kArgsOffset)); // get the args array __ push(r0); - __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_JS); + __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION); // Check the stack for overflow. We are not trying need to catch // interruptions (e.g. debug break and preemption) here, so the "real stack @@ -1396,7 +1396,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { __ ldr(r1, MemOperand(fp, kFunctionOffset)); __ push(r1); __ push(r0); - __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_JS); + __ InvokeBuiltin(Builtins::APPLY_OVERFLOW, CALL_FUNCTION); // End of stack check. // Push current limit and index. @@ -1442,7 +1442,7 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { // r0: receiver __ bind(&call_to_object); __ push(r0); - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS); + __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); __ b(&push_receiver); // Use the current global receiver object as the receiver. diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 45d9f47..1179aac 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -79,7 +79,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) { __ bind(&call_builtin); __ push(r0); - __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_JS); + __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION); } @@ -1599,7 +1599,7 @@ void CompareStub::Generate(MacroAssembler* masm) { // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) // tagged as a small integer. - __ InvokeBuiltin(native, JUMP_JS); + __ InvokeBuiltin(native, JUMP_FUNCTION); } @@ -1965,10 +1965,10 @@ void TypeRecordingUnaryOpStub::GenerateGenericCodeFallback( __ push(r0); switch (op_) { case Token::SUB: - __ InvokeBuiltin(Builtins::UNARY_MINUS, JUMP_JS); + __ InvokeBuiltin(Builtins::UNARY_MINUS, JUMP_FUNCTION); break; case Token::BIT_NOT: - __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_JS); + __ InvokeBuiltin(Builtins::BIT_NOT, JUMP_FUNCTION); break; default: UNREACHABLE(); @@ -2902,37 +2902,37 @@ void TypeRecordingBinaryOpStub::GenerateCallRuntime(MacroAssembler* masm) { GenerateRegisterArgsPush(masm); switch (op_) { case Token::ADD: - __ InvokeBuiltin(Builtins::ADD, JUMP_JS); + __ InvokeBuiltin(Builtins::ADD, JUMP_FUNCTION); break; case Token::SUB: - __ InvokeBuiltin(Builtins::SUB, JUMP_JS); + __ InvokeBuiltin(Builtins::SUB, JUMP_FUNCTION); break; case Token::MUL: - __ InvokeBuiltin(Builtins::MUL, JUMP_JS); + __ InvokeBuiltin(Builtins::MUL, JUMP_FUNCTION); break; case Token::DIV: - __ InvokeBuiltin(Builtins::DIV, JUMP_JS); + __ InvokeBuiltin(Builtins::DIV, JUMP_FUNCTION); break; case Token::MOD: - __ InvokeBuiltin(Builtins::MOD, JUMP_JS); + __ InvokeBuiltin(Builtins::MOD, JUMP_FUNCTION); break; case Token::BIT_OR: - __ InvokeBuiltin(Builtins::BIT_OR, JUMP_JS); + __ InvokeBuiltin(Builtins::BIT_OR, JUMP_FUNCTION); break; case Token::BIT_AND: - __ InvokeBuiltin(Builtins::BIT_AND, JUMP_JS); + __ InvokeBuiltin(Builtins::BIT_AND, JUMP_FUNCTION); break; case Token::BIT_XOR: - __ InvokeBuiltin(Builtins::BIT_XOR, JUMP_JS); + __ InvokeBuiltin(Builtins::BIT_XOR, JUMP_FUNCTION); break; case Token::SAR: - __ InvokeBuiltin(Builtins::SAR, JUMP_JS); + __ InvokeBuiltin(Builtins::SAR, JUMP_FUNCTION); break; case Token::SHR: - __ InvokeBuiltin(Builtins::SHR, JUMP_JS); + __ InvokeBuiltin(Builtins::SHR, JUMP_FUNCTION); break; case Token::SHL: - __ InvokeBuiltin(Builtins::SHL, JUMP_JS); + __ InvokeBuiltin(Builtins::SHL, JUMP_FUNCTION); break; default: UNREACHABLE(); @@ -3821,11 +3821,11 @@ void InstanceofStub::Generate(MacroAssembler* masm) { if (HasArgsInRegisters()) { __ Push(r0, r1); } - __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_JS); + __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); } else { __ EnterInternalFrame(); __ Push(r0, r1); - __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_JS); + __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); __ LeaveInternalFrame(); __ cmp(r0, Operand(0)); __ LoadRoot(r0, Heap::kTrueValueRootIndex, eq); @@ -4476,7 +4476,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { __ bind(&receiver_is_value); __ EnterInternalFrame(); __ push(r1); - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS); + __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); __ LeaveInternalFrame(); __ str(r0, MemOperand(sp, argc_ * kPointerSize)); @@ -5777,7 +5777,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { if (call_builtin.is_linked()) { __ bind(&call_builtin); - __ InvokeBuiltin(builtin_id, JUMP_JS); + __ InvokeBuiltin(builtin_id, JUMP_FUNCTION); } } diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index 608934f..68a2355 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -915,7 +915,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { __ b(hs, &done_convert); __ bind(&convert); __ push(r0); - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_JS); + __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); __ bind(&done_convert); __ push(r0); @@ -1039,7 +1039,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { // just skip it. __ push(r1); // Enumerable. __ push(r3); // Current entry. - __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_JS); + __ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION); __ mov(r3, Operand(r0), SetCC); __ b(eq, loop_statement.continue_target()); @@ -3700,7 +3700,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { VisitForStackValue(prop->key()); __ mov(r1, Operand(Smi::FromInt(strict_mode_flag()))); __ push(r1); - __ InvokeBuiltin(Builtins::DELETE, CALL_JS); + __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); context()->Plug(r0); } } else if (var != NULL) { @@ -3712,7 +3712,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { __ mov(r1, Operand(var->name())); __ mov(r0, Operand(Smi::FromInt(kNonStrictMode))); __ Push(r2, r1, r0); - __ InvokeBuiltin(Builtins::DELETE, CALL_JS); + __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); context()->Plug(r0); } else if (var->AsSlot() != NULL && var->AsSlot()->type() != Slot::LOOKUP) { @@ -4140,7 +4140,7 @@ void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { switch (op) { case Token::IN: VisitForStackValue(expr->right()); - __ InvokeBuiltin(Builtins::IN, CALL_JS); + __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); PrepareForBailoutBeforeSplit(TOS_REG, false, NULL, NULL); __ LoadRoot(ip, Heap::kTrueValueRootIndex); __ cmp(r0, ip); diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 129a0b6..c6b40ee 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -4256,7 +4256,7 @@ void LCodeGen::DoDeleteProperty(LDeleteProperty* instr) { SafepointGenerator safepoint_generator(this, pointers, env->deoptimization_index()); - __ InvokeBuiltin(Builtins::DELETE, CALL_JS, &safepoint_generator); + __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION, &safepoint_generator); } @@ -4272,7 +4272,7 @@ void LCodeGen::DoIn(LIn* instr) { SafepointGenerator safepoint_generator(this, pointers, env->deoptimization_index()); - __ InvokeBuiltin(Builtins::IN, CALL_JS, &safepoint_generator); + __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, &safepoint_generator); } diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc index de0dac2..eeaba73 100644 --- a/src/arm/macro-assembler-arm.cc +++ b/src/arm/macro-assembler-arm.cc @@ -2313,15 +2313,15 @@ MaybeObject* MacroAssembler::TryJumpToExternalReference( void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flags, + InvokeFlag flag, CallWrapper* call_wrapper) { GetBuiltinEntry(r2, id); - if (flags == CALL_JS) { + if (flag == CALL_FUNCTION) { if (call_wrapper != NULL) call_wrapper->BeforeCall(CallSize(r2)); Call(r2); if (call_wrapper != NULL) call_wrapper->AfterCall(); } else { - ASSERT(flags == JUMP_JS); + ASSERT(flag == JUMP_FUNCTION); Jump(r2); } } diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h index 9856716..7d29757 100644 --- a/src/arm/macro-assembler-arm.h +++ b/src/arm/macro-assembler-arm.h @@ -55,12 +55,6 @@ static inline Operand SmiUntagOperand(Register object) { const Register cp = { 8 }; // JavaScript context pointer const Register roots = { 10 }; // Roots array pointer. -enum InvokeJSFlags { - CALL_JS, - JUMP_JS -}; - - // Flags used for the AllocateInNewSpace functions. enum AllocationFlags { // No special flags. @@ -807,7 +801,7 @@ class MacroAssembler: public Assembler { // Invoke specified builtin JavaScript function. Adds an entry to // the unresolved list if the name does not resolve. void InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flags, + InvokeFlag flag, CallWrapper* call_wrapper = NULL); // Store the code object for the given builtin in the target register and diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc index bd4ab48..1d7752d 100644 --- a/src/mips/macro-assembler-mips.cc +++ b/src/mips/macro-assembler-mips.cc @@ -2641,14 +2641,14 @@ void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flags, + InvokeFlag flag, PostCallGenerator* post_call_generator) { GetBuiltinEntry(t9, id); - if (flags == CALL_JS) { + if (flag == CALL_FUNCTION) { Call(t9); if (post_call_generator != NULL) post_call_generator->Generate(); } else { - ASSERT(flags == JUMP_JS); + ASSERT(flag == JUMP_FUNCTION); Jump(t9); } } diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h index 7ff9e17..49adbb1 100644 --- a/src/mips/macro-assembler-mips.h +++ b/src/mips/macro-assembler-mips.h @@ -59,11 +59,6 @@ const Register fp = s8_fp; // Alias fp const Register condReg1 = s4; const Register condReg2 = s5; -enum InvokeJSFlags { - CALL_JS, - JUMP_JS -}; - // Flags used for the AllocateInNewSpace functions. enum AllocationFlags { @@ -775,7 +770,7 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) // Invoke specified builtin JavaScript function. Adds an entry to // the unresolved list if the name does not resolve. void InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flags, + InvokeFlag flag, PostCallGenerator* post_call_generator = NULL); // Store the code object for the given builtin in the target register and diff --git a/src/mips/virtual-frame-mips.cc b/src/mips/virtual-frame-mips.cc index 22fe9f0..48b58c1 100644 --- a/src/mips/virtual-frame-mips.cc +++ b/src/mips/virtual-frame-mips.cc @@ -128,7 +128,7 @@ void VirtualFrame::DebugBreak() { void VirtualFrame::InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flags, + InvokeFlag flag, int arg_count) { UNIMPLEMENTED_MIPS(); } diff --git a/src/mips/virtual-frame-mips.h b/src/mips/virtual-frame-mips.h index cf30b09..8aad057 100644 --- a/src/mips/virtual-frame-mips.h +++ b/src/mips/virtual-frame-mips.h @@ -295,7 +295,7 @@ class VirtualFrame : public ZoneObject { // Invoke builtin given the number of arguments it expects on (and // removes from) the stack. void InvokeBuiltin(Builtins::JavaScript id, - InvokeJSFlags flag, + InvokeFlag flag, int arg_count); // Call load IC. Receiver is on the stack and is consumed. Result is returned