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

Side by Side Diff: src/collection.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/bootstrapper.cc ('k') | src/collection-iterator.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 "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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 89 }
90 90
91 91
92 // ------------------------------------------------------------------- 92 // -------------------------------------------------------------------
93 93
94 function SetUpSet() { 94 function SetUpSet() {
95 %CheckIsBootstrapping(); 95 %CheckIsBootstrapping();
96 96
97 %SetCode($Set, SetConstructor); 97 %SetCode($Set, SetConstructor);
98 %FunctionSetPrototype($Set, new $Object()); 98 %FunctionSetPrototype($Set, new $Object());
99 %SetProperty($Set.prototype, "constructor", $Set, DONT_ENUM); 99 %AddProperty($Set.prototype, "constructor", $Set, DONT_ENUM);
100 100
101 %FunctionSetLength(SetForEach, 1); 101 %FunctionSetLength(SetForEach, 1);
102 102
103 // Set up the non-enumerable functions on the Set prototype object. 103 // Set up the non-enumerable functions on the Set prototype object.
104 InstallGetter($Set.prototype, "size", SetGetSizeJS); 104 InstallGetter($Set.prototype, "size", SetGetSizeJS);
105 InstallFunctions($Set.prototype, DONT_ENUM, $Array( 105 InstallFunctions($Set.prototype, DONT_ENUM, $Array(
106 "add", SetAddJS, 106 "add", SetAddJS,
107 "has", SetHasJS, 107 "has", SetHasJS,
108 "delete", SetDeleteJS, 108 "delete", SetDeleteJS,
109 "clear", SetClearJS, 109 "clear", SetClearJS,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 202
203 // ------------------------------------------------------------------- 203 // -------------------------------------------------------------------
204 204
205 function SetUpMap() { 205 function SetUpMap() {
206 %CheckIsBootstrapping(); 206 %CheckIsBootstrapping();
207 207
208 %SetCode($Map, MapConstructor); 208 %SetCode($Map, MapConstructor);
209 %FunctionSetPrototype($Map, new $Object()); 209 %FunctionSetPrototype($Map, new $Object());
210 %SetProperty($Map.prototype, "constructor", $Map, DONT_ENUM); 210 %AddProperty($Map.prototype, "constructor", $Map, DONT_ENUM);
211 211
212 %FunctionSetLength(MapForEach, 1); 212 %FunctionSetLength(MapForEach, 1);
213 213
214 // Set up the non-enumerable functions on the Map prototype object. 214 // Set up the non-enumerable functions on the Map prototype object.
215 InstallGetter($Map.prototype, "size", MapGetSizeJS); 215 InstallGetter($Map.prototype, "size", MapGetSizeJS);
216 InstallFunctions($Map.prototype, DONT_ENUM, $Array( 216 InstallFunctions($Map.prototype, DONT_ENUM, $Array(
217 "get", MapGetJS, 217 "get", MapGetJS,
218 "set", MapSetJS, 218 "set", MapSetJS,
219 "has", MapHasJS, 219 "has", MapHasJS,
220 "delete", MapDeleteJS, 220 "delete", MapDeleteJS,
221 "clear", MapClearJS, 221 "clear", MapClearJS,
222 "forEach", MapForEach 222 "forEach", MapForEach
223 )); 223 ));
224 } 224 }
225 225
226 SetUpMap(); 226 SetUpMap();
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/collection-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698