| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 symbol_to_number: ["Cannot convert a Symbol value to a number"], | 178 symbol_to_number: ["Cannot convert a Symbol value to a number"], |
| 179 invalid_module_path: ["Module does not export '", "%0", "', or expor
t is not itself a module"], | 179 invalid_module_path: ["Module does not export '", "%0", "', or expor
t is not itself a module"], |
| 180 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], | 180 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], |
| 181 unexpected_super: ["'super' keyword unexpected here"], | 181 unexpected_super: ["'super' keyword unexpected here"], |
| 182 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct
ion or null"], | 182 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct
ion or null"], |
| 183 prototype_parent_not_an_object: ["Class extends value does not have valid prot
otype property ", "%0"], | 183 prototype_parent_not_an_object: ["Class extends value does not have valid prot
otype property ", "%0"], |
| 184 duplicate_constructor: ["A class may only have one constructor"], | 184 duplicate_constructor: ["A class may only have one constructor"], |
| 185 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."], | 185 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."], |
| 186 duplicate_proto: ["Duplicate __proto__ fields are not allowed in
object literals"], | 186 duplicate_proto: ["Duplicate __proto__ fields are not allowed in
object literals"], |
| 187 param_after_rest: ["Rest parameter must be last formal parameter"
], | 187 param_after_rest: ["Rest parameter must be last formal parameter"
], |
| 188 constructor_noncallable: ["Class constructors cannot be invoked without
'new'"] | 188 constructor_noncallable: ["Class constructors cannot be invoked without
'new'"], |
| 189 array_not_subclassable: ["Subclassing Arrays is not currently supported
."] |
| 189 }; | 190 }; |
| 190 | 191 |
| 191 | 192 |
| 192 function FormatString(format, args) { | 193 function FormatString(format, args) { |
| 193 var result = ""; | 194 var result = ""; |
| 194 var arg_num = 0; | 195 var arg_num = 0; |
| 195 for (var i = 0; i < format.length; i++) { | 196 for (var i = 0; i < format.length; i++) { |
| 196 var str = format[i]; | 197 var str = format[i]; |
| 197 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { | 198 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { |
| 198 // Two-char string starts with "%". | 199 // Two-char string starts with "%". |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1319 function SetUpStackOverflowBoilerplate() { | 1320 function SetUpStackOverflowBoilerplate() { |
| 1320 var boilerplate = MakeRangeError('stack_overflow', []); | 1321 var boilerplate = MakeRangeError('stack_overflow', []); |
| 1321 | 1322 |
| 1322 %DefineAccessorPropertyUnchecked( | 1323 %DefineAccessorPropertyUnchecked( |
| 1323 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1324 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
| 1324 | 1325 |
| 1325 return boilerplate; | 1326 return boilerplate; |
| 1326 } | 1327 } |
| 1327 | 1328 |
| 1328 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1329 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
| OLD | NEW |