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

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

Issue 351853005: Split SetProperty(...attributes, strictmode) into AddProperty(...attributes) and SetProperty(...… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/collection.js ('k') | src/date.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 7
8 // This file relies on the fact that the following declaration has been made 8 // This file relies on the fact that the following declaration has been made
9 // in runtime.js: 9 // in runtime.js:
10 // var $Set = global.Set; 10 // var $Set = global.Set;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 %CheckIsBootstrapping(); 52 %CheckIsBootstrapping();
53 53
54 %SetCode(SetIterator, SetIteratorConstructor); 54 %SetCode(SetIterator, SetIteratorConstructor);
55 %FunctionSetPrototype(SetIterator, new $Object()); 55 %FunctionSetPrototype(SetIterator, new $Object());
56 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator'); 56 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator');
57 InstallFunctions(SetIterator.prototype, DONT_ENUM, $Array( 57 InstallFunctions(SetIterator.prototype, DONT_ENUM, $Array(
58 'next', SetIteratorNextJS 58 'next', SetIteratorNextJS
59 )); 59 ));
60 60
61 %FunctionSetName(SetIteratorSymbolIterator, '[Symbol.iterator]'); 61 %FunctionSetName(SetIteratorSymbolIterator, '[Symbol.iterator]');
62 %SetProperty(SetIterator.prototype, symbolIterator, 62 %AddProperty(SetIterator.prototype, symbolIterator,
63 SetIteratorSymbolIterator, DONT_ENUM); 63 SetIteratorSymbolIterator, DONT_ENUM);
64 } 64 }
65 65
66 SetUpSetIterator(); 66 SetUpSetIterator();
67 67
68 68
69 function ExtendSetPrototype() { 69 function ExtendSetPrototype() {
70 %CheckIsBootstrapping(); 70 %CheckIsBootstrapping();
71 71
72 InstallFunctions($Set.prototype, DONT_ENUM, $Array( 72 InstallFunctions($Set.prototype, DONT_ENUM, $Array(
73 'entries', SetEntries, 73 'entries', SetEntries,
74 'values', SetValues 74 'values', SetValues
75 )); 75 ));
76 76
77 %SetProperty($Set.prototype, symbolIterator, SetValues, 77 %AddProperty($Set.prototype, symbolIterator, SetValues, DONT_ENUM);
78 DONT_ENUM);
79 } 78 }
80 79
81 ExtendSetPrototype(); 80 ExtendSetPrototype();
82 81
83 82
84 83
85 function MapIteratorConstructor(map, kind) { 84 function MapIteratorConstructor(map, kind) {
86 %MapIteratorInitialize(this, map, kind); 85 %MapIteratorInitialize(this, map, kind);
87 } 86 }
88 87
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 %CheckIsBootstrapping(); 131 %CheckIsBootstrapping();
133 132
134 %SetCode(MapIterator, MapIteratorConstructor); 133 %SetCode(MapIterator, MapIteratorConstructor);
135 %FunctionSetPrototype(MapIterator, new $Object()); 134 %FunctionSetPrototype(MapIterator, new $Object());
136 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator'); 135 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator');
137 InstallFunctions(MapIterator.prototype, DONT_ENUM, $Array( 136 InstallFunctions(MapIterator.prototype, DONT_ENUM, $Array(
138 'next', MapIteratorNextJS 137 'next', MapIteratorNextJS
139 )); 138 ));
140 139
141 %FunctionSetName(MapIteratorSymbolIterator, '[Symbol.iterator]'); 140 %FunctionSetName(MapIteratorSymbolIterator, '[Symbol.iterator]');
142 %SetProperty(MapIterator.prototype, symbolIterator, 141 %AddProperty(MapIterator.prototype, symbolIterator,
143 MapIteratorSymbolIterator, DONT_ENUM); 142 MapIteratorSymbolIterator, DONT_ENUM);
144 } 143 }
145 144
146 SetUpMapIterator(); 145 SetUpMapIterator();
147 146
148 147
149 function ExtendMapPrototype() { 148 function ExtendMapPrototype() {
150 %CheckIsBootstrapping(); 149 %CheckIsBootstrapping();
151 150
152 InstallFunctions($Map.prototype, DONT_ENUM, $Array( 151 InstallFunctions($Map.prototype, DONT_ENUM, $Array(
153 'entries', MapEntries, 152 'entries', MapEntries,
154 'keys', MapKeys, 153 'keys', MapKeys,
155 'values', MapValues 154 'values', MapValues
156 )); 155 ));
157 156
158 %SetProperty($Map.prototype, symbolIterator, MapEntries, 157 %AddProperty($Map.prototype, symbolIterator, MapEntries, DONT_ENUM);
159 DONT_ENUM);
160 } 158 }
161 159
162 ExtendMapPrototype(); 160 ExtendMapPrototype();
OLDNEW
« no previous file with comments | « src/collection.js ('k') | src/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698