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") \ | |
336 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 334 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
337 T(SingleFunctionLiteral, "Single function literal required") \ | 335 T(SingleFunctionLiteral, "Single function literal required") \ |
338 T(SloppyLexical, \ | 336 T(SloppyLexical, \ |
339 "Block-scoped declarations (let, const, function, class) not yet " \ | 337 "Block-scoped declarations (let, const, function, class) not yet " \ |
340 "supported outside strict mode") \ | 338 "supported outside strict mode") \ |
341 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 339 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
342 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 340 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
343 T(StrictFunction, \ | 341 T(StrictFunction, \ |
344 "In strict mode code, functions can only be declared at top level or " \ | 342 "In strict mode code, functions can only be declared at top level or " \ |
345 "immediately within another function.") \ | 343 "immediately within another function.") \ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 448 |
451 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, | 449 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, |
452 Handle<Object> message_obj); | 450 Handle<Object> message_obj); |
453 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 451 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
454 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 452 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
455 Handle<Object> data); | 453 Handle<Object> data); |
456 }; | 454 }; |
457 } } // namespace v8::internal | 455 } } // namespace v8::internal |
458 | 456 |
459 #endif // V8_MESSAGES_H_ | 457 #endif // V8_MESSAGES_H_ |
OLD | NEW |