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

Unified Diff: src/js/array.js

Issue 2553523002: [builtins] Don't enforce I+TF for ArraySort helpers. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/array.js
diff --git a/src/js/array.js b/src/js/array.js
index e23810f4ded4af3bc6d7d2d1a16fa92d708029c2..5c13f22e10942a7a2d995014d5d02ed826555693 100644
--- a/src/js/array.js
+++ b/src/js/array.js
@@ -723,7 +723,7 @@ function InnerArraySort(array, length, comparefn) {
else return x < y ? -1 : 1;
};
}
- var InsertionSort = function InsertionSort(a, from, to) {
+ function InsertionSort(a, from, to) {
for (var i = from + 1; i < to; i++) {
var element = a[i];
for (var j = i - 1; j >= from; j--) {
@@ -739,7 +739,7 @@ function InnerArraySort(array, length, comparefn) {
}
};
- var GetThirdIndex = function(a, from, to) {
+ function GetThirdIndex(a, from, to) {
var t_array = new InternalArray();
// Use both 'from' and 'to' to determine the pivot candidates.
var increment = 200 + ((to - from) & 15);
@@ -757,7 +757,7 @@ function InnerArraySort(array, length, comparefn) {
return third_index;
}
- var QuickSort = function QuickSort(a, from, to) {
+ function QuickSort(a, from, to) {
var third_index = 0;
while (true) {
// Insertion sort is faster for short arrays.
@@ -846,7 +846,7 @@ function InnerArraySort(array, length, comparefn) {
// Copy elements in the range 0..length from obj's prototype chain
// to obj itself, if obj has holes. Return one more than the maximal index
// of a prototype property.
- var CopyFromPrototype = function CopyFromPrototype(obj, length) {
+ function CopyFromPrototype(obj, length) {
var max = 0;
for (var proto = %object_get_prototype_of(obj); proto;
proto = %object_get_prototype_of(proto)) {
@@ -876,7 +876,7 @@ function InnerArraySort(array, length, comparefn) {
// Set a value of "undefined" on all indices in the range from..to
// where a prototype of obj has an element. I.e., shadow all prototype
// elements in that range.
- var ShadowPrototypeElements = function(obj, from, to) {
+ function ShadowPrototypeElements(obj, from, to) {
for (var proto = %object_get_prototype_of(obj); proto;
proto = %object_get_prototype_of(proto)) {
var indices = IS_PROXY(proto) ? to : %GetArrayKeys(proto, to);
@@ -899,7 +899,7 @@ function InnerArraySort(array, length, comparefn) {
}
};
- var SafeRemoveArrayHoles = function SafeRemoveArrayHoles(obj) {
+ function SafeRemoveArrayHoles(obj) {
// Copy defined elements from the end to fill in all holes and undefineds
// in the beginning of the array. Write undefineds and holes at the end
// after loop is finished.
@@ -1528,7 +1528,7 @@ utils.InstallFunctions(GlobalArray, DONT_ENUM, [
var specialFunctions = %SpecialArrayFunctions();
-var getFunction = function(name, jsBuiltin, len) {
+function getFunction(name, jsBuiltin, len) {
var f = jsBuiltin;
if (specialFunctions.hasOwnProperty(name)) {
f = specialFunctions[name];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698