| 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 $errorToString; | 7 var $errorToString; |
| 8 var $formatMessage; | 8 var $formatMessage; |
| 9 var $getStackTraceLine; | 9 var $getStackTraceLine; |
| 10 var $messageGetPositionInLine; | 10 var $messageGetPositionInLine; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 malformed_regexp_flags: ["Invalid regular expression flags"], | 63 malformed_regexp_flags: ["Invalid regular expression flags"], |
| 64 unterminated_regexp: ["Invalid regular expression: missing /"], | 64 unterminated_regexp: ["Invalid regular expression: missing /"], |
| 65 unterminated_template: ["Unterminated template literal"], | 65 unterminated_template: ["Unterminated template literal"], |
| 66 unterminated_template_expr: ["Missing } in template expression"], | 66 unterminated_template_expr: ["Missing } in template expression"], |
| 67 unterminated_arg_list: ["missing ) after argument list"], | 67 unterminated_arg_list: ["missing ) after argument list"], |
| 68 regexp_flags: ["Cannot supply flags when constructing one Reg
Exp from another"], | 68 regexp_flags: ["Cannot supply flags when constructing one Reg
Exp from another"], |
| 69 multiple_defaults_in_switch: ["More than one default clause in switch statem
ent"], | 69 multiple_defaults_in_switch: ["More than one default clause in switch statem
ent"], |
| 70 newline_after_throw: ["Illegal newline after throw"], | 70 newline_after_throw: ["Illegal newline after throw"], |
| 71 label_redeclaration: ["Label '", "%0", "' has already been declared"
], | 71 label_redeclaration: ["Label '", "%0", "' has already been declared"
], |
| 72 var_redeclaration: ["Identifier '", "%0", "' has already been decl
ared"], | 72 var_redeclaration: ["Identifier '", "%0", "' has already been decl
ared"], |
| 73 duplicate_template_property: ["Object template has duplicate property '", "%
0", "'"], | |
| 74 no_catch_or_finally: ["Missing catch or finally after try"], | 73 no_catch_or_finally: ["Missing catch or finally after try"], |
| 75 unknown_label: ["Undefined label '", "%0", "'"], | 74 unknown_label: ["Undefined label '", "%0", "'"], |
| 76 uncaught_exception: ["Uncaught ", "%0"], | 75 uncaught_exception: ["Uncaught ", "%0"], |
| 77 undefined_method: ["Object ", "%1", " has no method '", "%0", "'"
], | 76 undefined_method: ["Object ", "%1", " has no method '", "%0", "'"
], |
| 78 non_object_property_load: ["Cannot read property '", "%0", "' of ", "%1"]
, | |
| 79 non_object_property_store: ["Cannot set property '", "%0", "' of ", "%1"], | 77 non_object_property_store: ["Cannot set property '", "%0", "' of ", "%1"], |
| 80 illegal_invocation: ["Illegal invocation"], | |
| 81 no_setter_in_callback: ["Cannot set property ", "%0", " of ", "%1", "
which has only a getter"], | |
| 82 value_and_accessor: ["Invalid property. A property cannot both hav
e accessors and be writable or have a value, ", "%0"], | 78 value_and_accessor: ["Invalid property. A property cannot both hav
e accessors and be writable or have a value, ", "%0"], |
| 83 proto_object_or_null: ["Object prototype may only be an Object or nul
l: ", "%0"], | 79 proto_object_or_null: ["Object prototype may only be an Object or nul
l: ", "%0"], |
| 84 non_extensible_proto: ["%0", " is not extensible"], | |
| 85 invalid_weakmap_key: ["Invalid value used as weak map key"], | 80 invalid_weakmap_key: ["Invalid value used as weak map key"], |
| 86 invalid_weakset_value: ["Invalid value used in weak set"], | 81 invalid_weakset_value: ["Invalid value used in weak set"], |
| 87 not_date_object: ["this is not a Date object."], | |
| 88 not_a_symbol: ["%0", " is not a symbol"], | 82 not_a_symbol: ["%0", " is not a symbol"], |
| 89 // ReferenceError | 83 // ReferenceError |
| 90 invalid_lhs_in_assignment: ["Invalid left-hand side in assignment"], | 84 invalid_lhs_in_assignment: ["Invalid left-hand side in assignment"], |
| 91 invalid_lhs_in_for: ["Invalid left-hand side in for-loop"], | 85 invalid_lhs_in_for: ["Invalid left-hand side in for-loop"], |
| 92 invalid_lhs_in_postfix_op: ["Invalid left-hand side expression in postfix
operation"], | 86 invalid_lhs_in_postfix_op: ["Invalid left-hand side expression in postfix
operation"], |
| 93 invalid_lhs_in_prefix_op: ["Invalid left-hand side expression in prefix o
peration"], | 87 invalid_lhs_in_prefix_op: ["Invalid left-hand side expression in prefix o
peration"], |
| 94 // SyntaxError | 88 // SyntaxError |
| 95 not_isvar: ["builtin %IS_VAR: not a variable"], | 89 not_isvar: ["builtin %IS_VAR: not a variable"], |
| 96 single_function_literal: ["Single function literal required"], | 90 single_function_literal: ["Single function literal required"], |
| 97 invalid_regexp_flags: ["Invalid flags supplied to RegExp constructor
'", "%0", "'"], | 91 invalid_regexp_flags: ["Invalid flags supplied to RegExp constructor
'", "%0", "'"], |
| 98 invalid_regexp: ["Invalid RegExp pattern /", "%0", "/"], | 92 invalid_regexp: ["Invalid RegExp pattern /", "%0", "/"], |
| 99 illegal_break: ["Illegal break statement"], | 93 illegal_break: ["Illegal break statement"], |
| 100 illegal_continue: ["Illegal continue statement"], | 94 illegal_continue: ["Illegal continue statement"], |
| 101 illegal_return: ["Illegal return statement"], | 95 illegal_return: ["Illegal return statement"], |
| 102 error_loading_debugger: ["Error loading debugger"], | 96 error_loading_debugger: ["Error loading debugger"], |
| 103 circular_structure: ["Converting circular structure to JSON"], | |
| 104 array_indexof_not_defined: ["Array.getIndexOf: Argument undefined"], | 97 array_indexof_not_defined: ["Array.getIndexOf: Argument undefined"], |
| 105 object_not_extensible: ["Can't add property ", "%0", ", object is not
extensible"], | |
| 106 illegal_access: ["Illegal access"], | 98 illegal_access: ["Illegal access"], |
| 107 static_prototype: ["Classes may not have static property named pr
ototype"], | 99 static_prototype: ["Classes may not have static property named pr
ototype"], |
| 108 strict_mode_with: ["Strict mode code may not include a with state
ment"], | 100 strict_mode_with: ["Strict mode code may not include a with state
ment"], |
| 109 strict_eval_arguments: ["Unexpected eval or arguments in strict mode"]
, | 101 strict_eval_arguments: ["Unexpected eval or arguments in strict mode"]
, |
| 110 too_many_arguments: ["Too many arguments in function call (only 655
35 allowed)"], | 102 too_many_arguments: ["Too many arguments in function call (only 655
35 allowed)"], |
| 111 too_many_parameters: ["Too many parameters in function definition (o
nly 65535 allowed)"], | 103 too_many_parameters: ["Too many parameters in function definition (o
nly 65535 allowed)"], |
| 112 too_many_variables: ["Too many variables declared (only 4194303 all
owed)"], | 104 too_many_variables: ["Too many variables declared (only 4194303 all
owed)"], |
| 113 strict_param_dupe: ["Strict mode function may not have duplicate p
arameter names"], | 105 strict_param_dupe: ["Strict mode function may not have duplicate p
arameter names"], |
| 114 strict_octal_literal: ["Octal literals are not allowed in strict mode
."], | 106 strict_octal_literal: ["Octal literals are not allowed in strict mode
."], |
| 115 template_octal_literal: ["Octal literals are not allowed in template st
rings."], | 107 template_octal_literal: ["Octal literals are not allowed in template st
rings."], |
| 116 strict_delete: ["Delete of an unqualified identifier in strict
mode."], | 108 strict_delete: ["Delete of an unqualified identifier in strict
mode."], |
| 117 strict_delete_property: ["Cannot delete property '", "%0", "' of ", "%1
"], | |
| 118 strict_function: ["In strict mode code, functions can only be de
clared at top level or immediately within another function." ], | 109 strict_function: ["In strict mode code, functions can only be de
clared at top level or immediately within another function." ], |
| 119 strict_read_only_property: ["Cannot assign to read only property '", "%0",
"' of ", "%1"], | |
| 120 strict_cannot_assign: ["Cannot assign to read only '", "%0", "' in st
rict mode"], | |
| 121 restricted_function_properties: ["'caller' and 'arguments' are restricted func
tion properties and cannot be accessed in this context."], | |
| 122 strict_poison_pill: ["'caller', 'callee', and 'arguments' propertie
s may not be accessed on strict mode functions or the arguments objects for call
s to them"], | |
| 123 strict_caller: ["Illegal access to a strict mode caller functi
on."], | 110 strict_caller: ["Illegal access to a strict mode caller functi
on."], |
| 124 strong_ellision: ["In strong mode, arrays with holes are depreca
ted, use maps instead"], | 111 strong_ellision: ["In strong mode, arrays with holes are depreca
ted, use maps instead"], |
| 125 strong_arguments: ["In strong mode, 'arguments' is deprecated, us
e '...args' instead"], | 112 strong_arguments: ["In strong mode, 'arguments' is deprecated, us
e '...args' instead"], |
| 126 strong_undefined: ["In strong mode, binding or assigning to 'unde
fined' is deprecated"], | 113 strong_undefined: ["In strong mode, binding or assigning to 'unde
fined' is deprecated"], |
| 127 strong_implicit_cast: ["In strong mode, implicit conversions are depr
ecated"], | |
| 128 strong_direct_eval: ["In strong mode, direct calls to eval are depr
ecated"], | 114 strong_direct_eval: ["In strong mode, direct calls to eval are depr
ecated"], |
| 129 strong_switch_fallthrough : ["In strong mode, switch fall-through is deprec
ated, terminate each case with 'break', 'continue', 'return' or 'throw'"], | 115 strong_switch_fallthrough : ["In strong mode, switch fall-through is deprec
ated, terminate each case with 'break', 'continue', 'return' or 'throw'"], |
| 130 strong_equal: ["In strong mode, '==' and '!=' are deprecated,
use '===' and '!==' instead"], | 116 strong_equal: ["In strong mode, '==' and '!=' are deprecated,
use '===' and '!==' instead"], |
| 131 strong_delete: ["In strong mode, 'delete' is deprecated, use m
aps or sets instead"], | 117 strong_delete: ["In strong mode, 'delete' is deprecated, use m
aps or sets instead"], |
| 132 strong_var: ["In strong mode, 'var' is deprecated, use 'let
' or 'const' instead"], | 118 strong_var: ["In strong mode, 'var' is deprecated, use 'let
' or 'const' instead"], |
| 133 strong_for_in: ["In strong mode, 'for'-'in' loops are deprecat
ed, use 'for'-'of' instead"], | 119 strong_for_in: ["In strong mode, 'for'-'in' loops are deprecat
ed, use 'for'-'of' instead"], |
| 134 strong_empty: ["In strong mode, empty sub-statements are depr
ecated, make them explicit with '{}' instead"], | 120 strong_empty: ["In strong mode, empty sub-statements are depr
ecated, make them explicit with '{}' instead"], |
| 135 strong_use_before_declaration: ["In strong mode, declaring variable '", "%0",
"' before its use is required"], | 121 strong_use_before_declaration: ["In strong mode, declaring variable '", "%0",
"' before its use is required"], |
| 136 strong_unbound_global: ["In strong mode, using an undeclared global va
riable '", "%0", "' is not allowed"], | 122 strong_unbound_global: ["In strong mode, using an undeclared global va
riable '", "%0", "' is not allowed"], |
| 137 strong_super_call_missing: ["In strong mode, invoking the super constructo
r in a subclass is required"], | 123 strong_super_call_missing: ["In strong mode, invoking the super constructo
r in a subclass is required"], |
| 138 strong_super_call_duplicate: ["In strong mode, invoking the super constructo
r multiple times is deprecated"], | 124 strong_super_call_duplicate: ["In strong mode, invoking the super constructo
r multiple times is deprecated"], |
| 139 strong_super_call_misplaced: ["In strong mode, the super constructor must be
invoked before any assignment to 'this'"], | 125 strong_super_call_misplaced: ["In strong mode, the super constructor must be
invoked before any assignment to 'this'"], |
| 140 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"], | 126 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"], |
| 141 strong_constructor_this: ["In strong mode, 'this' can only be used to in
itialize properties, and cannot be nested inside another statement or expression
"], | 127 strong_constructor_this: ["In strong mode, 'this' can only be used to in
itialize properties, and cannot be nested inside another statement or expression
"], |
| 142 strong_constructor_return_value: ["In strong mode, returning a value from a co
nstructor is deprecated"], | 128 strong_constructor_return_value: ["In strong mode, returning a value from a co
nstructor is deprecated"], |
| 143 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"], | 129 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"], |
| 144 strong_arity: ["In strong mode, calling a function with too f
ew arguments is deprecated"], | |
| 145 sloppy_lexical: ["Block-scoped declarations (let, const, functi
on, class) not yet supported outside strict mode"], | 130 sloppy_lexical: ["Block-scoped declarations (let, const, functi
on, class) not yet supported outside strict mode"], |
| 146 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], | 131 malformed_arrow_function_parameter_list: ["Malformed arrow function parameter
list"], |
| 147 cant_prevent_ext_external_array_elements: ["Cannot prevent extension of an obj
ect with external array elements"], | |
| 148 redef_external_array_element: ["Cannot redefine a property of an object with
external array elements"], | |
| 149 const_assign: ["Assignment to constant variable."], | |
| 150 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], | 132 module_export_undefined: ["Export '", "%0", "' is not defined in module"
], |
| 151 duplicate_export: ["Duplicate export of '", "%0", "'"], | 133 duplicate_export: ["Duplicate export of '", "%0", "'"], |
| 152 unexpected_super: ["'super' keyword unexpected here"], | 134 unexpected_super: ["'super' keyword unexpected here"], |
| 153 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct
ion or null"], | |
| 154 extends_value_generator: ["Class extends value ", "%0", " may not be a g
enerator function"], | |
| 155 prototype_parent_not_an_object: ["Class extends value does not have valid prot
otype property ", "%0"], | |
| 156 duplicate_constructor: ["A class may only have one constructor"], | 135 duplicate_constructor: ["A class may only have one constructor"], |
| 157 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."], | 136 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."], |
| 158 duplicate_proto: ["Duplicate __proto__ fields are not allowed in
object literals"], | 137 duplicate_proto: ["Duplicate __proto__ fields are not allowed in
object literals"], |
| 159 param_after_rest: ["Rest parameter must be last formal parameter"
], | 138 param_after_rest: ["Rest parameter must be last formal parameter"
], |
| 160 derived_constructor_return: ["Derived constructors may only return object o
r undefined"], | 139 derived_constructor_return: ["Derived constructors may only return object o
r undefined"], |
| 161 for_in_loop_initializer: ["for-in loop variable declaration may not have
an initializer."], | 140 for_in_loop_initializer: ["for-in loop variable declaration may not have
an initializer."], |
| 162 for_of_loop_initializer: ["for-of loop variable declaration may not have
an initializer."], | 141 for_of_loop_initializer: ["for-of loop variable declaration may not have
an initializer."], |
| 163 for_inof_loop_multi_bindings: ["Invalid left-hand side in ", "%0", " loop: Mu
st have a single binding."], | 142 for_inof_loop_multi_bindings: ["Invalid left-hand side in ", "%0", " loop: Mu
st have a single binding."], |
| 164 bad_getter_arity: ["Getter must not have any formal parameters."]
, | 143 bad_getter_arity: ["Getter must not have any formal parameters."]
, |
| 165 bad_setter_arity: ["Setter must have exactly one formal parameter
."], | 144 bad_setter_arity: ["Setter must have exactly one formal parameter
."], |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 return MakeGenericError(GlobalTypeError, type, [arg]); | 1210 return MakeGenericError(GlobalTypeError, type, [arg]); |
| 1232 } | 1211 } |
| 1233 | 1212 |
| 1234 //Boilerplate for exceptions for stack overflows. Used from | 1213 //Boilerplate for exceptions for stack overflows. Used from |
| 1235 //Isolate::StackOverflow(). | 1214 //Isolate::StackOverflow(). |
| 1236 $stackOverflowBoilerplate = MakeRangeError(kStackOverflow); | 1215 $stackOverflowBoilerplate = MakeRangeError(kStackOverflow); |
| 1237 %DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack', | 1216 %DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack', |
| 1238 StackTraceGetter, StackTraceSetter, DONT_ENUM); | 1217 StackTraceGetter, StackTraceSetter, DONT_ENUM); |
| 1239 | 1218 |
| 1240 }) | 1219 }) |
| OLD | NEW |