Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // ------------------------------------------------------------------- | 5 // ------------------------------------------------------------------- |
| 6 | 6 |
| 7 var kMessages = { | 7 var kMessages = { |
| 8 // Error | 8 // Error |
| 9 cyclic_proto: ["Cyclic __proto__ value"], | 9 cyclic_proto: ["Cyclic __proto__ value"], |
| 10 code_gen_from_strings: ["%0"], | 10 code_gen_from_strings: ["%0"], |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], | 193 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], |
| 194 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], | 194 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], |
| 195 duplicate_constructor: ["A class may only have one constructor"], | 195 duplicate_constructor: ["A class may only have one constructor"], |
| 196 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."], | 196 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."], |
| 197 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"], | 197 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"], |
| 198 param_after_rest: ["Rest parameter must be last formal parameter" ], | 198 param_after_rest: ["Rest parameter must be last formal parameter" ], |
| 199 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"], | 199 constructor_noncallable: ["Class constructors cannot be invoked without 'new'"], |
| 200 array_not_subclassable: ["Subclassing Arrays is not currently supported ."], | 200 array_not_subclassable: ["Subclassing Arrays is not currently supported ."], |
| 201 for_in_loop_initializer: ["for-in loop variable declaration may not have an initializer."], | 201 for_in_loop_initializer: ["for-in loop variable declaration may not have an initializer."], |
| 202 for_of_loop_initializer: ["for-of loop variable declaration may not have an initializer."], | 202 for_of_loop_initializer: ["for-of loop variable declaration may not have an initializer."], |
| 203 for_inof_loop_multi_bindings: ["Invalid left-hand side in ", "%0", " loop: Mu st have a single binding."] | 203 for_inof_loop_multi_bindings: ["Invalid left-hand side in ", "%0", " loop: Mu st have a single binding."], |
| 204 bad_getter_arity: ["Getters should not have any formal parameters ."], | |
|
arv (Not doing code reviews)
2015/04/10 14:35:50
Maybe use "must" here
Getter must not have any ..
| |
| 205 bad_setter_arity: ["Setters should only have one formal parameter ."] | |
| 204 }; | 206 }; |
| 205 | 207 |
| 206 | 208 |
| 207 function FormatString(format, args) { | 209 function FormatString(format, args) { |
| 208 var result = ""; | 210 var result = ""; |
| 209 var arg_num = 0; | 211 var arg_num = 0; |
| 210 for (var i = 0; i < format.length; i++) { | 212 for (var i = 0; i < format.length; i++) { |
| 211 var str = format[i]; | 213 var str = format[i]; |
| 212 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 214 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { |
| 213 // Two-char string starts with "%". | 215 // Two-char string starts with "%". |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1281 function SetUpStackOverflowBoilerplate() { | 1283 function SetUpStackOverflowBoilerplate() { |
| 1282 var boilerplate = MakeRangeError('stack_overflow', []); | 1284 var boilerplate = MakeRangeError('stack_overflow', []); |
| 1283 | 1285 |
| 1284 %DefineAccessorPropertyUnchecked( | 1286 %DefineAccessorPropertyUnchecked( |
| 1285 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1287 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
| 1286 | 1288 |
| 1287 return boilerplate; | 1289 return boilerplate; |
| 1288 } | 1290 } |
| 1289 | 1291 |
| 1290 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1292 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
| OLD | NEW |