Index: src/ia32/stub-cache-ia32.cc |
=================================================================== |
--- src/ia32/stub-cache-ia32.cc (revision 4073) |
+++ src/ia32/stub-cache-ia32.cc (working copy) |
@@ -698,7 +698,8 @@ |
CallOptimization optimization(lookup); |
- if (optimization.is_constant_call()) { |
+ if (optimization.is_constant_call() && |
+ !Top::CanHaveSpecialFunctions(holder)) { |
CompileCacheable(masm, |
object, |
receiver, |
@@ -1332,6 +1333,18 @@ |
break; |
} |
+ case JSARRAY_HAS_FAST_ELEMENTS_CHECK: |
+ CheckPrototypes(JSObject::cast(object), edx, holder, |
+ ebx, eax, name, &miss); |
+ // Make sure object->HasFastElements(). |
+ // Get the elements array of the object. |
+ __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); |
+ // Check that the object is in fast mode (not dictionary). |
+ __ cmp(FieldOperand(ebx, HeapObject::kMapOffset), |
+ Immediate(Factory::fixed_array_map())); |
+ __ j(not_equal, &miss, not_taken); |
+ break; |
+ |
default: |
UNREACHABLE(); |
} |