OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", | 202 array_indexof_not_defined: "Array.getIndexOf: Argument undefined", |
203 object_not_extensible: "Can't add property %0, object is not extens
ible", | 203 object_not_extensible: "Can't add property %0, object is not extens
ible", |
204 illegal_access: "Illegal access", | 204 illegal_access: "Illegal access", |
205 invalid_preparser_data: "Invalid preparser data for function %0", | 205 invalid_preparser_data: "Invalid preparser data for function %0", |
206 strict_mode_with: "Strict mode code may not include a with sta
tement", | 206 strict_mode_with: "Strict mode code may not include a with sta
tement", |
207 strict_catch_variable: "Catch variable may not be eval or arguments
in strict mode", | 207 strict_catch_variable: "Catch variable may not be eval or arguments
in strict mode", |
208 strict_param_name: "Parameter name eval or arguments is not all
owed in strict mode", | 208 strict_param_name: "Parameter name eval or arguments is not all
owed in strict mode", |
209 strict_param_dupe: "Strict mode function may not have duplicate
parameter names", | 209 strict_param_dupe: "Strict mode function may not have duplicate
parameter names", |
210 strict_var_name: "Variable name may not be eval or arguments
in strict mode", | 210 strict_var_name: "Variable name may not be eval or arguments
in strict mode", |
211 strict_function_name: "Function name may not be eval or arguments
in strict mode", | 211 strict_function_name: "Function name may not be eval or arguments
in strict mode", |
| 212 strict_duplicate_property: "Duplicate data property in object literal n
ot allowed in strict mode", |
| 213 accessor_data_property: "Object literal may not have data and access
or property with the same name", |
| 214 accessor_get_set: "Object literal may not have multiple get/se
t accessors with the same name", |
212 }; | 215 }; |
213 } | 216 } |
214 var format = kMessages[message.type]; | 217 var format = kMessages[message.type]; |
215 if (!format) return "<unknown message " + message.type + ">"; | 218 if (!format) return "<unknown message " + message.type + ">"; |
216 return FormatString(format, message.args); | 219 return FormatString(format, message.args); |
217 } | 220 } |
218 | 221 |
219 | 222 |
220 function GetLineNumber(message) { | 223 function GetLineNumber(message) { |
221 if (message.startPos == -1) return kNoLineNumberInfo; | 224 if (message.startPos == -1) return kNoLineNumberInfo; |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 return this.name + message; | 1024 return this.name + message; |
1022 } | 1025 } |
1023 | 1026 |
1024 %FunctionSetName(errorToString, 'toString'); | 1027 %FunctionSetName(errorToString, 'toString'); |
1025 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM); | 1028 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM); |
1026 | 1029 |
1027 | 1030 |
1028 // Boilerplate for exceptions for stack overflows. Used from | 1031 // Boilerplate for exceptions for stack overflows. Used from |
1029 // Top::StackOverflow(). | 1032 // Top::StackOverflow(). |
1030 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1033 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |