diff options
Diffstat (limited to 'deps/v8/test/mjsunit/array-natives-elements.js')
-rw-r--r-- | deps/v8/test/mjsunit/array-natives-elements.js | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/deps/v8/test/mjsunit/array-natives-elements.js b/deps/v8/test/mjsunit/array-natives-elements.js index 9898faac23..8ab2148b91 100644 --- a/deps/v8/test/mjsunit/array-natives-elements.js +++ b/deps/v8/test/mjsunit/array-natives-elements.js @@ -44,83 +44,83 @@ var __sequence = 0; function array_natives_test() { // Ensure small array literals start in specific element kind mode. - assertTrue(%HasFastSmiElements([])); - assertTrue(%HasFastSmiElements([1])); - assertTrue(%HasFastSmiElements([1,2])); - assertTrue(%HasFastDoubleElements([1.1])); - assertTrue(%HasFastDoubleElements([1.1,2])); + assertTrue(%HasSmiElements([])); + assertTrue(%HasSmiElements([1])); + assertTrue(%HasSmiElements([1,2])); + assertTrue(%HasDoubleElements([1.1])); + assertTrue(%HasDoubleElements([1.1,2])); // Push var a0 = make_array("[1, 2, 3]"); - assertTrue(%HasFastSmiElements(a0)); + assertTrue(%HasSmiElements(a0)); assertEquals(4, a0.push(4)); - assertTrue(%HasFastSmiElements(a0)); + assertTrue(%HasSmiElements(a0)); assertEquals(5, a0.push(1.3)); - assertTrue(%HasFastDoubleElements(a0)); + assertTrue(%HasDoubleElements(a0)); assertEquals(6, a0.push(1.5)); - assertTrue(%HasFastDoubleElements(a0)); + assertTrue(%HasDoubleElements(a0)); assertEquals(7, a0.push({})); - assertTrue(%HasFastObjectElements(a0)); + assertTrue(%HasObjectElements(a0)); assertEquals(8, a0.push({})); - assertTrue(%HasFastObjectElements(a0)); + assertTrue(%HasObjectElements(a0)); assertEquals([1,2,3,4,1.3,1.5,{},{}], a0); // Concat var a1; a1 = [1,2,3].concat([]); - //assertTrue(%HasFastSmiElements(a1)); + //assertTrue(%HasSmiElements(a1)); assertEquals([1,2,3], a1); a1 = [1,2,3].concat([4,5,6]); - assertTrue(%HasFastSmiElements(a1)); + assertTrue(%HasSmiElements(a1)); assertEquals([1,2,3,4,5,6], a1); a1 = [1,2,3].concat([4,5,6], [7,8,9]); - assertTrue(%HasFastSmiElements(a1)); + assertTrue(%HasSmiElements(a1)); assertEquals([1,2,3,4,5,6,7,8,9], a1); a1 = [1.1,2,3].concat([]); - assertTrue(%HasFastDoubleElements(a1)); + assertTrue(%HasDoubleElements(a1)); assertEquals([1.1,2,3], a1); a1 = [1,2,3].concat([1.1, 2]); - assertTrue(%HasFastDoubleElements(a1)); + assertTrue(%HasDoubleElements(a1)); assertEquals([1,2,3,1.1,2], a1); a1 = [1.1,2,3].concat([1, 2]); - assertTrue(%HasFastDoubleElements(a1)); + assertTrue(%HasDoubleElements(a1)); assertEquals([1.1,2,3,1,2], a1); a1 = [1.1,2,3].concat([1.2, 2]); - assertTrue(%HasFastDoubleElements(a1)); + assertTrue(%HasDoubleElements(a1)); assertEquals([1.1,2,3,1.2,2], a1); a1 = [1,2,3].concat([{}]); - assertTrue(%HasFastObjectElements(a1)); + assertTrue(%HasObjectElements(a1)); assertEquals([1,2,3,{}], a1); a1 = [1.1,2,3].concat([{}]); - assertTrue(%HasFastObjectElements(a1)); + assertTrue(%HasObjectElements(a1)); assertEquals([1.1,2,3,{}], a1); a1 = [{}].concat([1,2,3]); - assertTrue(%HasFastObjectElements(a1)); + assertTrue(%HasObjectElements(a1)); assertEquals([{},1,2,3], a1); a1 = [{}].concat([1.1,2,3]); - assertTrue(%HasFastObjectElements(a1)); + assertTrue(%HasObjectElements(a1)); assertEquals([{},1.1,2,3], a1); // Slice var a2 = [1,2,3]; - assertTrue(%HasFastSmiElements(a2.slice())); - assertTrue(%HasFastSmiElements(a2.slice(1))); - assertTrue(%HasFastSmiElements(a2.slice(1, 2))); + assertTrue(%HasSmiElements(a2.slice())); + assertTrue(%HasSmiElements(a2.slice(1))); + assertTrue(%HasSmiElements(a2.slice(1, 2))); assertEquals([1,2,3], a2.slice()); assertEquals([2,3], a2.slice(1)); assertEquals([2], a2.slice(1,2)); a2 = [1.1,2,3]; - assertTrue(%HasFastDoubleElements(a2.slice())); - assertTrue(%HasFastDoubleElements(a2.slice(1))); - assertTrue(%HasFastDoubleElements(a2.slice(1, 2))); + assertTrue(%HasDoubleElements(a2.slice())); + assertTrue(%HasDoubleElements(a2.slice(1))); + assertTrue(%HasDoubleElements(a2.slice(1, 2))); assertEquals([1.1,2,3], a2.slice()); assertEquals([2,3], a2.slice(1)); assertEquals([2], a2.slice(1,2)); a2 = [{},2,3]; - assertTrue(%HasFastObjectElements(a2.slice())); - assertTrue(%HasFastObjectElements(a2.slice(1))); - assertTrue(%HasFastObjectElements(a2.slice(1, 2))); + assertTrue(%HasObjectElements(a2.slice())); + assertTrue(%HasObjectElements(a2.slice(1))); + assertTrue(%HasObjectElements(a2.slice(1, 2))); assertEquals([{},2,3], a2.slice()); assertEquals([2,3], a2.slice(1)); assertEquals([2], a2.slice(1,2)); @@ -129,124 +129,124 @@ function array_natives_test() { var a3 = [1,2,3]; var a3r; a3r = a3.splice(0, 0); - assertTrue(%HasFastSmiElements(a3r)); - assertTrue(%HasFastSmiElements(a3)); + assertTrue(%HasSmiElements(a3r)); + assertTrue(%HasSmiElements(a3)); assertEquals([], a3r); assertEquals([1, 2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 1); - assertTrue(%HasFastSmiElements(a3r)); - assertTrue(%HasFastSmiElements(a3)); + assertTrue(%HasSmiElements(a3r)); + assertTrue(%HasSmiElements(a3)); assertEquals([1], a3r); assertEquals([2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 0, 2); - assertTrue(%HasFastSmiElements(a3r)); - assertTrue(%HasFastSmiElements(a3)); + assertTrue(%HasSmiElements(a3r)); + assertTrue(%HasSmiElements(a3)); assertEquals([], a3r); assertEquals([2, 1, 2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 1, 2); - assertTrue(%HasFastSmiElements(a3r)); - assertTrue(%HasFastSmiElements(a3)); + assertTrue(%HasSmiElements(a3r)); + assertTrue(%HasSmiElements(a3)); assertEquals([1], a3r); assertEquals([2, 2, 3], a3); a3 = [1.1,2,3]; a3r = a3.splice(0, 0); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([], a3r); assertEquals([1.1, 2, 3], a3); a3 = [1.1, 2, 3]; a3r = a3.splice(0, 1); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([1.1], a3r); assertEquals([2, 3], a3); a3 = [1.1, 2, 3]; a3r = a3.splice(0, 0, 2); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([], a3r); assertEquals([2, 1.1, 2, 3], a3); a3 = [1.1, 2, 3]; - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3)); a3r = a3.splice(0, 1, 2); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([1.1], a3r); assertEquals([2, 2, 3], a3); a3 = [1.1,2,3]; a3r = a3.splice(0, 0, 2.1); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([], a3r); assertEquals([2.1, 1.1, 2, 3], a3); a3 = [1.1,2,3]; a3r = a3.splice(0, 1, 2.2); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([1.1], a3r); assertEquals([2.2, 2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 0, 2.1); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([], a3r); assertEquals([2.1, 1, 2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 1, 2.2); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([1], a3r); assertEquals([2.2, 2, 3], a3); a3 = [{},2,3]; a3r = a3.splice(0, 0); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([], a3r); assertEquals([{}, 2, 3], a3); a3 = [1,2,{}]; a3r = a3.splice(0, 1); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([1], a3r); assertEquals([2, {}], a3); a3 = [1,2,3]; a3r = a3.splice(0, 0, {}); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([], a3r); assertEquals([{}, 1, 2, 3], a3); a3 = [1,2,3]; a3r = a3.splice(0, 1, {}); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([1], a3r); assertEquals([{}, 2, 3], a3); a3 = [1.1,2,3]; a3r = a3.splice(0, 0, {}); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([], a3r); assertEquals([{}, 1.1, 2, 3], a3); a3 = [1.1,2,3]; a3r = a3.splice(0, 1, {}); - assertTrue(%HasFastObjectElements(a3r)); - assertTrue(%HasFastObjectElements(a3)); + assertTrue(%HasObjectElements(a3r)); + assertTrue(%HasObjectElements(a3)); assertEquals([1.1], a3r); assertEquals([{}, 2, 3], a3); a3 = [1.1, 2.2, 3.3]; a3r = a3.splice(2, 1); - assertTrue(%HasFastDoubleElements(a3r)); - assertTrue(%HasFastDoubleElements(a3)); + assertTrue(%HasDoubleElements(a3r)); + assertTrue(%HasDoubleElements(a3)); assertEquals([3.3], a3r); - //assertTrue(%HasFastDoubleElements(a3r)); + //assertTrue(%HasDoubleElements(a3r)); assertEquals([1.1, 2.2], a3); - //assertTrue(%HasFastDoubleElements(a3r)); + //assertTrue(%HasDoubleElements(a3r)); a3r = a3.splice(1, 1, 4.4, 5.5); - //assertTrue(%HasFastDoubleElements(a3r)); - //assertTrue(%HasFastDoubleElements(a3)); + //assertTrue(%HasDoubleElements(a3r)); + //assertTrue(%HasDoubleElements(a3)); assertEquals([2.2], a3r); assertEquals([1.1, 4.4, 5.5], a3); @@ -254,50 +254,50 @@ function array_natives_test() { var a4 = [1,2,3]; assertEquals(3, a4.pop()); assertEquals([1,2], a4); - //assertTrue(%HasFastSmiElements(a4)); + //assertTrue(%HasSmiElements(a4)); a4 = [1.1,2,3]; assertEquals(3, a4.pop()); assertEquals([1.1,2], a4); - //assertTrue(%HasFastDoubleElements(a4)); + //assertTrue(%HasDoubleElements(a4)); a4 = [{},2,3]; assertEquals(3, a4.pop()); assertEquals([{},2], a4); - //assertTrue(%HasFastObjectElements(a4)); + //assertTrue(%HasObjectElements(a4)); // Shift var a4 = [1,2,3]; assertEquals(1, a4.shift()); assertEquals([2,3], a4); - //assertTrue(%HasFastSmiElements(a4)); + //assertTrue(%HasSmiElements(a4)); a4 = [1.1,2,3]; assertEquals(1.1, a4.shift()); assertEquals([2,3], a4); - //assertTrue(%HasFastDoubleElements(a4)); + //assertTrue(%HasDoubleElements(a4)); a4 = [{},2,3]; assertEquals({}, a4.shift()); assertEquals([2,3], a4); - //assertTrue(%HasFastObjectElements(a4)); + //assertTrue(%HasObjectElements(a4)); // Unshift var a4 = [1,2,3]; assertEquals(4, a4.unshift(1)); - assertTrue(%HasFastSmiElements(a4)); + assertTrue(%HasSmiElements(a4)); assertEquals([1,1,2,3], a4); a4 = [1,2,3]; assertEquals(4, a4.unshift(1.1)); - assertTrue(%HasFastDoubleElements(a4)); + assertTrue(%HasDoubleElements(a4)); assertEquals([1.1,1,2,3], a4); a4 = [1.1,2,3]; assertEquals(4, a4.unshift(1)); - assertTrue(%HasFastDoubleElements(a4)); + assertTrue(%HasDoubleElements(a4)); assertEquals([1,1.1,2,3], a4); a4 = [{},2,3]; assertEquals(4, a4.unshift(1)); - assertTrue(%HasFastObjectElements(a4)); + assertTrue(%HasObjectElements(a4)); assertEquals([1,{},2,3], a4); a4 = [{},2,3]; assertEquals(4, a4.unshift(1.1)); - assertTrue(%HasFastObjectElements(a4)); + assertTrue(%HasObjectElements(a4)); assertEquals([1.1,{},2,3], a4); } |