Index: src/arm/codegen-arm.cc |
=================================================================== |
--- src/arm/codegen-arm.cc (revision 5357) |
+++ src/arm/codegen-arm.cc (working copy) |
@@ -5636,7 +5636,28 @@ |
} |
+void CodeGenerator::GenerateHasCachedArrayIndex(ZoneList<Expression*>* args) { |
+ ASSERT(args->length() == 1); |
+ Load(args->at(0)); |
+ Register value = frame_->PopToRegister(); |
+ Register tmp = frame_->scratch0(); |
+ __ ldr(tmp, FieldMemOperand(value, String::kHashFieldOffset)); |
+ __ tst(tmp, Operand(String::kContainsCachedArrayIndexMask)); |
+ cc_reg_ = eq; |
+} |
+ |
+void CodeGenerator::GenerateGetCachedArrayIndex(ZoneList<Expression*>* args) { |
+ ASSERT(args->length() == 1); |
+ Load(args->at(0)); |
+ Register value = frame_->PopToRegister(); |
+ |
+ __ ldr(value, FieldMemOperand(value, String::kHashFieldOffset)); |
+ __ IndexFromHash(value, value); |
+ frame_->EmitPush(value); |
+} |
+ |
+ |
void CodeGenerator::VisitCallRuntime(CallRuntime* node) { |
#ifdef DEBUG |
int original_height = frame_->height(); |