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

Side by Side Diff: src/array-iterator.js

Issue 1123703002: Reland "Wrap v8natives.js into a function." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert stack trace printing Created 5 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 unified diff | Download patch
« no previous file with comments | « src/array.js ('k') | src/arraybuffer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var $iteratorCreateResultObject; 5 var $iteratorCreateResultObject;
6 var $arrayValues; 6 var $arrayValues;
7 7
8 (function() { 8 (function() {
9 9
10 "use strict"; 10 "use strict";
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 119
120 function ArrayKeys() { 120 function ArrayKeys() {
121 return CreateArrayIterator(this, ITERATOR_KIND_KEYS); 121 return CreateArrayIterator(this, ITERATOR_KIND_KEYS);
122 } 122 }
123 123
124 124
125 %FunctionSetPrototype(ArrayIterator, new GlobalObject()); 125 %FunctionSetPrototype(ArrayIterator, new GlobalObject());
126 %FunctionSetInstanceClassName(ArrayIterator, 'Array Iterator'); 126 %FunctionSetInstanceClassName(ArrayIterator, 'Array Iterator');
127 127
128 InstallFunctions(ArrayIterator.prototype, DONT_ENUM, [ 128 $installFunctions(ArrayIterator.prototype, DONT_ENUM, [
129 'next', ArrayIteratorNext 129 'next', ArrayIteratorNext
130 ]); 130 ]);
131 SetFunctionName(ArrayIteratorIterator, symbolIterator); 131 $setFunctionName(ArrayIteratorIterator, symbolIterator);
132 %AddNamedProperty(ArrayIterator.prototype, symbolIterator, 132 %AddNamedProperty(ArrayIterator.prototype, symbolIterator,
133 ArrayIteratorIterator, DONT_ENUM); 133 ArrayIteratorIterator, DONT_ENUM);
134 %AddNamedProperty(ArrayIterator.prototype, symbolToStringTag, 134 %AddNamedProperty(ArrayIterator.prototype, symbolToStringTag,
135 "Array Iterator", READ_ONLY | DONT_ENUM); 135 "Array Iterator", READ_ONLY | DONT_ENUM);
136 136
137 InstallFunctions(GlobalArray.prototype, DONT_ENUM, [ 137 $installFunctions(GlobalArray.prototype, DONT_ENUM, [
138 // No 'values' since it breaks webcompat: http://crbug.com/409858 138 // No 'values' since it breaks webcompat: http://crbug.com/409858
139 'entries', ArrayEntries, 139 'entries', ArrayEntries,
140 'keys', ArrayKeys 140 'keys', ArrayKeys
141 ]); 141 ]);
142 142
143 %AddNamedProperty(GlobalArray.prototype, symbolIterator, ArrayValues, 143 %AddNamedProperty(GlobalArray.prototype, symbolIterator, ArrayValues,
144 DONT_ENUM); 144 DONT_ENUM);
145 145
146 macro EXTEND_TYPED_ARRAY(NAME) 146 macro EXTEND_TYPED_ARRAY(NAME)
147 %AddNamedProperty(GlobalNAME.prototype, 'entries', ArrayEntries, DONT_ENUM); 147 %AddNamedProperty(GlobalNAME.prototype, 'entries', ArrayEntries, DONT_ENUM);
148 %AddNamedProperty(GlobalNAME.prototype, 'values', ArrayValues, DONT_ENUM); 148 %AddNamedProperty(GlobalNAME.prototype, 'values', ArrayValues, DONT_ENUM);
149 %AddNamedProperty(GlobalNAME.prototype, 'keys', ArrayKeys, DONT_ENUM); 149 %AddNamedProperty(GlobalNAME.prototype, 'keys', ArrayKeys, DONT_ENUM);
150 %AddNamedProperty(GlobalNAME.prototype, symbolIterator, ArrayValues, 150 %AddNamedProperty(GlobalNAME.prototype, symbolIterator, ArrayValues,
151 DONT_ENUM); 151 DONT_ENUM);
152 endmacro 152 endmacro
153 153
154 TYPED_ARRAYS(EXTEND_TYPED_ARRAY) 154 TYPED_ARRAYS(EXTEND_TYPED_ARRAY)
155 155
156 $iteratorCreateResultObject = CreateIteratorResultObject; 156 $iteratorCreateResultObject = CreateIteratorResultObject;
157 $arrayValues = ArrayValues; 157 $arrayValues = ArrayValues;
158 158
159 })(); 159 })();
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698