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

Unified Diff: src/objects-inl.h

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/objects.cc ('k') | src/runtime.cc » ('j') | 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 2db83f2ba0225a4910bbb340d3b6bb436e7068a1..88e769f1f97e3f76b245eb60d116a27191a85a07 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -278,10 +278,9 @@ bool Object::HasValidElements() {
MaybeObject* Object::AllocateNewStorageFor(Heap* heap,
Representation representation) {
- if (FLAG_track_fields && representation.IsSmi() && IsUninitialized()) {
+ if (representation.IsSmi() && IsUninitialized()) {
return Smi::FromInt(0);
}
- if (!FLAG_track_double_fields) return this;
if (!representation.IsDouble()) return this;
if (IsUninitialized()) {
return heap->AllocateHeapNumber(0);
@@ -3985,8 +3984,7 @@ void Map::set_is_shared(bool value) {
bool Map::is_shared() {
- return IsShared::decode(bit_field3());
-}
+ return IsShared::decode(bit_field3()); }
void Map::set_dictionary_map(bool value) {
@@ -4032,7 +4030,6 @@ void Map::deprecate() {
bool Map::is_deprecated() {
- if (!FLAG_track_fields) return false;
return Deprecated::decode(bit_field3());
}
@@ -4043,7 +4040,6 @@ void Map::set_migration_target(bool value) {
bool Map::is_migration_target() {
- if (!FLAG_track_fields) return false;
return IsMigrationTarget::decode(bit_field3());
}
@@ -4077,22 +4073,11 @@ bool Map::CanBeDeprecated() {
int descriptor = LastAdded();
for (int i = 0; i <= descriptor; i++) {
PropertyDetails details = instance_descriptors()->GetDetails(i);
- if (FLAG_track_fields && details.representation().IsNone()) {
- return true;
- }
- if (FLAG_track_fields && details.representation().IsSmi()) {
- return true;
- }
- if (FLAG_track_double_fields && details.representation().IsDouble()) {
- return true;
- }
- if (FLAG_track_heap_object_fields &&
- details.representation().IsHeapObject()) {
- return true;
- }
- if (FLAG_track_fields && details.type() == CONSTANT) {
- return true;
- }
+ if (details.representation().IsNone()) return true;
+ if (details.representation().IsSmi()) return true;
+ if (details.representation().IsDouble()) return true;
+ if (details.representation().IsHeapObject()) return true;
+ if (details.type() == CONSTANT) return true;
}
return false;
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698