diff options
author | Feng Qian <fqian@google.com> | 2009-07-09 08:57:09 -0700 |
---|---|---|
committer | Feng Qian <fqian@google.com> | 2009-07-09 08:57:09 -0700 |
commit | 05d54ac46867d1de44079cc33886aeb345381df5 (patch) | |
tree | 54de21ce9870ed8c28709eac4cc346df3776ff09 /V8Binding | |
parent | 092781fb4111909137004effd195aa2fb5db75a1 (diff) | |
download | external_webkit-05d54ac46867d1de44079cc33886aeb345381df5.zip external_webkit-05d54ac46867d1de44079cc33886aeb345381df5.tar.gz external_webkit-05d54ac46867d1de44079cc33886aeb345381df5.tar.bz2 |
Pickup two ARM fixes.
http://codereview.chromium.org/155272
http://codereview.chromium.org/149266
Next drop of V8 will get both.
Diffstat (limited to 'V8Binding')
-rw-r--r-- | V8Binding/v8/src/arm/codegen-arm.cc | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/V8Binding/v8/src/arm/codegen-arm.cc b/V8Binding/v8/src/arm/codegen-arm.cc index a0e485b..3f7ccf5 100644 --- a/V8Binding/v8/src/arm/codegen-arm.cc +++ b/V8Binding/v8/src/arm/codegen-arm.cc @@ -2421,25 +2421,21 @@ void CodeGenerator::VisitConditional(Conditional* node) { Comment cmnt(masm_, "[ Conditional"); JumpTarget then; JumpTarget else_; - JumpTarget exit; LoadConditionAndSpill(node->condition(), NOT_INSIDE_TYPEOF, &then, &else_, true); - if (frame_ != NULL) { + if (has_valid_frame()) { Branch(false, &else_); } - if (frame_ != NULL || then.is_linked()) { + if (has_valid_frame() || then.is_linked()) { then.Bind(); LoadAndSpill(node->then_expression(), typeof_state()); } - if (frame_ != NULL) { - exit.Jump(); - } if (else_.is_linked()) { + JumpTarget exit; + if (has_valid_frame()) exit.Jump(); else_.Bind(); LoadAndSpill(node->else_expression(), typeof_state()); - } - if (exit.is_linked()) { - exit.Bind(); + if (exit.is_linked()) exit.Bind(); } ASSERT(frame_->height() == original_height + 1); } @@ -3463,8 +3459,22 @@ void CodeGenerator::GenerateIsArray(ZoneList<Expression*>* args) { void CodeGenerator::GenerateIsConstructCall(ZoneList<Expression*>* args) { VirtualFrame::SpilledScope spilled_scope; ASSERT(args->length() == 0); - frame_->CallRuntime(Runtime::kIsConstructCall, 0); - frame_->EmitPush(r0); + + // Get the frame pointer for the calling frame. + __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); + + // Skip the arguments adaptor frame if it exists. + Label check_frame_marker; + __ ldr(r1, MemOperand(r2, StandardFrameConstants::kContextOffset)); + __ cmp(r1, Operand(ArgumentsAdaptorFrame::SENTINEL)); + __ b(ne, &check_frame_marker); + __ ldr(r2, MemOperand(r2, StandardFrameConstants::kCallerFPOffset)); + + // Check the marker in the calling frame. + __ bind(&check_frame_marker); + __ ldr(r1, MemOperand(r2, StandardFrameConstants::kMarkerOffset)); + __ cmp(r1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); + cc_reg_ = eq; } @@ -3601,9 +3611,8 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) { false_target(), true_target(), true); - // LoadConditionAndSpill might emit only unconditional jumps to - // the targets in which case cc_reg_ is not set. When that - // happens, don't attempt to negate the condition. + // LoadCondition may (and usually does) leave a test and branch to + // be emitted by the caller. In that case, negate the condition. if (has_cc()) cc_reg_ = NegateCondition(cc_reg_); } else if (op == Token::DELETE) { |