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

Unified Diff: src/objects-inl.h

Issue 24374002: Revert "Handlify JSObject::MigrateInstance and friends." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 0a82ab73700be23b5257767a2c3eae6e4334c600..dcce931da943de6073052cc17fc9e60d3aefb09a 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -285,13 +285,14 @@ bool Object::HasValidElements() {
MaybeObject* Object::AllocateNewStorageFor(Heap* heap,
- Representation representation) {
+ Representation representation,
+ PretenureFlag tenure) {
if (!FLAG_track_double_fields) return this;
if (!representation.IsDouble()) return this;
if (IsUninitialized()) {
- return heap->AllocateHeapNumber(0);
+ return heap->AllocateHeapNumber(0, tenure);
}
- return heap->AllocateHeapNumber(Number());
+ return heap->AllocateHeapNumber(Number(), tenure);
}
@@ -1541,6 +1542,19 @@ MaybeObject* JSObject::ResetElements() {
}
+MaybeObject* JSObject::TryMigrateInstance() {
+ Map* new_map = map()->CurrentMapForDeprecated();
+ if (new_map == NULL) return Smi::FromInt(0);
+ Map* original_map = map();
+ MaybeObject* maybe_result = MigrateToMap(new_map);
+ JSObject* result;
+ if (FLAG_trace_migration && maybe_result->To(&result)) {
+ PrintInstanceMigration(stdout, original_map, result->map());
+ }
+ return maybe_result;
+}
+
+
Handle<String> JSObject::ExpectedTransitionKey(Handle<Map> map) {
DisallowHeapAllocation no_gc;
if (!map->HasTransitionArray()) return Handle<String>::null();
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698