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

Side by Side Diff: src/v8natives.js

Issue 1146113004: Fix ToNameArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | test/mjsunit/harmony/proxies-for.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 $delete; 5 var $delete;
6 var $functionSourceString; 6 var $functionSourceString;
7 var $getIterator; 7 var $getIterator;
8 var $getMethod; 8 var $getMethod;
9 var $globalEval; 9 var $globalEval;
10 var $installConstants; 10 var $installConstants;
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 var array = new GlobalArray(n); 1072 var array = new GlobalArray(n);
1073 var realLength = 0; 1073 var realLength = 0;
1074 var names = { __proto__: null }; // TODO(rossberg): use sets once ready. 1074 var names = { __proto__: null }; // TODO(rossberg): use sets once ready.
1075 for (var index = 0; index < n; index++) { 1075 for (var index = 0; index < n; index++) {
1076 var s = $toName(obj[index]); 1076 var s = $toName(obj[index]);
1077 // TODO(rossberg): adjust once there is a story for symbols vs proxies. 1077 // TODO(rossberg): adjust once there is a story for symbols vs proxies.
1078 if (IS_SYMBOL(s) && !includeSymbols) continue; 1078 if (IS_SYMBOL(s) && !includeSymbols) continue;
1079 if (%HasOwnProperty(names, s)) { 1079 if (%HasOwnProperty(names, s)) {
1080 throw MakeTypeError(kProxyRepeatedPropName, trap, s); 1080 throw MakeTypeError(kProxyRepeatedPropName, trap, s);
1081 } 1081 }
1082 array[index] = s; 1082 array[realLength] = s;
1083 ++realLength; 1083 ++realLength;
1084 names[s] = 0; 1084 names[s] = 0;
1085 } 1085 }
1086 array.length = realLength; 1086 array.length = realLength;
1087 return array; 1087 return array;
1088 } 1088 }
1089 1089
1090 1090
1091 function ObjectGetOwnPropertyKeys(obj, filter) { 1091 function ObjectGetOwnPropertyKeys(obj, filter) {
1092 var nameArrays = new InternalArray(); 1092 var nameArrays = new InternalArray();
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 $objectLookupSetter = ObjectLookupSetter; 1970 $objectLookupSetter = ObjectLookupSetter;
1971 $objectToString = ObjectToString; 1971 $objectToString = ObjectToString;
1972 $overrideFunction = OverrideFunction; 1972 $overrideFunction = OverrideFunction;
1973 $ownPropertyKeys = OwnPropertyKeys; 1973 $ownPropertyKeys = OwnPropertyKeys;
1974 $setFunctionName = SetFunctionName; 1974 $setFunctionName = SetFunctionName;
1975 $setUpLockedPrototype = SetUpLockedPrototype; 1975 $setUpLockedPrototype = SetUpLockedPrototype;
1976 $toCompletePropertyDescriptor = ToCompletePropertyDescriptor; 1976 $toCompletePropertyDescriptor = ToCompletePropertyDescriptor;
1977 $toNameArray = ToNameArray; 1977 $toNameArray = ToNameArray;
1978 1978
1979 }) 1979 })
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/proxies-for.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698