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

Side by Side Diff: src/string.js

Issue 384003003: Replace AddProperty by AddNamedProperty to speed up the common case (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/runtime.cc ('k') | src/string-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 // This file relies on the fact that the following declaration has been made 5 // This file relies on the fact that the following declaration has been made
6 // in runtime.js: 6 // in runtime.js:
7 // var $String = global.String; 7 // var $String = global.String;
8 8
9 // ------------------------------------------------------------------- 9 // -------------------------------------------------------------------
10 10
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 // ------------------------------------------------------------------- 908 // -------------------------------------------------------------------
909 909
910 function SetUpString() { 910 function SetUpString() {
911 %CheckIsBootstrapping(); 911 %CheckIsBootstrapping();
912 912
913 // Set the String function and constructor. 913 // Set the String function and constructor.
914 %SetCode($String, StringConstructor); 914 %SetCode($String, StringConstructor);
915 %FunctionSetPrototype($String, new $String()); 915 %FunctionSetPrototype($String, new $String());
916 916
917 // Set up the constructor property on the String prototype object. 917 // Set up the constructor property on the String prototype object.
918 %AddProperty($String.prototype, "constructor", $String, DONT_ENUM); 918 %AddNamedProperty($String.prototype, "constructor", $String, DONT_ENUM);
919 919
920 // Set up the non-enumerable functions on the String object. 920 // Set up the non-enumerable functions on the String object.
921 InstallFunctions($String, DONT_ENUM, $Array( 921 InstallFunctions($String, DONT_ENUM, $Array(
922 "fromCharCode", StringFromCharCode 922 "fromCharCode", StringFromCharCode
923 )); 923 ));
924 924
925 // Set up the non-enumerable functions on the String prototype object. 925 // Set up the non-enumerable functions on the String prototype object.
926 InstallFunctions($String.prototype, DONT_ENUM, $Array( 926 InstallFunctions($String.prototype, DONT_ENUM, $Array(
927 "valueOf", StringValueOf, 927 "valueOf", StringValueOf,
928 "toString", StringToString, 928 "toString", StringToString,
(...skipping 28 matching lines...) Expand all
957 "fixed", StringFixed, 957 "fixed", StringFixed,
958 "italics", StringItalics, 958 "italics", StringItalics,
959 "small", StringSmall, 959 "small", StringSmall,
960 "strike", StringStrike, 960 "strike", StringStrike,
961 "sub", StringSub, 961 "sub", StringSub,
962 "sup", StringSup 962 "sup", StringSup
963 )); 963 ));
964 } 964 }
965 965
966 SetUpString(); 966 SetUpString();
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698