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

Side by Side Diff: src/symbol.js

Issue 557023002: Refactor ObjectGetOwnPropertyKeys to accept bitmask rather than boolean (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/v8natives.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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declaration has been made 7 // This file relies on the fact that the following declaration has been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Array = global.Array; 9 // var $Array = global.Array;
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return %SymbolRegistry().keyFor[symbol]; 66 return %SymbolRegistry().keyFor[symbol];
67 } 67 }
68 68
69 69
70 // ES6 19.1.2.8 70 // ES6 19.1.2.8
71 function ObjectGetOwnPropertySymbols(obj) { 71 function ObjectGetOwnPropertySymbols(obj) {
72 obj = ToObject(obj); 72 obj = ToObject(obj);
73 73
74 // TODO(arv): Proxies use a shared trap for String and Symbol keys. 74 // TODO(arv): Proxies use a shared trap for String and Symbol keys.
75 75
76 return ObjectGetOwnPropertyKeys(obj, true); 76 return ObjectGetOwnPropertyKeys(obj, PROPERTY_ATTRIBUTES_STRING);
77 } 77 }
78 78
79 79
80 //------------------------------------------------------------------- 80 //-------------------------------------------------------------------
81 81
82 var symbolHasInstance = InternalSymbol("Symbol.hasInstance"); 82 var symbolHasInstance = InternalSymbol("Symbol.hasInstance");
83 var symbolIsConcatSpreadable = InternalSymbol("Symbol.isConcatSpreadable"); 83 var symbolIsConcatSpreadable = InternalSymbol("Symbol.isConcatSpreadable");
84 var symbolIsRegExp = InternalSymbol("Symbol.isRegExp"); 84 var symbolIsRegExp = InternalSymbol("Symbol.isRegExp");
85 var symbolIterator = InternalSymbol("Symbol.iterator"); 85 var symbolIterator = InternalSymbol("Symbol.iterator");
86 var symbolToStringTag = InternalSymbol("Symbol.toStringTag"); 86 var symbolToStringTag = InternalSymbol("Symbol.toStringTag");
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 function ExtendObject() { 126 function ExtendObject() {
127 %CheckIsBootstrapping(); 127 %CheckIsBootstrapping();
128 128
129 InstallFunctions($Object, DONT_ENUM, $Array( 129 InstallFunctions($Object, DONT_ENUM, $Array(
130 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols 130 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols
131 )); 131 ));
132 } 132 }
133 133
134 ExtendObject(); 134 ExtendObject();
OLDNEW
« no previous file with comments | « no previous file | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698