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

Unified Diff: src/js/array.js

Issue 1401243003: Add methods to extras' InternalPackedArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test typo Created 5 years, 2 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 | « no previous file | test/cctest/test-extra.js » ('j') | 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 462e5281374689929ff2fadb8e241ff6a38ba114..ade512a0e639e66d5746efe131b9e5114fb24206 100644
--- a/src/js/array.js
+++ b/src/js/array.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-(function(global, utils) {
+(function(global, utils, extrasUtils) {
"use strict";
@@ -1624,6 +1624,17 @@ utils.SetUpLockedPrototype(InternalPackedArray, GlobalArray(), [
"shift", getFunction("shift", ArrayShift)
]);
+// V8 extras get a separate copy of InternalPackedArray. We give them the basic
+// manipulation methods.
+utils.SetUpLockedPrototype(extrasUtils.InternalPackedArray, GlobalArray(), [
+ "push", getFunction("push", ArrayPush),
+ "pop", getFunction("pop", ArrayPop),
+ "shift", getFunction("shift", ArrayShift),
+ "unshift", getFunction("unshift", ArrayUnshift),
+ "splice", getFunction("splice", ArraySplice),
+ "slice", getFunction("slice", ArraySlice)
+]);
+
// -------------------------------------------------------------------
// Exports
« no previous file with comments | « no previous file | test/cctest/test-extra.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698