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 constructor_is_generator: ["Class constructor may not be a generator"], | 9 constructor_is_generator: ["Class constructor may not be a generator"], |
10 constructor_is_accessor: ["Class constructor may not be an accessor"], | 10 constructor_is_accessor: ["Class constructor may not be an accessor"], |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 strong_switch_fallthrough : ["In strong mode, switch fall-through is deprec
ated, terminate each case with 'break', 'continue', 'return' or 'throw'"], | 136 strong_switch_fallthrough : ["In strong mode, switch fall-through is deprec
ated, terminate each case with 'break', 'continue', 'return' or 'throw'"], |
137 strong_equal: ["In strong mode, '==' and '!=' are deprecated,
use '===' and '!==' instead"], | 137 strong_equal: ["In strong mode, '==' and '!=' are deprecated,
use '===' and '!==' instead"], |
138 strong_delete: ["In strong mode, 'delete' is deprecated, use m
aps or sets instead"], | 138 strong_delete: ["In strong mode, 'delete' is deprecated, use m
aps or sets instead"], |
139 strong_var: ["In strong mode, 'var' is deprecated, use 'let
' or 'const' instead"], | 139 strong_var: ["In strong mode, 'var' is deprecated, use 'let
' or 'const' instead"], |
140 strong_for_in: ["In strong mode, 'for'-'in' loops are deprecat
ed, use 'for'-'of' instead"], | 140 strong_for_in: ["In strong mode, 'for'-'in' loops are deprecat
ed, use 'for'-'of' instead"], |
141 strong_empty: ["In strong mode, empty sub-statements are depr
ecated, make them explicit with '{}' instead"], | 141 strong_empty: ["In strong mode, empty sub-statements are depr
ecated, make them explicit with '{}' instead"], |
142 strong_use_before_declaration: ["In strong mode, declaring variable '", "%0",
"' before its use is required"], | 142 strong_use_before_declaration: ["In strong mode, declaring variable '", "%0",
"' before its use is required"], |
143 strong_unbound_global: ["In strong mode, using an undeclared global va
riable '", "%0", "' is not allowed"], | 143 strong_unbound_global: ["In strong mode, using an undeclared global va
riable '", "%0", "' is not allowed"], |
144 strong_super_call_missing: ["In strong mode, invoking the super constructo
r in a subclass is required"], | 144 strong_super_call_missing: ["In strong mode, invoking the super constructo
r in a subclass is required"], |
145 strong_super_call_duplicate: ["In strong mode, invoking the super constructo
r multiple times is deprecated"], | 145 strong_super_call_duplicate: ["In strong mode, invoking the super constructo
r multiple times is deprecated"], |
146 strong_super_call_nested: ["In strong mode, invoking the super constructo
r nested inside another statement or expression is deprecated"], | 146 strong_super_call_misplaced: ["In strong mode, the super constructor must be
invoked before any assignment to 'this'"], |
| 147 strong_constructor_super: ["In strong mode, 'super' can only be used to i
nvoke the super constructor, and cannot be nested inside another statement or ex
pression"], |
| 148 strong_constructor_this: ["In strong mode, 'this' can only be used to in
itialize properties, and cannot be nested inside another statement or expression
"], |
147 strong_constructor_return_value: ["In strong mode, returning a value from a co
nstructor is deprecated"], | 149 strong_constructor_return_value: ["In strong mode, returning a value from a co
nstructor is deprecated"], |
148 strong_constructor_return_misplaced: ["In strong mode, returning from a constr
uctor before its super constructor invocation is deprecated"], | 150 strong_constructor_return_misplaced: ["In strong mode, returning from a constr
uctor before its super constructor invocation or all assignments to 'this' is de
precated"], |
149 sloppy_lexical: ["Block-scoped declarations (let, const, functi
on, class) not yet supported outside strict mode"], | 151 sloppy_lexical: ["Block-scoped declarations (let, const, functi
on, class) not yet supported outside strict mode"], |
150 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], | 152 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], |
151 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj
ect with external array elements"], | 153 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj
ect with external array elements"], |
152 redef_external_array_element: ["Cannot redefine a property of an object with
external array elements"], | 154 redef_external_array_element: ["Cannot redefine a property of an object with
external array elements"], |
153 const_assign: ["Assignment to constant variable."], | 155 const_assign: ["Assignment to constant variable."], |
154 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], | 156 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], |
155 duplicate_export: ["Duplicate export of '", "%0", "'"], | 157 duplicate_export: ["Duplicate export of '", "%0", "'"], |
156 unexpected_super: ["'super' keyword unexpected here"], | 158 unexpected_super: ["'super' keyword unexpected here"], |
157 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct
ion or null"], | 159 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct
ion or null"], |
158 prototype_parent_not_an_object: ["Class extends value does not have valid prot
otype property ", "%0"], | 160 prototype_parent_not_an_object: ["Class extends value does not have valid prot
otype property ", "%0"], |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 function SetUpStackOverflowBoilerplate() { | 1264 function SetUpStackOverflowBoilerplate() { |
1263 var boilerplate = MakeRangeError(kStackOverflow); | 1265 var boilerplate = MakeRangeError(kStackOverflow); |
1264 | 1266 |
1265 %DefineAccessorPropertyUnchecked( | 1267 %DefineAccessorPropertyUnchecked( |
1266 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1268 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); |
1267 | 1269 |
1268 return boilerplate; | 1270 return boilerplate; |
1269 } | 1271 } |
1270 | 1272 |
1271 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); | 1273 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); |
OLD | NEW |