| Index: src/ia32/codegen-ia32.cc
|
| ===================================================================
|
| --- src/ia32/codegen-ia32.cc (revision 6095)
|
| +++ src/ia32/codegen-ia32.cc (working copy)
|
| @@ -7691,6 +7691,13 @@
|
| __ test(tmp2.reg(), Immediate(kSmiTagMask));
|
| deferred->Branch(not_zero);
|
|
|
| + // Check that both indices are valid.
|
| + __ mov(tmp2.reg(), FieldOperand(object.reg(), JSArray::kLengthOffset));
|
| + __ cmp(tmp2.reg(), Operand(index1.reg()));
|
| + deferred->Branch(below_equal);
|
| + __ cmp(tmp2.reg(), Operand(index2.reg()));
|
| + deferred->Branch(below_equal);
|
| +
|
| // Bring addresses into index1 and index2.
|
| __ lea(index1.reg(), FixedArrayElementOperand(tmp1.reg(), index1.reg()));
|
| __ lea(index2.reg(), FixedArrayElementOperand(tmp1.reg(), index2.reg()));
|
| @@ -7922,7 +7929,8 @@
|
| void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) {
|
| ASSERT_EQ(args->length(), 1);
|
| Load(args->at(0));
|
| - TranscendentalCacheStub stub(TranscendentalCache::SIN);
|
| + TranscendentalCacheStub stub(TranscendentalCache::SIN,
|
| + TranscendentalCacheStub::TAGGED);
|
| Result result = frame_->CallStub(&stub, 1);
|
| frame_->Push(&result);
|
| }
|
| @@ -7931,7 +7939,8 @@
|
| void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
|
| ASSERT_EQ(args->length(), 1);
|
| Load(args->at(0));
|
| - TranscendentalCacheStub stub(TranscendentalCache::COS);
|
| + TranscendentalCacheStub stub(TranscendentalCache::COS,
|
| + TranscendentalCacheStub::TAGGED);
|
| Result result = frame_->CallStub(&stub, 1);
|
| frame_->Push(&result);
|
| }
|
| @@ -7940,7 +7949,8 @@
|
| void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) {
|
| ASSERT_EQ(args->length(), 1);
|
| Load(args->at(0));
|
| - TranscendentalCacheStub stub(TranscendentalCache::LOG);
|
| + TranscendentalCacheStub stub(TranscendentalCache::LOG,
|
| + TranscendentalCacheStub::TAGGED);
|
| Result result = frame_->CallStub(&stub, 1);
|
| frame_->Push(&result);
|
| }
|
| @@ -9150,7 +9160,7 @@
|
| case Token::INSTANCEOF: {
|
| if (!left_already_loaded) Load(left);
|
| Load(right);
|
| - InstanceofStub stub;
|
| + InstanceofStub stub(InstanceofStub::kNoFlags);
|
| Result answer = frame_->CallStub(&stub, 2);
|
| answer.ToRegister();
|
| __ test(answer.reg(), Operand(answer.reg()));
|
|
|