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

Unified Diff: src/heap.cc

Issue 14146005: Track representations of fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test for tracking fields Created 7 years, 8 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/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 10cb4738abdf66c07be84b3900eeb9dd2d95c553..9ec4e7d01eb0ab4991ab1c9d92cc3d8884890717 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4146,7 +4146,9 @@ MaybeObject* Heap::AllocateInitialMap(JSFunction* fun) {
for (int i = 0; i < count; i++) {
String* name = fun->shared()->GetThisPropertyAssignmentName(i);
ASSERT(name->IsInternalizedString());
- FieldDescriptor field(name, i, NONE, i + 1);
+ // TODO(verwaest): Since we cannot update the boilerplate's map yet,
+ // initialize to the worst case.
+ FieldDescriptor field(name, i, NONE, Representation::Tagged(), i + 1);
descriptors->Set(i, &field, witness);
}
descriptors->Sort();
@@ -4580,6 +4582,7 @@ MaybeObject* Heap::AllocateGlobalObject(JSFunction* constructor) {
ASSERT(details.type() == CALLBACKS); // Only accessors are expected.
PropertyDetails d = PropertyDetails(details.attributes(),
CALLBACKS,
+ Representation::None(),
details.descriptor_index());
Object* value = descs->GetCallbacksObject(i);
MaybeObject* maybe_value = AllocateJSGlobalPropertyCell(value);
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698