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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 T(DerivedConstructorReturn, \ | 380 T(DerivedConstructorReturn, \ |
381 "Derived constructors may only return object or undefined") \ | 381 "Derived constructors may only return object or undefined") \ |
382 T(DuplicateConstructor, "A class may only have one constructor") \ | 382 T(DuplicateConstructor, "A class may only have one constructor") \ |
383 T(DuplicateExport, "Duplicate export of '%'") \ | 383 T(DuplicateExport, "Duplicate export of '%'") \ |
384 T(DuplicateProto, \ | 384 T(DuplicateProto, \ |
385 "Duplicate __proto__ fields are not allowed in object literals") \ | 385 "Duplicate __proto__ fields are not allowed in object literals") \ |
386 T(ForInOfLoopInitializer, \ | 386 T(ForInOfLoopInitializer, \ |
387 "% loop variable declaration may not have an initializer.") \ | 387 "% loop variable declaration may not have an initializer.") \ |
388 T(ForInOfLoopMultiBindings, \ | 388 T(ForInOfLoopMultiBindings, \ |
389 "Invalid left-hand side in % loop: Must have a single binding.") \ | 389 "Invalid left-hand side in % loop: Must have a single binding.") \ |
390 T(IllegalAccess, "Illegal access") \ | |
391 T(IllegalBreak, "Illegal break statement") \ | 390 T(IllegalBreak, "Illegal break statement") \ |
392 T(IllegalContinue, "Illegal continue statement") \ | 391 T(IllegalContinue, "Illegal continue statement") \ |
393 T(IllegalLanguageModeDirective, \ | 392 T(IllegalLanguageModeDirective, \ |
394 "Illegal '%' directive in function with non-simple parameter list") \ | 393 "Illegal '%' directive in function with non-simple parameter list") \ |
395 T(IllegalReturn, "Illegal return statement") \ | 394 T(IllegalReturn, "Illegal return statement") \ |
396 T(InvalidEscapedReservedWord, "Keyword must not contain escaped characters") \ | 395 T(InvalidEscapedReservedWord, "Keyword must not contain escaped characters") \ |
397 T(InvalidEscapedMetaProperty, "'%' must not contain escaped characters") \ | 396 T(InvalidEscapedMetaProperty, "'%' must not contain escaped characters") \ |
398 T(InvalidLhsInAssignment, "Invalid left-hand side in assignment") \ | 397 T(InvalidLhsInAssignment, "Invalid left-hand side in assignment") \ |
399 T(InvalidCoverInitializedName, "Invalid shorthand property initializer") \ | 398 T(InvalidCoverInitializedName, "Invalid shorthand property initializer") \ |
400 T(InvalidDestructuringTarget, "Invalid destructuring assignment target") \ | 399 T(InvalidDestructuringTarget, "Invalid destructuring assignment target") \ |
(...skipping 21 matching lines...) Expand all Loading... |
422 T(InvalidRestParameter, \ | 421 T(InvalidRestParameter, \ |
423 "Rest parameter must be an identifier or destructuring pattern") \ | 422 "Rest parameter must be an identifier or destructuring pattern") \ |
424 T(PushPastSafeLength, \ | 423 T(PushPastSafeLength, \ |
425 "Pushing % elements on an array-like of length % " \ | 424 "Pushing % elements on an array-like of length % " \ |
426 "is disallowed, as the total surpasses 2**53-1") \ | 425 "is disallowed, as the total surpasses 2**53-1") \ |
427 T(ElementAfterRest, "Rest element must be last element in array") \ | 426 T(ElementAfterRest, "Rest element must be last element in array") \ |
428 T(BadSetterRestParameter, \ | 427 T(BadSetterRestParameter, \ |
429 "Setter function argument must not be a rest parameter") \ | 428 "Setter function argument must not be a rest parameter") \ |
430 T(ParamDupe, "Duplicate parameter name not allowed in this context") \ | 429 T(ParamDupe, "Duplicate parameter name not allowed in this context") \ |
431 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ | 430 T(ParenthesisInArgString, "Function arg string contains parenthesis") \ |
| 431 T(RuntimeWrongNumArgs, "Runtime function given wrong number of arguments") \ |
432 T(SingleFunctionLiteral, "Single function literal required") \ | 432 T(SingleFunctionLiteral, "Single function literal required") \ |
433 T(SloppyLexical, \ | 433 T(SloppyLexical, \ |
434 "Block-scoped declarations (let, const, function, class) not yet " \ | 434 "Block-scoped declarations (let, const, function, class) not yet " \ |
435 "supported outside strict mode") \ | 435 "supported outside strict mode") \ |
436 T(SpeciesNotConstructor, \ | 436 T(SpeciesNotConstructor, \ |
437 "object.constructor[Symbol.species] is not a constructor") \ | 437 "object.constructor[Symbol.species] is not a constructor") \ |
438 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 438 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
439 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 439 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
440 T(StrictFunction, \ | 440 T(StrictFunction, \ |
441 "In strict mode code, functions can only be declared at top level or " \ | 441 "In strict mode code, functions can only be declared at top level or " \ |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 561 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
562 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 562 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
563 Handle<Object> data); | 563 Handle<Object> data); |
564 }; | 564 }; |
565 | 565 |
566 | 566 |
567 } // namespace internal | 567 } // namespace internal |
568 } // namespace v8 | 568 } // namespace v8 |
569 | 569 |
570 #endif // V8_MESSAGES_H_ | 570 #endif // V8_MESSAGES_H_ |
OLD | NEW |