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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 T(MalformedRegExpFlags, "Invalid regular expression flags") \ | 316 T(MalformedRegExpFlags, "Invalid regular expression flags") \ |
317 T(ModuleExportUndefined, "Export '%' is not defined in module") \ | 317 T(ModuleExportUndefined, "Export '%' is not defined in module") \ |
318 T(MultipleDefaultsInSwitch, \ | 318 T(MultipleDefaultsInSwitch, \ |
319 "More than one default clause in switch statement") \ | 319 "More than one default clause in switch statement") \ |
320 T(NewlineAfterThrow, "Illegal newline after throw") \ | 320 T(NewlineAfterThrow, "Illegal newline after throw") \ |
321 T(NoCatchOrFinally, "Missing catch or finally after try") \ | 321 T(NoCatchOrFinally, "Missing catch or finally after try") \ |
322 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ | 322 T(NotIsvar, "builtin %%IS_VAR: not a variable") \ |
323 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ | 323 T(ParamAfterRest, "Rest parameter must be last formal parameter") \ |
324 T(BadSetterRestParameter, \ | 324 T(BadSetterRestParameter, \ |
325 "Setter function argument must not be a rest parameter") \ | 325 "Setter function argument must not be a rest parameter") \ |
| 326 T(BadRestParameterInitializer, \ |
| 327 "Rest parameters must not have an initializer") \ |
326 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 328 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
327 T(SingleFunctionLiteral, "Single function literal required") \ | 329 T(SingleFunctionLiteral, "Single function literal required") \ |
328 T(SloppyLexical, \ | 330 T(SloppyLexical, \ |
329 "Block-scoped declarations (let, const, function, class) not yet " \ | 331 "Block-scoped declarations (let, const, function, class) not yet " \ |
330 "supported outside strict mode") \ | 332 "supported outside strict mode") \ |
331 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 333 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
332 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 334 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
333 T(StrictFunction, \ | 335 T(StrictFunction, \ |
334 "In strict mode code, functions can only be declared at top level or " \ | 336 "In strict mode code, functions can only be declared at top level or " \ |
335 "immediately within another function.") \ | 337 "immediately within another function.") \ |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 442 |
441 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, | 443 static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc, |
442 Handle<Object> message_obj); | 444 Handle<Object> message_obj); |
443 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 445 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
444 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 446 static SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
445 Handle<Object> data); | 447 Handle<Object> data); |
446 }; | 448 }; |
447 } } // namespace v8::internal | 449 } } // namespace v8::internal |
448 | 450 |
449 #endif // V8_MESSAGES_H_ | 451 #endif // V8_MESSAGES_H_ |
OLD | NEW |