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

Unified Diff: src/objects.cc

Issue 173963002: Remove all uses of field-tracking flags that do not make decisions but are subject to existing info… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More flags removed Created 6 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/json-parser.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d2ad0b7f5e866db7b3abc6b6e7b8d601db2989cd..e814b2466beffc6d4ff6a842325ac3c4bde113fe 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2353,16 +2353,14 @@ bool Map::InstancesNeedRewriting(Map* target,
ASSERT(target_number_of_fields >= number_of_fields);
if (target_number_of_fields != number_of_fields) return true;
- if (FLAG_track_double_fields) {
- // If smi descriptors were replaced by double descriptors, rewrite.
- DescriptorArray* old_desc = instance_descriptors();
- DescriptorArray* new_desc = target->instance_descriptors();
- int limit = NumberOfOwnDescriptors();
- for (int i = 0; i < limit; i++) {
- if (new_desc->GetDetails(i).representation().IsDouble() &&
- !old_desc->GetDetails(i).representation().IsDouble()) {
- return true;
- }
+ // If smi descriptors were replaced by double descriptors, rewrite.
+ DescriptorArray* old_desc = instance_descriptors();
+ DescriptorArray* new_desc = target->instance_descriptors();
+ int limit = NumberOfOwnDescriptors();
+ for (int i = 0; i < limit; i++) {
+ if (new_desc->GetDetails(i).representation().IsDouble() &&
+ !old_desc->GetDetails(i).representation().IsDouble()) {
+ return true;
}
}
@@ -2434,17 +2432,14 @@ void JSObject::MigrateToMap(Handle<JSObject> object, Handle<Map> new_map) {
? old_descriptors->GetValue(i)
: object->RawFastPropertyAt(old_descriptors->GetFieldIndex(i));
Handle<Object> value(raw_value, isolate);
- if (FLAG_track_double_fields &&
- !old_details.representation().IsDouble() &&
+ if (!old_details.representation().IsDouble() &&
details.representation().IsDouble()) {
if (old_details.representation().IsNone()) {
value = handle(Smi::FromInt(0), isolate);
}
value = NewStorageFor(isolate, value, details.representation());
}
- ASSERT(!(FLAG_track_double_fields &&
- details.representation().IsDouble() &&
- value->IsSmi()));
+ ASSERT(!(details.representation().IsDouble() && value->IsSmi()));
int target_index = new_descriptors->GetFieldIndex(i) - inobject;
if (target_index < 0) target_index += total_size;
array->set(target_index, *value);
@@ -2547,7 +2542,6 @@ Handle<Map> Map::CopyGeneralizeAllRepresentations(Handle<Map> map,
void Map::DeprecateTransitionTree() {
- if (!FLAG_track_fields) return;
if (is_deprecated()) return;
if (HasTransitionArray()) {
TransitionArray* transitions = this->transitions();
@@ -3971,7 +3965,7 @@ static void SetPropertyToField(LookupResult* lookup,
representation = desc->GetDetails(descriptor).representation();
}
- if (FLAG_track_double_fields && representation.IsDouble()) {
+ if (representation.IsDouble()) {
HeapNumber* storage = HeapNumber::cast(lookup->holder()->RawFastPropertyAt(
lookup->GetFieldIndex().field_index()));
storage->set_value(value->Number());
@@ -6659,8 +6653,7 @@ Object* JSObject::SlowReverseLookup(Object* value) {
for (int i = 0; i < number_of_own_descriptors; i++) {
if (descs->GetType(i) == FIELD) {
Object* property = RawFastPropertyAt(descs->GetFieldIndex(i));
- if (FLAG_track_double_fields &&
- descs->GetDetails(i).representation().IsDouble()) {
+ if (descs->GetDetails(i).representation().IsDouble()) {
ASSERT(property->IsHeapNumber());
if (value->IsNumber() && property->Number() == value->Number()) {
return descs->GetKey(i);
« no previous file with comments | « src/json-parser.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698