| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 672b46bb2568859538118bc11e82d28c74f877d1..68ef3291b6f868d02fbe892ad88790abc40f44b0 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -4321,6 +4321,35 @@ void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
|
| }
|
|
|
|
|
| +void FullCodeGenerator::EmitHasFastPackedElements(CallRuntime* expr) {
|
| + ZoneList<Expression*>* args = expr->arguments();
|
| + DCHECK(args->length() == 1);
|
| +
|
| + VisitForAccumulatorValue(args->at(0));
|
| +
|
| + Label materialize_true, materialize_false;
|
| + Label* if_true = NULL;
|
| + Label* if_false = NULL;
|
| + Label* fall_through = NULL;
|
| + context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
|
| + &if_false, &fall_through);
|
| +
|
| + __ JumpIfSmi(eax, if_false);
|
| + __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset));
|
| + __ movzx_b(eax, FieldOperand(eax, Map::kBitField2Offset));
|
| + __ shr(eax, Map::ElementsKindBits::kShift);
|
| + __ cmp(eax, Immediate(FAST_SMI_ELEMENTS));
|
| + __ j(equal, if_true);
|
| + __ cmp(eax, Immediate(FAST_ELEMENTS));
|
| + __ j(equal, if_true);
|
| + __ cmp(eax, Immediate(FAST_DOUBLE_ELEMENTS));
|
| + PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| + Split(equal, if_true, if_false, fall_through);
|
| +
|
| + context()->Plug(if_true, if_false);
|
| +}
|
| +
|
| +
|
| void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
| if (expr->function() != NULL &&
|
| expr->function()->intrinsic_type == Runtime::INLINE) {
|
|
|