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

Side by Side Diff: src/v8natives.js

Issue 392243002: Reimplement SetProperty using the LookupIterator (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/stub-cache.cc ('k') | test/cctest/test-decls.cc » ('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 // This file relies on the fact that the following declarations have been made 5 // This file relies on the fact that the following declarations have been made
6 // in runtime.js: 6 // in runtime.js:
7 // var $Object = global.Object; 7 // var $Object = global.Object;
8 // var $Boolean = global.Boolean; 8 // var $Boolean = global.Boolean;
9 // var $Number = global.Number; 9 // var $Number = global.Number;
10 // var $Function = global.Function; 10 // var $Function = global.Function;
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 if (%IsJSProxy(obj)) { 1315 if (%IsJSProxy(obj)) {
1316 return false; 1316 return false;
1317 } 1317 }
1318 if (%IsExtensible(obj)) { 1318 if (%IsExtensible(obj)) {
1319 return false; 1319 return false;
1320 } 1320 }
1321 var names = ObjectGetOwnPropertyNames(obj); 1321 var names = ObjectGetOwnPropertyNames(obj);
1322 for (var i = 0; i < names.length; i++) { 1322 for (var i = 0; i < names.length; i++) {
1323 var name = names[i]; 1323 var name = names[i];
1324 var desc = GetOwnPropertyJS(obj, name); 1324 var desc = GetOwnPropertyJS(obj, name);
1325 if (desc.isConfigurable()) return false; 1325 if (desc.isConfigurable()) {
1326 return false;
1327 }
1326 } 1328 }
1327 return true; 1329 return true;
1328 } 1330 }
1329 1331
1330 1332
1331 // ES5 section 15.2.3.12 1333 // ES5 section 15.2.3.12
1332 function ObjectIsFrozen(obj) { 1334 function ObjectIsFrozen(obj) {
1333 if (!IS_SPEC_OBJECT(obj)) { 1335 if (!IS_SPEC_OBJECT(obj)) {
1334 throw MakeTypeError("called_on_non_object", ["Object.isFrozen"]); 1336 throw MakeTypeError("called_on_non_object", ["Object.isFrozen"]);
1335 } 1337 }
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 %SetCode($Function, FunctionConstructor); 1865 %SetCode($Function, FunctionConstructor);
1864 %AddNamedProperty($Function.prototype, "constructor", $Function, DONT_ENUM); 1866 %AddNamedProperty($Function.prototype, "constructor", $Function, DONT_ENUM);
1865 1867
1866 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1868 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1867 "bind", FunctionBind, 1869 "bind", FunctionBind,
1868 "toString", FunctionToString 1870 "toString", FunctionToString
1869 )); 1871 ));
1870 } 1872 }
1871 1873
1872 SetUpFunction(); 1874 SetUpFunction();
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698