| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 T(ReturnMethodNotCallable, "The iterator's 'return' method is not callable") \ | 295 T(ReturnMethodNotCallable, "The iterator's 'return' method is not callable") \ |
| 296 T(StaticPrototype, "Classes may not have static property named prototype") \ | 296 T(StaticPrototype, "Classes may not have static property named prototype") \ |
| 297 T(StrictCannotAssign, "Cannot assign to read only '%' in strict mode") \ | 297 T(StrictCannotAssign, "Cannot assign to read only '%' in strict mode") \ |
| 298 T(StrictDeleteProperty, "Cannot delete property '%' of %") \ | 298 T(StrictDeleteProperty, "Cannot delete property '%' of %") \ |
| 299 T(StrictPoisonPill, \ | 299 T(StrictPoisonPill, \ |
| 300 "'caller', 'callee', and 'arguments' properties may not be accessed on " \ | 300 "'caller', 'callee', and 'arguments' properties may not be accessed on " \ |
| 301 "strict mode functions or the arguments objects for calls to them") \ | 301 "strict mode functions or the arguments objects for calls to them") \ |
| 302 T(StrictReadOnlyProperty, \ | 302 T(StrictReadOnlyProperty, \ |
| 303 "Cannot assign to read only property '%' of % '%'") \ | 303 "Cannot assign to read only property '%' of % '%'") \ |
| 304 T(StrictCannotCreateProperty, "Cannot create property '%' on % '%'") \ | 304 T(StrictCannotCreateProperty, "Cannot create property '%' on % '%'") \ |
| 305 T(StrongArity, \ | |
| 306 "In strong mode, calling a function with too few arguments is deprecated") \ | |
| 307 T(StrongImplicitConversion, \ | |
| 308 "In strong mode, implicit conversions are deprecated") \ | |
| 309 T(SymbolIteratorInvalid, \ | 305 T(SymbolIteratorInvalid, \ |
| 310 "Result of the Symbol.iterator method is not an object") \ | 306 "Result of the Symbol.iterator method is not an object") \ |
| 311 T(SymbolKeyFor, "% is not a symbol") \ | 307 T(SymbolKeyFor, "% is not a symbol") \ |
| 312 T(SymbolToNumber, "Cannot convert a Symbol value to a number") \ | 308 T(SymbolToNumber, "Cannot convert a Symbol value to a number") \ |
| 313 T(SymbolToString, "Cannot convert a Symbol value to a string") \ | 309 T(SymbolToString, "Cannot convert a Symbol value to a string") \ |
| 314 T(SimdToNumber, "Cannot convert a SIMD value to a number") \ | 310 T(SimdToNumber, "Cannot convert a SIMD value to a number") \ |
| 315 T(ThrowMethodMissing, "The iterator does not provide a 'throw' method.") \ | 311 T(ThrowMethodMissing, "The iterator does not provide a 'throw' method.") \ |
| 316 T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \ | 312 T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \ |
| 317 T(ValueAndAccessor, \ | 313 T(ValueAndAccessor, \ |
| 318 "Invalid property descriptor. Cannot both specify accessors and a value " \ | 314 "Invalid property descriptor. Cannot both specify accessors and a value " \ |
| 319 "or writable attribute, %") \ | 315 "or writable attribute, %") \ |
| 320 T(VarRedeclaration, "Identifier '%' has already been declared") \ | 316 T(VarRedeclaration, "Identifier '%' has already been declared") \ |
| 321 T(WrongArgs, "%: Arguments list has wrong type") \ | 317 T(WrongArgs, "%: Arguments list has wrong type") \ |
| 322 /* ReferenceError */ \ | 318 /* ReferenceError */ \ |
| 323 T(NonMethod, "'super' is referenced from non-method") \ | 319 T(NonMethod, "'super' is referenced from non-method") \ |
| 324 T(NotDefined, "% is not defined") \ | 320 T(NotDefined, "% is not defined") \ |
| 325 T(StrongSuperCallMissing, \ | |
| 326 "In strong mode, invoking the super constructor in a subclass is " \ | |
| 327 "required") \ | |
| 328 T(UnsupportedSuper, "Unsupported reference to 'super'") \ | 321 T(UnsupportedSuper, "Unsupported reference to 'super'") \ |
| 329 /* RangeError */ \ | 322 /* RangeError */ \ |
| 330 T(DateRange, "Provided date is not in valid range.") \ | 323 T(DateRange, "Provided date is not in valid range.") \ |
| 331 T(ExpectedTimezoneID, \ | 324 T(ExpectedTimezoneID, \ |
| 332 "Expected Area/Location(/Location)* for time zone, got %") \ | 325 "Expected Area/Location(/Location)* for time zone, got %") \ |
| 333 T(ExpectedLocation, \ | 326 T(ExpectedLocation, \ |
| 334 "Expected letters optionally connected with underscores or hyphens for " \ | 327 "Expected letters optionally connected with underscores or hyphens for " \ |
| 335 "a location, got %") \ | 328 "a location, got %") \ |
| 336 T(InvalidArrayBufferLength, "Invalid array buffer length") \ | 329 T(InvalidArrayBufferLength, "Invalid array buffer length") \ |
| 337 T(ArrayBufferAllocationFailed, "Array buffer allocation failed") \ | 330 T(ArrayBufferAllocationFailed, "Array buffer allocation failed") \ |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 "supported outside strict mode") \ | 424 "supported outside strict mode") \ |
| 432 T(SpeciesNotConstructor, \ | 425 T(SpeciesNotConstructor, \ |
| 433 "object.constructor[Symbol.species] is not a constructor") \ | 426 "object.constructor[Symbol.species] is not a constructor") \ |
| 434 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ | 427 T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ |
| 435 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ | 428 T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ |
| 436 T(StrictFunction, \ | 429 T(StrictFunction, \ |
| 437 "In strict mode code, functions can only be declared at top level or " \ | 430 "In strict mode code, functions can only be declared at top level or " \ |
| 438 "inside a block.") \ | 431 "inside a block.") \ |
| 439 T(StrictOctalLiteral, "Octal literals are not allowed in strict mode.") \ | 432 T(StrictOctalLiteral, "Octal literals are not allowed in strict mode.") \ |
| 440 T(StrictWith, "Strict mode code may not include a with statement") \ | 433 T(StrictWith, "Strict mode code may not include a with statement") \ |
| 441 T(StrongArguments, \ | |
| 442 "In strong mode, 'arguments' is deprecated, use '...args' instead") \ | |
| 443 T(StrongConstructorDirective, \ | |
| 444 "\"use strong\" directive is disallowed in class constructor body") \ | |
| 445 T(StrongConstructorReturnMisplaced, \ | |
| 446 "In strong mode, returning from a constructor before its super " \ | |
| 447 "constructor invocation or all assignments to 'this' is deprecated") \ | |
| 448 T(StrongConstructorReturnValue, \ | |
| 449 "In strong mode, returning a value from a constructor is deprecated") \ | |
| 450 T(StrongConstructorSuper, \ | |
| 451 "In strong mode, 'super' can only be used to invoke the super " \ | |
| 452 "constructor, and cannot be nested inside another statement or " \ | |
| 453 "expression") \ | |
| 454 T(StrongConstructorThis, \ | |
| 455 "In strong mode, 'this' can only be used to initialize properties, and " \ | |
| 456 "cannot be nested inside another statement or expression") \ | |
| 457 T(StrongDelete, \ | |
| 458 "In strong mode, 'delete' is deprecated, use maps or sets instead") \ | |
| 459 T(StrongDirectEval, "In strong mode, direct calls to eval are deprecated") \ | |
| 460 T(StrongEllision, \ | |
| 461 "In strong mode, arrays with holes are deprecated, use maps instead") \ | |
| 462 T(StrongEmpty, \ | |
| 463 "In strong mode, empty sub-statements are deprecated, make them explicit " \ | |
| 464 "with '{}' instead") \ | |
| 465 T(StrongEqual, \ | |
| 466 "In strong mode, '==' and '!=' are deprecated, use '===' and '!==' " \ | |
| 467 "instead") \ | |
| 468 T(StrongForIn, \ | |
| 469 "In strong mode, 'for'-'in' loops are deprecated, use 'for'-'of' instead") \ | |
| 470 T(StrongPropertyAccess, \ | |
| 471 "In strong mode, accessing missing property '%' of % is deprecated") \ | |
| 472 T(StrongSuperCallDuplicate, \ | |
| 473 "In strong mode, invoking the super constructor multiple times is " \ | |
| 474 "deprecated") \ | |
| 475 T(StrongSuperCallMisplaced, \ | |
| 476 "In strong mode, the super constructor must be invoked before any " \ | |
| 477 "assignment to 'this'") \ | |
| 478 T(StrongSwitchFallthrough, \ | |
| 479 "In strong mode, switch fall-through is deprecated, terminate each case " \ | |
| 480 "with 'break', 'continue', 'return' or 'throw'") \ | |
| 481 T(StrongUndefined, \ | |
| 482 "In strong mode, binding or assigning to 'undefined' is deprecated") \ | |
| 483 T(StrongVar, \ | |
| 484 "In strong mode, 'var' is deprecated, use 'let' or 'const' instead") \ | |
| 485 T(TemplateOctalLiteral, \ | 434 T(TemplateOctalLiteral, \ |
| 486 "Octal literals are not allowed in template strings.") \ | 435 "Octal literals are not allowed in template strings.") \ |
| 487 T(ThisFormalParameter, "'this' is not a valid formal parameter name") \ | 436 T(ThisFormalParameter, "'this' is not a valid formal parameter name") \ |
| 488 T(TooManyArguments, \ | 437 T(TooManyArguments, \ |
| 489 "Too many arguments in function call (only 65535 allowed)") \ | 438 "Too many arguments in function call (only 65535 allowed)") \ |
| 490 T(TooManyParameters, \ | 439 T(TooManyParameters, \ |
| 491 "Too many parameters in function definition (only 65535 allowed)") \ | 440 "Too many parameters in function definition (only 65535 allowed)") \ |
| 492 T(TooManyVariables, "Too many variables declared (only 4194303 allowed)") \ | 441 T(TooManyVariables, "Too many variables declared (only 4194303 allowed)") \ |
| 493 T(TypedArrayTooShort, \ | 442 T(TypedArrayTooShort, \ |
| 494 "Derived TypedArray constructor created an array which was too small") \ | 443 "Derived TypedArray constructor created an array which was too small") \ |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 506 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
| 558 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 507 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
| 559 Handle<Object> data); | 508 Handle<Object> data); |
| 560 }; | 509 }; |
| 561 | 510 |
| 562 | 511 |
| 563 } // namespace internal | 512 } // namespace internal |
| 564 } // namespace v8 | 513 } // namespace v8 |
| 565 | 514 |
| 566 #endif // V8_MESSAGES_H_ | 515 #endif // V8_MESSAGES_H_ |
| OLD | NEW |