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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 strict_caller: ["Illegal access to a strict mode caller functi
on."], | 157 strict_caller: ["Illegal access to a strict mode caller functi
on."], |
158 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], | 158 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], |
159 generator_poison_pill: ["'caller' and 'arguments' properties may not b
e accessed on generator functions."], | 159 generator_poison_pill: ["'caller' and 'arguments' properties may not b
e accessed on generator functions."], |
160 unprotected_let: ["Illegal let declaration in unprotected statem
ent context."], | 160 unprotected_let: ["Illegal let declaration in unprotected statem
ent context."], |
161 unprotected_const: ["Illegal const declaration in unprotected stat
ement context."], | 161 unprotected_const: ["Illegal const declaration in unprotected stat
ement context."], |
162 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj
ect with external array elements"], | 162 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj
ect with external array elements"], |
163 redef_external_array_element: ["Cannot redefine a property of an object with
external array elements"], | 163 redef_external_array_element: ["Cannot redefine a property of an object with
external array elements"], |
164 harmony_const_assign: ["Assignment to constant variable."], | 164 harmony_const_assign: ["Assignment to constant variable."], |
165 symbol_to_string: ["Cannot convert a Symbol value to a string"], | 165 symbol_to_string: ["Cannot convert a Symbol value to a string"], |
166 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p
rimitive value"], | 166 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p
rimitive value"], |
| 167 symbol_to_number: ["Cannot convert a Symbol value to a number"], |
167 invalid_module_path: ["Module does not export '", "%0", "', or expor
t is not itself a module"], | 168 invalid_module_path: ["Module does not export '", "%0", "', or expor
t is not itself a module"], |
168 module_type_error: ["Module '", "%0", "' used improperly"], | 169 module_type_error: ["Module '", "%0", "' used improperly"], |
169 module_export_undefined: ["Export '", "%0", "' is not defined in module"
] | 170 module_export_undefined: ["Export '", "%0", "' is not defined in module"
] |
170 }; | 171 }; |
171 | 172 |
172 | 173 |
173 function FormatString(format, args) { | 174 function FormatString(format, args) { |
174 var result = ""; | 175 var result = ""; |
175 var arg_num = 0; | 176 var arg_num = 0; |
176 for (var i = 0; i < format.length; i++) { | 177 for (var i = 0; i < format.length; i++) { |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 function SetUpStackOverflowBoilerplate() { | 1284 function SetUpStackOverflowBoilerplate() { |
1284 var boilerplate = MakeRangeError('stack_overflow', []); | 1285 var boilerplate = MakeRangeError('stack_overflow', []); |
1285 | 1286 |
1286 %DefineAccessorPropertyUnchecked( | 1287 %DefineAccessorPropertyUnchecked( |
1287 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1288 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
1288 | 1289 |
1289 return boilerplate; | 1290 return boilerplate; |
1290 } | 1291 } |
1291 | 1292 |
1292 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1293 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |