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

Side by Side Diff: src/collection.js

Issue 8566009: Remove hidden prototype for builtin functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « src/array.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // Set up the Set and Map constructor function. 169 // Set up the Set and Map constructor function.
170 %SetCode($Set, SetConstructor); 170 %SetCode($Set, SetConstructor);
171 %SetCode($Map, MapConstructor); 171 %SetCode($Map, MapConstructor);
172 172
173 // Set up the constructor property on the Set and Map prototype object. 173 // Set up the constructor property on the Set and Map prototype object.
174 %SetProperty($Set.prototype, "constructor", $Set, DONT_ENUM); 174 %SetProperty($Set.prototype, "constructor", $Set, DONT_ENUM);
175 %SetProperty($Map.prototype, "constructor", $Map, DONT_ENUM); 175 %SetProperty($Map.prototype, "constructor", $Map, DONT_ENUM);
176 176
177 // Set up the non-enumerable functions on the Set prototype object. 177 // Set up the non-enumerable functions on the Set prototype object.
178 InstallFunctionsOnHiddenPrototype($Set.prototype, DONT_ENUM, $Array( 178 InstallFunctions($Set.prototype, DONT_ENUM, $Array(
179 "add", SetAdd, 179 "add", SetAdd,
180 "has", SetHas, 180 "has", SetHas,
181 "delete", SetDelete 181 "delete", SetDelete
182 )); 182 ));
183 183
184 // Set up the non-enumerable functions on the Map prototype object. 184 // Set up the non-enumerable functions on the Map prototype object.
185 InstallFunctionsOnHiddenPrototype($Map.prototype, DONT_ENUM, $Array( 185 InstallFunctions($Map.prototype, DONT_ENUM, $Array(
186 "get", MapGet, 186 "get", MapGet,
187 "set", MapSet, 187 "set", MapSet,
188 "has", MapHas, 188 "has", MapHas,
189 "delete", MapDelete 189 "delete", MapDelete
190 )); 190 ));
191 191
192 // Set up the WeakMap constructor function. 192 // Set up the WeakMap constructor function.
193 %SetCode($WeakMap, WeakMapConstructor); 193 %SetCode($WeakMap, WeakMapConstructor);
194 194
195 // Set up the constructor property on the WeakMap prototype object. 195 // Set up the constructor property on the WeakMap prototype object.
196 %SetProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM); 196 %SetProperty($WeakMap.prototype, "constructor", $WeakMap, DONT_ENUM);
197 197
198 // Set up the non-enumerable functions on the WeakMap prototype object. 198 // Set up the non-enumerable functions on the WeakMap prototype object.
199 InstallFunctionsOnHiddenPrototype($WeakMap.prototype, DONT_ENUM, $Array( 199 InstallFunctions($WeakMap.prototype, DONT_ENUM, $Array(
200 "get", WeakMapGet, 200 "get", WeakMapGet,
201 "set", WeakMapSet, 201 "set", WeakMapSet,
202 "has", WeakMapHas, 202 "has", WeakMapHas,
203 "delete", WeakMapDelete 203 "delete", WeakMapDelete
204 )); 204 ));
205 })(); 205 })();
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698