Chromium Code Reviews| Index: src/parser.cc |
| diff --git a/src/parser.cc b/src/parser.cc |
| index 129bd95466520ef87de7bc6e7c5ac61234cd9f48..7166da44cc7e519b3efb652bcf52d26da2c590c7 100644 |
| --- a/src/parser.cc |
| +++ b/src/parser.cc |
| @@ -3789,8 +3789,10 @@ Expression* Parser::ParseArrayLiteral(bool* ok) { |
| // Very small array literals that don't have a concrete hint about their type |
|
danno
2012/11/13 22:05:12
Remove all the code from this line (beginning of c
Toon Verwaest
2012/11/14 11:53:13
Done.
|
| // from a constant value should default to the slow case to avoid lots of |
| // elements transitions on really small objects. |
| - if (has_only_undefined_values && values->length() <= 2) { |
| - elements_kind = FAST_ELEMENTS; |
| + if (has_only_undefined_values && |
| + values->length() <= 2 && |
| + values->length() > 0) { |
| + // elements_kind = FAST_ELEMENTS; |
| } |
|
danno
2012/11/13 22:05:12
... to here.
Toon Verwaest
2012/11/14 11:53:13
Done.
|
| // Simple and shallow arrays can be lazily copied, we transform the |