| Index: src/objects-inl.h
|
| ===================================================================
|
| --- src/objects-inl.h (revision 7031)
|
| +++ src/objects-inl.h (working copy)
|
| @@ -793,6 +793,10 @@
|
|
|
|
|
| MaybeObject* Object::GetElement(uint32_t index) {
|
| + // GetElement can trigger a getter which can cause allocation.
|
| + // This was not always the case. This ASSERT is here to catch
|
| + // leftover incorrect uses.
|
| + ASSERT(HEAP->IsAllocationAllowed());
|
| return GetElementWithReceiver(this, index);
|
| }
|
|
|
| @@ -2697,10 +2701,13 @@
|
| PropertyType type,
|
| int argc,
|
| InlineCacheHolderFlag holder) {
|
| - // Extra IC state is only allowed for monomorphic call IC stubs.
|
| + // Extra IC state is only allowed for monomorphic call IC stubs
|
| + // or for store IC stubs.
|
| ASSERT(extra_ic_state == kNoExtraICState ||
|
| (kind == CALL_IC && (ic_state == MONOMORPHIC ||
|
| - ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)));
|
| + ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) ||
|
| + (kind == STORE_IC) ||
|
| + (kind == KEYED_STORE_IC));
|
| // Compute the bit mask.
|
| int bits = kind << kFlagsKindShift;
|
| if (in_loop) bits |= kFlagsICInLoopMask;
|
| @@ -2843,6 +2850,22 @@
|
| }
|
|
|
|
|
| +MaybeObject* Map::GetPixelArrayElementsMap() {
|
| + if (has_pixel_array_elements()) return this;
|
| + // TODO(danno): Special case empty object map (or most common case)
|
| + // to return a pre-canned pixel array map.
|
| + Object* obj;
|
| + { MaybeObject* maybe_obj = CopyDropTransitions();
|
| + if (!maybe_obj->ToObject(&obj)) return maybe_obj;
|
| + }
|
| + Map* new_map = Map::cast(obj);
|
| + new_map->set_has_fast_elements(false);
|
| + new_map->set_has_pixel_array_elements(true);
|
| + COUNTERS->map_to_pixel_array_elements()->Increment();
|
| + return new_map;
|
| +}
|
| +
|
| +
|
| ACCESSORS(Map, instance_descriptors, DescriptorArray,
|
| kInstanceDescriptorsOffset)
|
| ACCESSORS(Map, code_cache, Object, kCodeCacheOffset)
|
| @@ -3819,7 +3842,8 @@
|
| ASSERT(!IsJSGlobalProxy());
|
| return SetPropertyPostInterceptor(GetHeap()->hidden_symbol(),
|
| hidden_obj,
|
| - DONT_ENUM);
|
| + DONT_ENUM,
|
| + kNonStrictMode);
|
| }
|
|
|
|
|
|
|