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

Unified Diff: src/js/macros.py

Issue 2013873002: [array] speed up array.forEach and friends by directly using in-operator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/js/array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/macros.py
diff --git a/src/js/macros.py b/src/js/macros.py
index 3cc2d6c2b88e1092867d322ed64f1a8e70f90039..349c97ae1977f38ac99c4c9578cb6e8869c73fab 100644
--- a/src/js/macros.py
+++ b/src/js/macros.py
@@ -124,7 +124,7 @@ macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg));
macro TO_NAME(arg) = (%_ToName(arg));
macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
macro HAS_OWN_PROPERTY(obj, key) = (%_Call(ObjectHasOwnProperty, obj, key));
-macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements(%IS_VAR(array)) && (index < array.length)) || (index in array));
+macro HAS_INDEX(array, index) = (index in array);
# Private names.
macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym));
« no previous file with comments | « src/js/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698