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 // 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 // The infrastructure used for (localized) message reporting in V8. | 5 // The infrastructure used for (localized) message reporting in V8. |
6 // | 6 // |
7 // Note: there's a big unresolved issue about ownership of the data | 7 // Note: there's a big unresolved issue about ownership of the data |
8 // structures used by this framework. | 8 // structures used by this framework. |
9 | 9 |
10 #ifndef V8_MESSAGES_H_ | 10 #ifndef V8_MESSAGES_H_ |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 T(MalformedRegExpFlags, "Invalid regular expression flags") \ | 324 T(MalformedRegExpFlags, "Invalid regular expression flags") \ |
325 T(ModuleExportUndefined, "Export '%' is not defined in module") \ | 325 T(ModuleExportUndefined, "Export '%' is not defined in module") \ |
326 T(MultipleDefaultsInSwitch, \ | 326 T(MultipleDefaultsInSwitch, \ |
327 "More than one default clause in switch statement") \ | 327 "More than one default clause in switch statement") \ |
328 T(NewlineAfterThrow, "Illegal newline after throw") \ | 328 T(NewlineAfterThrow, "Illegal newline after throw") \ |
329 T(NoCatchOrFinally, "Missing catch or finally after try") \ | 329 T(NoCatchOrFinally, "Missing catch or finally after try") \ |
330 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ | 330 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ |
331 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ | 331 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ |
332 T(BadSetterRestParameter, \ | 332 T(BadSetterRestParameter, \ |
333 "Setter function argument must not be a rest parameter") \ | 333 "Setter function argument must not be a rest parameter") \ |
| 334 T(BadRestParameterInitializer, \ |
| 335 "Rest parameters must not have an initializer") \ |
334 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 336 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
335 T(SingleFunctionLiteral, "Single function literal required") \ | 337 T(SingleFunctionLiteral, "Single function literal required") \ |
336 T(SloppyLexical, \ | 338 T(SloppyLexical, \ |
337 "Block-scoped declarations (let, const, function, class) not yet " \ | 339 "Block-scoped declarations (let, const, function, class) not yet " \ |
338 "supported outside strict mode") \ | 340 "supported outside strict mode") \ |
339 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 341 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
340 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 342 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
341 T(StrictFunction, \ | 343 T(StrictFunction, \ |
342 "In strict mode code, functions can only be declared at top level or " \ | 344 "In strict mode code, functions can only be declared at top level or " \ |
343 "immediately within another function.") \ | 345 "immediately within another function.") \ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 450 |
449 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, | 451 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, |
450 Handle<Object> message_obj); | 452 Handle<Object> message_obj); |
451 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 453 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
452 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 454 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
453 Handle<Object> data); | 455 Handle<Object> data); |
454 }; | 456 }; |
455 } } // namespace v8::internal | 457 } } // namespace v8::internal |
456 | 458 |
457 #endif // V8_MESSAGES_H_ | 459 #endif // V8_MESSAGES_H_ |
OLD | NEW |