| Index: src/arm/lithium-arm.cc
|
| ===================================================================
|
| --- src/arm/lithium-arm.cc (revision 6904)
|
| +++ src/arm/lithium-arm.cc (working copy)
|
| @@ -206,6 +206,13 @@
|
| }
|
|
|
|
|
| +void LIsObjectAndBranch::PrintDataTo(StringStream* stream) const {
|
| + stream->Add("if is_object(");
|
| + input()->PrintTo(stream);
|
| + stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| +}
|
| +
|
| +
|
| void LIsSmiAndBranch::PrintDataTo(StringStream* stream) const {
|
| stream->Add("if is_smi(");
|
| input()->PrintTo(stream);
|
| @@ -460,12 +467,6 @@
|
| }
|
|
|
|
|
| -int LChunk::NearestNextGapPos(int index) const {
|
| - while (!IsGapAt(index)) index++;
|
| - return index;
|
| -}
|
| -
|
| -
|
| void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
|
| GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to);
|
| }
|
| @@ -1244,6 +1245,17 @@
|
| temp,
|
| first_id,
|
| second_id);
|
| + } else if (v->IsIsObject()) {
|
| + HIsObject* compare = HIsObject::cast(v);
|
| + ASSERT(compare->value()->representation().IsTagged());
|
| +
|
| + LOperand* temp1 = TempRegister();
|
| + LOperand* temp2 = TempRegister();
|
| + return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
|
| + temp1,
|
| + temp2,
|
| + first_id,
|
| + second_id);
|
| } else if (v->IsCompareJSObjectEq()) {
|
| HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
|
| return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
|
| @@ -1304,7 +1316,8 @@
|
|
|
| LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
| LInstruction* result =
|
| - new LInstanceOf(Use(instr->left()), Use(instr->right()));
|
| + new LInstanceOf(UseFixed(instr->left(), r1),
|
| + UseFixed(instr->right(), r0));
|
| return MarkAsCall(DefineFixed(result, r0), instr);
|
| }
|
|
|
| @@ -1347,7 +1360,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
| - MathFunctionId op = instr->op();
|
| + BuiltinFunctionId op = instr->op();
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| LInstruction* result = new LUnaryMathOperation(input);
|
| switch (op) {
|
| @@ -1357,6 +1370,18 @@
|
| return AssignEnvironment(DefineAsRegister(result));
|
| case kMathSqrt:
|
| return DefineSameAsFirst(result);
|
| + case kMathPowHalf:
|
| + Abort("MathPowHalf LUnaryMathOperation not implemented");
|
| + return NULL;
|
| + case kMathLog:
|
| + Abort("MathLog LUnaryMathOperation not implemented");
|
| + return NULL;
|
| + case kMathCos:
|
| + Abort("MathCos LUnaryMathOperation not implemented");
|
| + return NULL;
|
| + case kMathSin:
|
| + Abort("MathSin LUnaryMathOperation not implemented");
|
| + return NULL;
|
| default:
|
| UNREACHABLE();
|
| return NULL;
|
| @@ -1554,6 +1579,12 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
| + Abort("LPower instruction not implemented on ARM");
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
|
| Token::Value op = instr->token();
|
| if (instr->left()->representation().IsInteger32()) {
|
| @@ -1594,6 +1625,14 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
|
| + ASSERT(instr->value()->representation().IsTagged());
|
| + LOperand* value = UseRegisterAtStart(instr->value());
|
| +
|
| + return DefineAsRegister(new LIsObject(value, TempRegister()));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
|
| ASSERT(instr->value()->representation().IsTagged());
|
| LOperand* value = UseAtStart(instr->value());
|
| @@ -1688,11 +1727,13 @@
|
| } else if (from.IsDouble()) {
|
| if (to.IsTagged()) {
|
| LOperand* value = UseRegister(instr->value());
|
| - LOperand* temp = TempRegister();
|
| + LOperand* temp1 = TempRegister();
|
| + LOperand* temp2 = TempRegister();
|
|
|
| - // Make sure that temp and result_temp are different registers.
|
| + // Make sure that the temp and result_temp registers are
|
| + // different.
|
| LUnallocated* result_temp = TempRegister();
|
| - LInstruction* result = new LNumberTagD(value, temp);
|
| + LInstruction* result = new LNumberTagD(value, temp1, temp2);
|
| Define(result, result_temp);
|
| return AssignPointerMap(result);
|
| } else {
|
|
|