Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index 9c55ad7e719265dc535a6d5b3c7990c7a027994b..f5887125e26aaa4fc8bf41b617c8a3221679f0ae 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -3996,9 +3996,13 @@ void Parser::BuildObjectLiteralConstantProperties( |
Handle<Object> key = property->key()->handle(); |
Handle<Object> value = GetBoilerplateValue(property->value()); |
- // Ensure objects with doubles are always treated as nested objects. |
+ // Ensure objects that may, at any point in time, contain fields with double |
+ // representation are always treated as nested objects. This is true for |
+ // computed fields (value is undefined), and smi and double literals |
+ // (value->IsNumber()). |
// TODO(verwaest): Remove once we can store them inline. |
- if (FLAG_track_double_fields && value->IsNumber()) { |
+ if (FLAG_track_double_fields && |
+ (value->IsNumber() || value->IsUndefined())) { |
danno
2013/06/06 13:07:32
As discussed, super scary.
Toon Verwaest
2013/06/06 13:22:26
Done.
|
*may_store_doubles = true; |
} |