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

Side by Side Diff: src/runtime.js

Issue 1118273004: Migrate error messages, part 8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/proxy.js ('k') | src/runtime/runtime-array.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 files contains runtime support implemented in JavaScript. 5 // This files contains runtime support implemented in JavaScript.
6 6
7 // CAUTION: Some of the functions specified in this file are called 7 // CAUTION: Some of the functions specified in this file are called
8 // directly from compiled code. These are the functions with names in 8 // directly from compiled code. These are the functions with names in
9 // ALL CAPS. The compiled code passes the first argument in 'this'. 9 // ALL CAPS. The compiled code passes the first argument in 'this'.
10 10
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 869
870 var valueOf = x.valueOf; 870 var valueOf = x.valueOf;
871 if (IS_SPEC_FUNCTION(valueOf)) { 871 if (IS_SPEC_FUNCTION(valueOf)) {
872 var v = %_CallFunction(x, valueOf); 872 var v = %_CallFunction(x, valueOf);
873 if (%IsPrimitive(v)) return v; 873 if (%IsPrimitive(v)) return v;
874 } 874 }
875 } 875 }
876 throw %MakeTypeError(kCannotConvertToPrimitive); 876 throw %MakeTypeError(kCannotConvertToPrimitive);
877 } 877 }
878 878
879 function ToPositiveInteger(x, rangeErrorName) { 879 function ToPositiveInteger(x, rangeErrorIndex) {
880 var i = TO_INTEGER_MAP_MINUS_ZERO(x); 880 var i = TO_INTEGER_MAP_MINUS_ZERO(x);
881 if (i < 0) throw MakeRangeError(rangeErrorName); 881 if (i < 0) throw MakeRangeError(rangeErrorIndex);
882 return i; 882 return i;
883 } 883 }
884 884
885 885
886 // NOTE: Setting the prototype for Array must take place as early as 886 // NOTE: Setting the prototype for Array must take place as early as
887 // possible due to code generation for array literals. When 887 // possible due to code generation for array literals. When
888 // generating code for a array literal a boilerplate array is created 888 // generating code for a array literal a boilerplate array is created
889 // that is cloned when running the code. It is essential that the 889 // that is cloned when running the code. It is essential that the
890 // boilerplate gets the right prototype. 890 // boilerplate gets the right prototype.
891 %FunctionSetPrototype($Array, new $Array(0)); 891 %FunctionSetPrototype($Array, new $Array(0));
892 892
893 893
894 /* ----------------------------------------------- 894 /* -----------------------------------------------
895 - - - J a v a S c r i p t S t u b s - - - 895 - - - J a v a S c r i p t S t u b s - - -
896 ----------------------------------------------- 896 -----------------------------------------------
897 */ 897 */
898 898
899 function STRING_LENGTH_STUB(name) { 899 function STRING_LENGTH_STUB(name) {
900 var receiver = this; // implicit first parameter 900 var receiver = this; // implicit first parameter
901 return %_StringGetLength(%_JSValueGetValue(receiver)); 901 return %_StringGetLength(%_JSValueGetValue(receiver));
902 } 902 }
OLDNEW
« no previous file with comments | « src/proxy.js ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698