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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 strict_mode_with: "Strict mode code may not include a with sta
tement", | 229 strict_mode_with: "Strict mode code may not include a with sta
tement", |
230 strict_catch_variable: "Catch variable may not be eval or arguments
in strict mode", | 230 strict_catch_variable: "Catch variable may not be eval or arguments
in strict mode", |
231 strict_param_name: "Parameter name eval or arguments is not all
owed in strict mode", | 231 strict_param_name: "Parameter name eval or arguments is not all
owed in strict mode", |
232 strict_param_dupe: "Strict mode function may not have duplicate
parameter names", | 232 strict_param_dupe: "Strict mode function may not have duplicate
parameter names", |
233 strict_var_name: "Variable name may not be eval or arguments
in strict mode", | 233 strict_var_name: "Variable name may not be eval or arguments
in strict mode", |
234 strict_function_name: "Function name may not be eval or arguments
in strict mode", | 234 strict_function_name: "Function name may not be eval or arguments
in strict mode", |
235 strict_octal_literal: "Octal literals are not allowed in strict mo
de.", | 235 strict_octal_literal: "Octal literals are not allowed in strict mo
de.", |
236 strict_duplicate_property: "Duplicate data property in object literal n
ot allowed in strict mode", | 236 strict_duplicate_property: "Duplicate data property in object literal n
ot allowed in strict mode", |
237 accessor_data_property: "Object literal may not have data and access
or property with the same name", | 237 accessor_data_property: "Object literal may not have data and access
or property with the same name", |
238 accessor_get_set: "Object literal may not have multiple get/se
t accessors with the same name", | 238 accessor_get_set: "Object literal may not have multiple get/se
t accessors with the same name", |
| 239 strict_lhs_eval_assignment: "Assignment to eval or arguments is not allo
wed in strict mode", |
| 240 strict_lhs_postfix: "Postfix increment/decrement may not have ev
al or arguments operand in strict mode", |
| 241 strict_lhs_prefix: "Prefix increment/decrement may not have eva
l or arguments operand in strict mode", |
239 }; | 242 }; |
240 } | 243 } |
241 var format = kMessages[message.type]; | 244 var format = kMessages[message.type]; |
242 if (!format) return "<unknown message " + message.type + ">"; | 245 if (!format) return "<unknown message " + message.type + ">"; |
243 return FormatString(format, message.args); | 246 return FormatString(format, message.args); |
244 } | 247 } |
245 | 248 |
246 | 249 |
247 function GetLineNumber(message) { | 250 function GetLineNumber(message) { |
248 if (message.startPos == -1) return kNoLineNumberInfo; | 251 if (message.startPos == -1) return kNoLineNumberInfo; |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 else throw e; | 1076 else throw e; |
1074 } | 1077 } |
1075 } | 1078 } |
1076 | 1079 |
1077 %FunctionSetName(errorToString, 'toString'); | 1080 %FunctionSetName(errorToString, 'toString'); |
1078 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM); | 1081 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM); |
1079 | 1082 |
1080 // Boilerplate for exceptions for stack overflows. Used from | 1083 // Boilerplate for exceptions for stack overflows. Used from |
1081 // Top::StackOverflow(). | 1084 // Top::StackOverflow(). |
1082 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); | 1085 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); |
OLD | NEW |