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

Unified Diff: src/parser.cc

Issue 11377132: Support all fast elements kinds in the major array operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
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

Powered by Google App Engine
This is Rietveld 408576698