Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: src/objects-inl.h

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | src/oprofile-agent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/objects-debug.cc ('k') | src/oprofile-agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698