11cb0ef41Sopenharmony_ci// Copyright 2018 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#ifndef V8_COMMON_MESSAGE_TEMPLATE_H_ 61cb0ef41Sopenharmony_ci#define V8_COMMON_MESSAGE_TEMPLATE_H_ 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci#include "src/base/logging.h" 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cinamespace v8 { 111cb0ef41Sopenharmony_cinamespace internal { 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci#define MESSAGE_TEMPLATES(T) \ 141cb0ef41Sopenharmony_ci /* Error */ \ 151cb0ef41Sopenharmony_ci T(None, "") \ 161cb0ef41Sopenharmony_ci T(CyclicProto, "Cyclic __proto__ value") \ 171cb0ef41Sopenharmony_ci T(Debugger, "Debugger: %") \ 181cb0ef41Sopenharmony_ci T(DebuggerLoading, "Error loading debugger") \ 191cb0ef41Sopenharmony_ci T(DefaultOptionsMissing, "Internal % error. Default options are missing.") \ 201cb0ef41Sopenharmony_ci T(DeletePrivateField, "Private fields can not be deleted") \ 211cb0ef41Sopenharmony_ci T(PlaceholderOnly, "%") \ 221cb0ef41Sopenharmony_ci T(UncaughtException, "Uncaught %") \ 231cb0ef41Sopenharmony_ci T(Unsupported, "Not supported") \ 241cb0ef41Sopenharmony_ci T(WrongServiceType, "Internal error, wrong service type: %") \ 251cb0ef41Sopenharmony_ci T(WrongValueType, "Internal error. Wrong value type.") \ 261cb0ef41Sopenharmony_ci T(IcuError, "Internal error. Icu error.") \ 271cb0ef41Sopenharmony_ci /* TypeError */ \ 281cb0ef41Sopenharmony_ci T(ApplyNonFunction, \ 291cb0ef41Sopenharmony_ci "Function.prototype.apply was called on %, which is a % and not a " \ 301cb0ef41Sopenharmony_ci "function") \ 311cb0ef41Sopenharmony_ci T(ArgumentsDisallowedInInitializerAndStaticBlock, \ 321cb0ef41Sopenharmony_ci "'arguments' is not allowed in class field initializer or static " \ 331cb0ef41Sopenharmony_ci "initialization block") \ 341cb0ef41Sopenharmony_ci T(ArrayBufferTooShort, \ 351cb0ef41Sopenharmony_ci "Derived ArrayBuffer constructor created a buffer which was too small") \ 361cb0ef41Sopenharmony_ci T(ArrayBufferSpeciesThis, \ 371cb0ef41Sopenharmony_ci "ArrayBuffer subclass returned this from species constructor") \ 381cb0ef41Sopenharmony_ci T(AwaitNotInAsyncContext, \ 391cb0ef41Sopenharmony_ci "await is only valid in async functions and the top level bodies of " \ 401cb0ef41Sopenharmony_ci "modules") \ 411cb0ef41Sopenharmony_ci T(AwaitNotInDebugEvaluate, \ 421cb0ef41Sopenharmony_ci "await can not be used when evaluating code " \ 431cb0ef41Sopenharmony_ci "while paused in the debugger") \ 441cb0ef41Sopenharmony_ci T(AtomicsWaitNotAllowed, "Atomics.wait cannot be called in this context") \ 451cb0ef41Sopenharmony_ci T(BadSortComparisonFunction, \ 461cb0ef41Sopenharmony_ci "The comparison function must be either a function or undefined") \ 471cb0ef41Sopenharmony_ci T(BigIntFromNumber, \ 481cb0ef41Sopenharmony_ci "The number % cannot be converted to a BigInt because it is not an " \ 491cb0ef41Sopenharmony_ci "integer") \ 501cb0ef41Sopenharmony_ci T(BigIntFromObject, "Cannot convert % to a BigInt") \ 511cb0ef41Sopenharmony_ci T(BigIntMixedTypes, \ 521cb0ef41Sopenharmony_ci "Cannot mix BigInt and other types, use explicit conversions") \ 531cb0ef41Sopenharmony_ci T(BigIntSerializeJSON, "Do not know how to serialize a BigInt") \ 541cb0ef41Sopenharmony_ci T(BigIntShr, "BigInts have no unsigned right shift, use >> instead") \ 551cb0ef41Sopenharmony_ci T(BigIntToNumber, "Cannot convert a BigInt value to a number") \ 561cb0ef41Sopenharmony_ci T(CalledNonCallable, "% is not a function") \ 571cb0ef41Sopenharmony_ci T(CalledOnNonObject, "% called on non-object") \ 581cb0ef41Sopenharmony_ci T(CalledOnNullOrUndefined, "% called on null or undefined") \ 591cb0ef41Sopenharmony_ci T(CallShadowRealmFunctionThrown, "Called throwing ShadowRealm function") \ 601cb0ef41Sopenharmony_ci T(CallSiteExpectsFunction, \ 611cb0ef41Sopenharmony_ci "CallSite expects wasm object as first or function as second argument, " \ 621cb0ef41Sopenharmony_ci "got <%, %>") \ 631cb0ef41Sopenharmony_ci T(CallSiteMethod, "CallSite method % expects CallSite as receiver") \ 641cb0ef41Sopenharmony_ci T(CannotBeShared, "% cannot be shared") \ 651cb0ef41Sopenharmony_ci T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ 661cb0ef41Sopenharmony_ci T(CannotPreventExt, "Cannot prevent extensions") \ 671cb0ef41Sopenharmony_ci T(CannotFreeze, "Cannot freeze") \ 681cb0ef41Sopenharmony_ci T(CannotFreezeArrayBufferView, \ 691cb0ef41Sopenharmony_ci "Cannot freeze array buffer views with elements") \ 701cb0ef41Sopenharmony_ci T(CannotSeal, "Cannot seal") \ 711cb0ef41Sopenharmony_ci T(CannotWrap, "Cannot wrap target callable") \ 721cb0ef41Sopenharmony_ci T(CircularStructure, "Converting circular structure to JSON%") \ 731cb0ef41Sopenharmony_ci T(ConstructAbstractClass, "Abstract class % not directly constructable") \ 741cb0ef41Sopenharmony_ci T(ConstAssign, "Assignment to constant variable.") \ 751cb0ef41Sopenharmony_ci T(ConstructorClassField, "Classes may not have a field named 'constructor'") \ 761cb0ef41Sopenharmony_ci T(ConstructorNonCallable, \ 771cb0ef41Sopenharmony_ci "Class constructor % cannot be invoked without 'new'") \ 781cb0ef41Sopenharmony_ci T(AnonymousConstructorNonCallable, \ 791cb0ef41Sopenharmony_ci "Class constructors cannot be invoked without 'new'") \ 801cb0ef41Sopenharmony_ci T(ConstructorNotFunction, "Constructor % requires 'new'") \ 811cb0ef41Sopenharmony_ci T(ConstructorNotReceiver, "The .constructor property is not an object") \ 821cb0ef41Sopenharmony_ci T(CurrencyCode, "Currency code is required with currency style.") \ 831cb0ef41Sopenharmony_ci T(CyclicModuleDependency, "Detected cycle while resolving name '%' in '%'") \ 841cb0ef41Sopenharmony_ci T(DataViewNotArrayBuffer, \ 851cb0ef41Sopenharmony_ci "First argument to DataView constructor must be an ArrayBuffer") \ 861cb0ef41Sopenharmony_ci T(DateType, "this is not a Date object.") \ 871cb0ef41Sopenharmony_ci T(DebuggerFrame, "Debugger: Invalid frame index.") \ 881cb0ef41Sopenharmony_ci T(DebuggerType, "Debugger: Parameters have wrong types.") \ 891cb0ef41Sopenharmony_ci T(DeclarationMissingInitializer, "Missing initializer in % declaration") \ 901cb0ef41Sopenharmony_ci T(DefineDisallowed, "Cannot define property %, object is not extensible") \ 911cb0ef41Sopenharmony_ci T(DetachedOperation, "Cannot perform % on a detached ArrayBuffer") \ 921cb0ef41Sopenharmony_ci T(DoNotUse, "Do not use %; %") \ 931cb0ef41Sopenharmony_ci T(DuplicateTemplateProperty, "Object template has duplicate property '%'") \ 941cb0ef41Sopenharmony_ci T(ExtendsValueNotConstructor, \ 951cb0ef41Sopenharmony_ci "Class extends value % is not a constructor or null") \ 961cb0ef41Sopenharmony_ci T(FirstArgumentNotRegExp, \ 971cb0ef41Sopenharmony_ci "First argument to % must not be a regular expression") \ 981cb0ef41Sopenharmony_ci T(FunctionBind, "Bind must be called on a function") \ 991cb0ef41Sopenharmony_ci T(GeneratorRunning, "Generator is already running") \ 1001cb0ef41Sopenharmony_ci T(IllegalInvocation, "Illegal invocation") \ 1011cb0ef41Sopenharmony_ci T(ImmutablePrototypeSet, \ 1021cb0ef41Sopenharmony_ci "Immutable prototype object '%' cannot have their prototype set") \ 1031cb0ef41Sopenharmony_ci T(ImportAssertionDuplicateKey, "Import assertion has duplicate key '%'") \ 1041cb0ef41Sopenharmony_ci T(ImportCallNotNewExpression, "Cannot use new with import") \ 1051cb0ef41Sopenharmony_ci T(ImportOutsideModule, "Cannot use import statement outside a module") \ 1061cb0ef41Sopenharmony_ci T(ImportMetaOutsideModule, "Cannot use 'import.meta' outside a module") \ 1071cb0ef41Sopenharmony_ci T(ImportMissingSpecifier, "import() requires a specifier") \ 1081cb0ef41Sopenharmony_ci T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \ 1091cb0ef41Sopenharmony_ci T(InstanceofNonobjectProto, \ 1101cb0ef41Sopenharmony_ci "Function has non-object prototype '%' in instanceof check") \ 1111cb0ef41Sopenharmony_ci T(InvalidArgument, "invalid_argument") \ 1121cb0ef41Sopenharmony_ci T(InvalidArgumentForTemporal, "Invalid argument for Temporal %") \ 1131cb0ef41Sopenharmony_ci T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \ 1141cb0ef41Sopenharmony_ci T(InvalidRegExpExecResult, \ 1151cb0ef41Sopenharmony_ci "RegExp exec method returned something other than an Object or null") \ 1161cb0ef41Sopenharmony_ci T(InvalidUnit, "Invalid unit argument for %() '%'") \ 1171cb0ef41Sopenharmony_ci T(IterableYieldedNonString, "Iterable yielded % which is not a string") \ 1181cb0ef41Sopenharmony_ci T(IteratorResultNotAnObject, "Iterator result % is not an object") \ 1191cb0ef41Sopenharmony_ci T(IteratorSymbolNonCallable, "Found non-callable @@iterator") \ 1201cb0ef41Sopenharmony_ci T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ 1211cb0ef41Sopenharmony_ci T(LanguageID, "Language ID should be string or object.") \ 1221cb0ef41Sopenharmony_ci T(LocaleNotEmpty, \ 1231cb0ef41Sopenharmony_ci "First argument to Intl.Locale constructor can't be empty or missing") \ 1241cb0ef41Sopenharmony_ci T(LocaleBadParameters, "Incorrect locale information provided") \ 1251cb0ef41Sopenharmony_ci T(ListFormatBadParameters, "Incorrect ListFormat information provided") \ 1261cb0ef41Sopenharmony_ci T(MapperFunctionNonCallable, "flatMap mapper function is not callable") \ 1271cb0ef41Sopenharmony_ci T(MethodCalledOnWrongObject, \ 1281cb0ef41Sopenharmony_ci "Method % called on a non-object or on a wrong type of object.") \ 1291cb0ef41Sopenharmony_ci T(MethodInvokedOnWrongType, "Method invoked on an object that is not %.") \ 1301cb0ef41Sopenharmony_ci T(NoAccess, "no access") \ 1311cb0ef41Sopenharmony_ci T(NonCallableInInstanceOfCheck, \ 1321cb0ef41Sopenharmony_ci "Right-hand side of 'instanceof' is not callable") \ 1331cb0ef41Sopenharmony_ci T(NonCoercible, "Cannot destructure '%' as it is %.") \ 1341cb0ef41Sopenharmony_ci T(NonCoercibleWithProperty, \ 1351cb0ef41Sopenharmony_ci "Cannot destructure property '%' of '%' as it is %.") \ 1361cb0ef41Sopenharmony_ci T(NonExtensibleProto, "% is not extensible") \ 1371cb0ef41Sopenharmony_ci T(NonObjectAssertOption, "The 'assert' option must be an object") \ 1381cb0ef41Sopenharmony_ci T(NonObjectInInstanceOfCheck, \ 1391cb0ef41Sopenharmony_ci "Right-hand side of 'instanceof' is not an object") \ 1401cb0ef41Sopenharmony_ci T(NonObjectPropertyLoad, "Cannot read properties of %") \ 1411cb0ef41Sopenharmony_ci T(NonObjectPropertyLoadWithProperty, \ 1421cb0ef41Sopenharmony_ci "Cannot read properties of % (reading '%')") \ 1431cb0ef41Sopenharmony_ci T(NonObjectPropertyStore, "Cannot set properties of %") \ 1441cb0ef41Sopenharmony_ci T(NonObjectPropertyStoreWithProperty, \ 1451cb0ef41Sopenharmony_ci "Cannot set properties of % (setting '%')") \ 1461cb0ef41Sopenharmony_ci T(NonObjectImportArgument, \ 1471cb0ef41Sopenharmony_ci "The second argument to import() must be an object") \ 1481cb0ef41Sopenharmony_ci T(NonStringImportAssertionValue, "Import assertion value must be a string") \ 1491cb0ef41Sopenharmony_ci T(NoSetterInCallback, "Cannot set property % of % which has only a getter") \ 1501cb0ef41Sopenharmony_ci T(NotAnIterator, "% is not an iterator") \ 1511cb0ef41Sopenharmony_ci T(PromiseNewTargetUndefined, \ 1521cb0ef41Sopenharmony_ci "Promise constructor cannot be invoked without 'new'") \ 1531cb0ef41Sopenharmony_ci T(NotConstructor, "% is not a constructor") \ 1541cb0ef41Sopenharmony_ci T(NotDateObject, "this is not a Date object.") \ 1551cb0ef41Sopenharmony_ci T(NotGeneric, "% requires that 'this' be a %") \ 1561cb0ef41Sopenharmony_ci T(NotCallable, "% is not a function") \ 1571cb0ef41Sopenharmony_ci T(NotCallableOrIterable, \ 1581cb0ef41Sopenharmony_ci "% is not a function or its return value is not iterable") \ 1591cb0ef41Sopenharmony_ci T(NotCallableOrAsyncIterable, \ 1601cb0ef41Sopenharmony_ci "% is not a function or its return value is not async iterable") \ 1611cb0ef41Sopenharmony_ci T(NotFiniteNumber, "Value need to be finite number for %()") \ 1621cb0ef41Sopenharmony_ci T(NotIterable, "% is not iterable") \ 1631cb0ef41Sopenharmony_ci T(NotIterableNoSymbolLoad, "% is not iterable (cannot read property %)") \ 1641cb0ef41Sopenharmony_ci T(NotAsyncIterable, "% is not async iterable") \ 1651cb0ef41Sopenharmony_ci T(NotPropertyName, "% is not a valid property name") \ 1661cb0ef41Sopenharmony_ci T(NotTypedArray, "this is not a typed array.") \ 1671cb0ef41Sopenharmony_ci T(NotSuperConstructor, "Super constructor % of % is not a constructor") \ 1681cb0ef41Sopenharmony_ci T(NotSuperConstructorAnonymousClass, \ 1691cb0ef41Sopenharmony_ci "Super constructor % of anonymous class is not a constructor") \ 1701cb0ef41Sopenharmony_ci T(NotIntegerTypedArray, "% is not an integer typed array.") \ 1711cb0ef41Sopenharmony_ci T(NotInt32OrBigInt64TypedArray, \ 1721cb0ef41Sopenharmony_ci "% is not an int32 or BigInt64 typed array.") \ 1731cb0ef41Sopenharmony_ci T(NotSharedTypedArray, "% is not a shared typed array.") \ 1741cb0ef41Sopenharmony_ci T(ObjectGetterExpectingFunction, \ 1751cb0ef41Sopenharmony_ci "Object.prototype.__defineGetter__: Expecting function") \ 1761cb0ef41Sopenharmony_ci T(ObjectGetterCallable, "Getter must be a function: %") \ 1771cb0ef41Sopenharmony_ci T(ObjectNotExtensible, "Cannot add property %, object is not extensible") \ 1781cb0ef41Sopenharmony_ci T(ObjectSetterExpectingFunction, \ 1791cb0ef41Sopenharmony_ci "Object.prototype.__defineSetter__: Expecting function") \ 1801cb0ef41Sopenharmony_ci T(ObjectSetterCallable, "Setter must be a function: %") \ 1811cb0ef41Sopenharmony_ci T(OrdinaryFunctionCalledAsConstructor, \ 1821cb0ef41Sopenharmony_ci "Function object that's not a constructor was created with new") \ 1831cb0ef41Sopenharmony_ci T(PromiseCyclic, "Chaining cycle detected for promise %") \ 1841cb0ef41Sopenharmony_ci T(PromiseExecutorAlreadyInvoked, \ 1851cb0ef41Sopenharmony_ci "Promise executor has already been invoked with non-undefined arguments") \ 1861cb0ef41Sopenharmony_ci T(PromiseNonCallable, "Promise resolve or reject function is not callable") \ 1871cb0ef41Sopenharmony_ci T(PropertyDescObject, "Property description must be an object: %") \ 1881cb0ef41Sopenharmony_ci T(PropertyNotFunction, \ 1891cb0ef41Sopenharmony_ci "'%' returned for property '%' of object '%' is not a function") \ 1901cb0ef41Sopenharmony_ci T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \ 1911cb0ef41Sopenharmony_ci T(PrototypeParentNotAnObject, \ 1921cb0ef41Sopenharmony_ci "Class extends value does not have valid prototype property %") \ 1931cb0ef41Sopenharmony_ci T(ProxyConstructNonObject, \ 1941cb0ef41Sopenharmony_ci "'construct' on proxy: trap returned non-object ('%')") \ 1951cb0ef41Sopenharmony_ci T(ProxyDefinePropertyNonConfigurable, \ 1961cb0ef41Sopenharmony_ci "'defineProperty' on proxy: trap returned truish for defining " \ 1971cb0ef41Sopenharmony_ci "non-configurable property '%' which is either non-existent or " \ 1981cb0ef41Sopenharmony_ci "configurable in the proxy target") \ 1991cb0ef41Sopenharmony_ci T(ProxyDefinePropertyNonConfigurableWritable, \ 2001cb0ef41Sopenharmony_ci "'defineProperty' on proxy: trap returned truish for defining " \ 2011cb0ef41Sopenharmony_ci "non-configurable property '%' which cannot be non-writable, unless " \ 2021cb0ef41Sopenharmony_ci "there exists a corresponding non-configurable, non-writable own " \ 2031cb0ef41Sopenharmony_ci "property of the target object.") \ 2041cb0ef41Sopenharmony_ci T(ProxyDefinePropertyNonExtensible, \ 2051cb0ef41Sopenharmony_ci "'defineProperty' on proxy: trap returned truish for adding property '%' " \ 2061cb0ef41Sopenharmony_ci " to the non-extensible proxy target") \ 2071cb0ef41Sopenharmony_ci T(ProxyDefinePropertyIncompatible, \ 2081cb0ef41Sopenharmony_ci "'defineProperty' on proxy: trap returned truish for adding property '%' " \ 2091cb0ef41Sopenharmony_ci " that is incompatible with the existing property in the proxy target") \ 2101cb0ef41Sopenharmony_ci T(ProxyDeletePropertyNonConfigurable, \ 2111cb0ef41Sopenharmony_ci "'deleteProperty' on proxy: trap returned truish for property '%' which " \ 2121cb0ef41Sopenharmony_ci "is non-configurable in the proxy target") \ 2131cb0ef41Sopenharmony_ci T(ProxyDeletePropertyNonExtensible, \ 2141cb0ef41Sopenharmony_ci "'deleteProperty' on proxy: trap returned truish for property '%' but " \ 2151cb0ef41Sopenharmony_ci "the proxy target is non-extensible") \ 2161cb0ef41Sopenharmony_ci T(ProxyGetNonConfigurableData, \ 2171cb0ef41Sopenharmony_ci "'get' on proxy: property '%' is a read-only and " \ 2181cb0ef41Sopenharmony_ci "non-configurable data property on the proxy target but the proxy " \ 2191cb0ef41Sopenharmony_ci "did not return its actual value (expected '%' but got '%')") \ 2201cb0ef41Sopenharmony_ci T(ProxyGetNonConfigurableAccessor, \ 2211cb0ef41Sopenharmony_ci "'get' on proxy: property '%' is a non-configurable accessor " \ 2221cb0ef41Sopenharmony_ci "property on the proxy target and does not have a getter function, but " \ 2231cb0ef41Sopenharmony_ci "the trap did not return 'undefined' (got '%')") \ 2241cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorIncompatible, \ 2251cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap returned descriptor for " \ 2261cb0ef41Sopenharmony_ci "property '%' that is incompatible with the existing property in the " \ 2271cb0ef41Sopenharmony_ci "proxy target") \ 2281cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorInvalid, \ 2291cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap returned neither object nor " \ 2301cb0ef41Sopenharmony_ci "undefined for property '%'") \ 2311cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorNonConfigurable, \ 2321cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap reported non-configurability " \ 2331cb0ef41Sopenharmony_ci "for property '%' which is either non-existent or configurable in the " \ 2341cb0ef41Sopenharmony_ci "proxy target") \ 2351cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorNonConfigurableWritable, \ 2361cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap reported non-configurable " \ 2371cb0ef41Sopenharmony_ci "and writable for property '%' which is non-configurable, non-writable " \ 2381cb0ef41Sopenharmony_ci "in the proxy target") \ 2391cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorNonExtensible, \ 2401cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \ 2411cb0ef41Sopenharmony_ci "property '%' which exists in the non-extensible proxy target") \ 2421cb0ef41Sopenharmony_ci T(ProxyGetOwnPropertyDescriptorUndefined, \ 2431cb0ef41Sopenharmony_ci "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \ 2441cb0ef41Sopenharmony_ci "property '%' which is non-configurable in the proxy target") \ 2451cb0ef41Sopenharmony_ci T(ProxyGetPrototypeOfInvalid, \ 2461cb0ef41Sopenharmony_ci "'getPrototypeOf' on proxy: trap returned neither object nor null") \ 2471cb0ef41Sopenharmony_ci T(ProxyGetPrototypeOfNonExtensible, \ 2481cb0ef41Sopenharmony_ci "'getPrototypeOf' on proxy: proxy target is non-extensible but the " \ 2491cb0ef41Sopenharmony_ci "trap did not return its actual prototype") \ 2501cb0ef41Sopenharmony_ci T(ProxyHasNonConfigurable, \ 2511cb0ef41Sopenharmony_ci "'has' on proxy: trap returned falsish for property '%' which exists in " \ 2521cb0ef41Sopenharmony_ci "the proxy target as non-configurable") \ 2531cb0ef41Sopenharmony_ci T(ProxyHasNonExtensible, \ 2541cb0ef41Sopenharmony_ci "'has' on proxy: trap returned falsish for property '%' but the proxy " \ 2551cb0ef41Sopenharmony_ci "target is not extensible") \ 2561cb0ef41Sopenharmony_ci T(ProxyIsExtensibleInconsistent, \ 2571cb0ef41Sopenharmony_ci "'isExtensible' on proxy: trap result does not reflect extensibility of " \ 2581cb0ef41Sopenharmony_ci "proxy target (which is '%')") \ 2591cb0ef41Sopenharmony_ci T(ProxyNonObject, \ 2601cb0ef41Sopenharmony_ci "Cannot create proxy with a non-object as target or handler") \ 2611cb0ef41Sopenharmony_ci T(ProxyOwnKeysMissing, \ 2621cb0ef41Sopenharmony_ci "'ownKeys' on proxy: trap result did not include '%'") \ 2631cb0ef41Sopenharmony_ci T(ProxyOwnKeysNonExtensible, \ 2641cb0ef41Sopenharmony_ci "'ownKeys' on proxy: trap returned extra keys but proxy target is " \ 2651cb0ef41Sopenharmony_ci "non-extensible") \ 2661cb0ef41Sopenharmony_ci T(ProxyOwnKeysDuplicateEntries, \ 2671cb0ef41Sopenharmony_ci "'ownKeys' on proxy: trap returned duplicate entries") \ 2681cb0ef41Sopenharmony_ci T(ProxyPreventExtensionsExtensible, \ 2691cb0ef41Sopenharmony_ci "'preventExtensions' on proxy: trap returned truish but the proxy target " \ 2701cb0ef41Sopenharmony_ci "is extensible") \ 2711cb0ef41Sopenharmony_ci T(ProxyPrivate, "Cannot pass private property name to proxy trap") \ 2721cb0ef41Sopenharmony_ci T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \ 2731cb0ef41Sopenharmony_ci T(ProxySetFrozenData, \ 2741cb0ef41Sopenharmony_ci "'set' on proxy: trap returned truish for property '%' which exists in " \ 2751cb0ef41Sopenharmony_ci "the proxy target as a non-configurable and non-writable data property " \ 2761cb0ef41Sopenharmony_ci "with a different value") \ 2771cb0ef41Sopenharmony_ci T(ProxySetFrozenAccessor, \ 2781cb0ef41Sopenharmony_ci "'set' on proxy: trap returned truish for property '%' which exists in " \ 2791cb0ef41Sopenharmony_ci "the proxy target as a non-configurable and non-writable accessor " \ 2801cb0ef41Sopenharmony_ci "property without a setter") \ 2811cb0ef41Sopenharmony_ci T(ProxySetPrototypeOfNonExtensible, \ 2821cb0ef41Sopenharmony_ci "'setPrototypeOf' on proxy: trap returned truish for setting a new " \ 2831cb0ef41Sopenharmony_ci "prototype on the non-extensible proxy target") \ 2841cb0ef41Sopenharmony_ci T(ProxyTrapReturnedFalsish, "'%' on proxy: trap returned falsish") \ 2851cb0ef41Sopenharmony_ci T(ProxyTrapReturnedFalsishFor, \ 2861cb0ef41Sopenharmony_ci "'%' on proxy: trap returned falsish for property '%'") \ 2871cb0ef41Sopenharmony_ci T(RedefineDisallowed, "Cannot redefine property: %") \ 2881cb0ef41Sopenharmony_ci T(RedefineExternalArray, \ 2891cb0ef41Sopenharmony_ci "Cannot redefine a property of an object with external array elements") \ 2901cb0ef41Sopenharmony_ci T(ReduceNoInitial, "Reduce of empty array with no initial value") \ 2911cb0ef41Sopenharmony_ci T(RegExpFlags, \ 2921cb0ef41Sopenharmony_ci "Cannot supply flags when constructing one RegExp from another") \ 2931cb0ef41Sopenharmony_ci T(RegExpNonObject, "% getter called on non-object %") \ 2941cb0ef41Sopenharmony_ci T(RegExpNonRegExp, "% getter called on non-RegExp object") \ 2951cb0ef41Sopenharmony_ci T(RegExpGlobalInvokedOnNonGlobal, \ 2961cb0ef41Sopenharmony_ci "% called with a non-global RegExp argument") \ 2971cb0ef41Sopenharmony_ci T(RelativeDateTimeFormatterBadParameters, \ 2981cb0ef41Sopenharmony_ci "Incorrect RelativeDateTimeFormatter provided") \ 2991cb0ef41Sopenharmony_ci T(ResolverNotAFunction, "Promise resolver % is not a function") \ 3001cb0ef41Sopenharmony_ci T(ReturnMethodNotCallable, "The iterator's 'return' method is not callable") \ 3011cb0ef41Sopenharmony_ci T(SharedArrayBufferTooShort, \ 3021cb0ef41Sopenharmony_ci "Derived SharedArrayBuffer constructor created a buffer which was too " \ 3031cb0ef41Sopenharmony_ci "small") \ 3041cb0ef41Sopenharmony_ci T(SharedArrayBufferSpeciesThis, \ 3051cb0ef41Sopenharmony_ci "SharedArrayBuffer subclass returned this from species constructor") \ 3061cb0ef41Sopenharmony_ci T(StaticPrototype, \ 3071cb0ef41Sopenharmony_ci "Classes may not have a static property named 'prototype'") \ 3081cb0ef41Sopenharmony_ci T(StrictDeleteProperty, "Cannot delete property '%' of %") \ 3091cb0ef41Sopenharmony_ci T(StrictPoisonPill, \ 3101cb0ef41Sopenharmony_ci "'caller', 'callee', and 'arguments' properties may not be accessed on " \ 3111cb0ef41Sopenharmony_ci "strict mode functions or the arguments objects for calls to them") \ 3121cb0ef41Sopenharmony_ci T(StrictReadOnlyProperty, \ 3131cb0ef41Sopenharmony_ci "Cannot assign to read only property '%' of % '%'") \ 3141cb0ef41Sopenharmony_ci T(StrictCannotCreateProperty, "Cannot create property '%' on % '%'") \ 3151cb0ef41Sopenharmony_ci T(StringMatchAllNullOrUndefinedFlags, \ 3161cb0ef41Sopenharmony_ci "The .flags property of the argument to String.prototype.matchAll cannot " \ 3171cb0ef41Sopenharmony_ci "be null or undefined") \ 3181cb0ef41Sopenharmony_ci T(SymbolIteratorInvalid, \ 3191cb0ef41Sopenharmony_ci "Result of the Symbol.iterator method is not an object") \ 3201cb0ef41Sopenharmony_ci T(SymbolAsyncIteratorInvalid, \ 3211cb0ef41Sopenharmony_ci "Result of the Symbol.asyncIterator method is not an object") \ 3221cb0ef41Sopenharmony_ci T(SymbolKeyFor, "% is not a symbol") \ 3231cb0ef41Sopenharmony_ci T(SymbolToNumber, "Cannot convert a Symbol value to a number") \ 3241cb0ef41Sopenharmony_ci T(SymbolToString, "Cannot convert a Symbol value to a string") \ 3251cb0ef41Sopenharmony_ci T(ThrowMethodMissing, "The iterator does not provide a 'throw' method.") \ 3261cb0ef41Sopenharmony_ci T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \ 3271cb0ef41Sopenharmony_ci T(ValueAndAccessor, \ 3281cb0ef41Sopenharmony_ci "Invalid property descriptor. Cannot both specify accessors and a value " \ 3291cb0ef41Sopenharmony_ci "or writable attribute, %") \ 3301cb0ef41Sopenharmony_ci T(VarRedeclaration, "Identifier '%' has already been declared") \ 3311cb0ef41Sopenharmony_ci T(VarNotAllowedInEvalScope, \ 3321cb0ef41Sopenharmony_ci "Identifier '%' cannot be declared with 'var' in current evaluation " \ 3331cb0ef41Sopenharmony_ci "scope, consider trying 'let' instead") \ 3341cb0ef41Sopenharmony_ci T(WrongArgs, "%: Arguments list has wrong type") \ 3351cb0ef41Sopenharmony_ci /* ReferenceError */ \ 3361cb0ef41Sopenharmony_ci T(NotDefined, "% is not defined") \ 3371cb0ef41Sopenharmony_ci T(SuperAlreadyCalled, "Super constructor may only be called once") \ 3381cb0ef41Sopenharmony_ci T(AccessedUninitializedVariable, "Cannot access '%' before initialization") \ 3391cb0ef41Sopenharmony_ci T(UnsupportedSuper, "Unsupported reference to 'super'") \ 3401cb0ef41Sopenharmony_ci /* RangeError */ \ 3411cb0ef41Sopenharmony_ci T(BigIntDivZero, "Division by zero") \ 3421cb0ef41Sopenharmony_ci T(BigIntNegativeExponent, "Exponent must be positive") \ 3431cb0ef41Sopenharmony_ci T(BigIntTooBig, "Maximum BigInt size exceeded") \ 3441cb0ef41Sopenharmony_ci T(CantSetOptionXWhenYIsUsed, "Can't set option % when % is used") \ 3451cb0ef41Sopenharmony_ci T(DateRange, "Provided date is not in valid range.") \ 3461cb0ef41Sopenharmony_ci T(ExpectedLocation, \ 3471cb0ef41Sopenharmony_ci "Expected letters optionally connected with underscores or hyphens for " \ 3481cb0ef41Sopenharmony_ci "a location, got %") \ 3491cb0ef41Sopenharmony_ci T(InvalidArrayBufferLength, "Invalid array buffer length") \ 3501cb0ef41Sopenharmony_ci T(InvalidArrayBufferMaxLength, "Invalid array buffer max length") \ 3511cb0ef41Sopenharmony_ci T(InvalidArrayBufferResizeLength, "%: Invalid length parameter") \ 3521cb0ef41Sopenharmony_ci T(ArrayBufferAllocationFailed, "Array buffer allocation failed") \ 3531cb0ef41Sopenharmony_ci T(Invalid, "Invalid % : %") \ 3541cb0ef41Sopenharmony_ci T(InvalidArrayLength, "Invalid array length") \ 3551cb0ef41Sopenharmony_ci T(InvalidAtomicAccessIndex, "Invalid atomic access index") \ 3561cb0ef41Sopenharmony_ci T(InvalidCalendar, "Invalid calendar specified: %") \ 3571cb0ef41Sopenharmony_ci T(InvalidCodePoint, "Invalid code point %") \ 3581cb0ef41Sopenharmony_ci T(InvalidCountValue, "Invalid count value") \ 3591cb0ef41Sopenharmony_ci T(InvalidDataViewAccessorOffset, \ 3601cb0ef41Sopenharmony_ci "Offset is outside the bounds of the DataView") \ 3611cb0ef41Sopenharmony_ci T(InvalidDataViewLength, "Invalid DataView length %") \ 3621cb0ef41Sopenharmony_ci T(InvalidOffset, "Start offset % is outside the bounds of the buffer") \ 3631cb0ef41Sopenharmony_ci T(InvalidHint, "Invalid hint: %") \ 3641cb0ef41Sopenharmony_ci T(InvalidIndex, "Invalid value: not (convertible to) a safe integer") \ 3651cb0ef41Sopenharmony_ci T(InvalidLanguageTag, "Invalid language tag: %") \ 3661cb0ef41Sopenharmony_ci T(InvalidWeakMapKey, "Invalid value used as weak map key") \ 3671cb0ef41Sopenharmony_ci T(InvalidWeakSetValue, "Invalid value used in weak set") \ 3681cb0ef41Sopenharmony_ci T(InvalidShadowRealmEvaluateSourceText, "Invalid value used as source text") \ 3691cb0ef41Sopenharmony_ci T(InvalidStringLength, "Invalid string length") \ 3701cb0ef41Sopenharmony_ci T(InvalidTimeValue, "Invalid time value") \ 3711cb0ef41Sopenharmony_ci T(InvalidTimeValueForTemporal, "Invalid time value for Temporal %") \ 3721cb0ef41Sopenharmony_ci T(InvalidTimeZone, "Invalid time zone specified: %") \ 3731cb0ef41Sopenharmony_ci T(InvalidTypedArrayAlignment, "% of % should be a multiple of %") \ 3741cb0ef41Sopenharmony_ci T(InvalidTypedArrayIndex, "Invalid typed array index") \ 3751cb0ef41Sopenharmony_ci T(InvalidTypedArrayLength, "Invalid typed array length: %") \ 3761cb0ef41Sopenharmony_ci T(LetInLexicalBinding, "let is disallowed as a lexically bound name") \ 3771cb0ef41Sopenharmony_ci T(LocaleMatcher, "Illegal value for localeMatcher:%") \ 3781cb0ef41Sopenharmony_ci T(NormalizationForm, "The normalization form should be one of %.") \ 3791cb0ef41Sopenharmony_ci T(OutOfMemory, "%: Out of memory") \ 3801cb0ef41Sopenharmony_ci T(ParameterOfFunctionOutOfRange, \ 3811cb0ef41Sopenharmony_ci "Paramenter % of function %() is % and out of range") \ 3821cb0ef41Sopenharmony_ci T(ZeroDigitNumericSeparator, \ 3831cb0ef41Sopenharmony_ci "Numeric separator can not be used after leading 0.") \ 3841cb0ef41Sopenharmony_ci T(NumberFormatRange, "% argument must be between 0 and 100") \ 3851cb0ef41Sopenharmony_ci T(TrailingNumericSeparator, \ 3861cb0ef41Sopenharmony_ci "Numeric separators are not allowed at the end of numeric literals") \ 3871cb0ef41Sopenharmony_ci T(ContinuousNumericSeparator, \ 3881cb0ef41Sopenharmony_ci "Only one underscore is allowed as numeric separator") \ 3891cb0ef41Sopenharmony_ci T(PropertyValueOutOfRange, "% value is out of range.") \ 3901cb0ef41Sopenharmony_ci T(StackOverflow, "Maximum call stack size exceeded") \ 3911cb0ef41Sopenharmony_ci T(ToPrecisionFormatRange, \ 3921cb0ef41Sopenharmony_ci "toPrecision() argument must be between 1 and 100") \ 3931cb0ef41Sopenharmony_ci T(ToRadixFormatRange, "toString() radix argument must be between 2 and 36") \ 3941cb0ef41Sopenharmony_ci T(StructFieldCountOutOfRange, \ 3951cb0ef41Sopenharmony_ci "Struct field count out of range (maximum of 999 allowed)") \ 3961cb0ef41Sopenharmony_ci T(TypedArraySetOffsetOutOfBounds, "offset is out of bounds") \ 3971cb0ef41Sopenharmony_ci T(TypedArraySetSourceTooLarge, "Source is too large") \ 3981cb0ef41Sopenharmony_ci T(TypedArrayTooLargeToSort, \ 3991cb0ef41Sopenharmony_ci "Custom comparefn not supported for huge TypedArrays") \ 4001cb0ef41Sopenharmony_ci T(ValueOutOfRange, "Value % out of range for % options property %") \ 4011cb0ef41Sopenharmony_ci T(CollectionGrowFailed, "% maximum size exceeded") \ 4021cb0ef41Sopenharmony_ci /* SyntaxError */ \ 4031cb0ef41Sopenharmony_ci T(AmbiguousExport, \ 4041cb0ef41Sopenharmony_ci "The requested module '%' contains conflicting star exports for name '%'") \ 4051cb0ef41Sopenharmony_ci T(BadGetterArity, "Getter must not have any formal parameters.") \ 4061cb0ef41Sopenharmony_ci T(BadSetterArity, "Setter must have exactly one formal parameter.") \ 4071cb0ef41Sopenharmony_ci T(BigIntInvalidString, "Invalid BigInt string") \ 4081cb0ef41Sopenharmony_ci T(ConstructorIsAccessor, "Class constructor may not be an accessor") \ 4091cb0ef41Sopenharmony_ci T(ConstructorIsGenerator, "Class constructor may not be a generator") \ 4101cb0ef41Sopenharmony_ci T(ConstructorIsAsync, "Class constructor may not be an async method") \ 4111cb0ef41Sopenharmony_ci T(ConstructorIsPrivate, "Class constructor may not be a private method") \ 4121cb0ef41Sopenharmony_ci T(DerivedConstructorReturnedNonObject, \ 4131cb0ef41Sopenharmony_ci "Derived constructors may only return object or undefined") \ 4141cb0ef41Sopenharmony_ci T(DuplicateConstructor, "A class may only have one constructor") \ 4151cb0ef41Sopenharmony_ci T(DuplicateExport, "Duplicate export of '%'") \ 4161cb0ef41Sopenharmony_ci T(DuplicateProto, \ 4171cb0ef41Sopenharmony_ci "Duplicate __proto__ fields are not allowed in object literals") \ 4181cb0ef41Sopenharmony_ci T(ForInOfLoopInitializer, \ 4191cb0ef41Sopenharmony_ci "% loop variable declaration may not have an initializer.") \ 4201cb0ef41Sopenharmony_ci T(ForOfLet, "The left-hand side of a for-of loop may not start with 'let'.") \ 4211cb0ef41Sopenharmony_ci T(ForOfAsync, "The left-hand side of a for-of loop may not be 'async'.") \ 4221cb0ef41Sopenharmony_ci T(ForInOfLoopMultiBindings, \ 4231cb0ef41Sopenharmony_ci "Invalid left-hand side in % loop: Must have a single binding.") \ 4241cb0ef41Sopenharmony_ci T(GeneratorInSingleStatementContext, \ 4251cb0ef41Sopenharmony_ci "Generators can only be declared at the top level or inside a block.") \ 4261cb0ef41Sopenharmony_ci T(AsyncFunctionInSingleStatementContext, \ 4271cb0ef41Sopenharmony_ci "Async functions can only be declared at the top level or inside a " \ 4281cb0ef41Sopenharmony_ci "block.") \ 4291cb0ef41Sopenharmony_ci T(IllegalBreak, "Illegal break statement") \ 4301cb0ef41Sopenharmony_ci T(ModuleExportNameWithoutFromClause, \ 4311cb0ef41Sopenharmony_ci "String literal module export names must be followed by a 'from' clause") \ 4321cb0ef41Sopenharmony_ci T(NoIterationStatement, \ 4331cb0ef41Sopenharmony_ci "Illegal continue statement: no surrounding iteration statement") \ 4341cb0ef41Sopenharmony_ci T(IllegalContinue, \ 4351cb0ef41Sopenharmony_ci "Illegal continue statement: '%' does not denote an iteration statement") \ 4361cb0ef41Sopenharmony_ci T(IllegalLanguageModeDirective, \ 4371cb0ef41Sopenharmony_ci "Illegal '%' directive in function with non-simple parameter list") \ 4381cb0ef41Sopenharmony_ci T(IllegalReturn, "Illegal return statement") \ 4391cb0ef41Sopenharmony_ci T(IntrinsicWithSpread, "Intrinsic calls do not support spread arguments") \ 4401cb0ef41Sopenharmony_ci T(InvalidRestBindingPattern, \ 4411cb0ef41Sopenharmony_ci "`...` must be followed by an identifier in declaration contexts") \ 4421cb0ef41Sopenharmony_ci T(InvalidPropertyBindingPattern, "Illegal property in declaration context") \ 4431cb0ef41Sopenharmony_ci T(InvalidRestAssignmentPattern, \ 4441cb0ef41Sopenharmony_ci "`...` must be followed by an assignable reference in assignment " \ 4451cb0ef41Sopenharmony_ci "contexts") \ 4461cb0ef41Sopenharmony_ci T(InvalidEscapedReservedWord, "Keyword must not contain escaped characters") \ 4471cb0ef41Sopenharmony_ci T(InvalidEscapedMetaProperty, "'%' must not contain escaped characters") \ 4481cb0ef41Sopenharmony_ci T(InvalidLhsInAssignment, "Invalid left-hand side in assignment") \ 4491cb0ef41Sopenharmony_ci T(InvalidCoverInitializedName, "Invalid shorthand property initializer") \ 4501cb0ef41Sopenharmony_ci T(InvalidDestructuringTarget, "Invalid destructuring assignment target") \ 4511cb0ef41Sopenharmony_ci T(InvalidLhsInFor, "Invalid left-hand side in for-loop") \ 4521cb0ef41Sopenharmony_ci T(InvalidLhsInPostfixOp, \ 4531cb0ef41Sopenharmony_ci "Invalid left-hand side expression in postfix operation") \ 4541cb0ef41Sopenharmony_ci T(InvalidLhsInPrefixOp, \ 4551cb0ef41Sopenharmony_ci "Invalid left-hand side expression in prefix operation") \ 4561cb0ef41Sopenharmony_ci T(InvalidModuleExportName, \ 4571cb0ef41Sopenharmony_ci "Invalid module export name: contains unpaired surrogate") \ 4581cb0ef41Sopenharmony_ci T(InvalidRegExpFlags, "Invalid flags supplied to RegExp constructor '%'") \ 4591cb0ef41Sopenharmony_ci T(InvalidOrUnexpectedToken, "Invalid or unexpected token") \ 4601cb0ef41Sopenharmony_ci T(InvalidPrivateBrandInstance, "Receiver must be an instance of class %") \ 4611cb0ef41Sopenharmony_ci T(InvalidPrivateBrandStatic, "Receiver must be class %") \ 4621cb0ef41Sopenharmony_ci T(InvalidPrivateBrandReinitialization, \ 4631cb0ef41Sopenharmony_ci "Cannot initialize private methods of class % twice on the same object") \ 4641cb0ef41Sopenharmony_ci T(InvalidPrivateFieldReinitialization, \ 4651cb0ef41Sopenharmony_ci "Cannot initialize % twice on the same object") \ 4661cb0ef41Sopenharmony_ci T(InvalidPrivateFieldResolution, \ 4671cb0ef41Sopenharmony_ci "Private field '%' must be declared in an enclosing class") \ 4681cb0ef41Sopenharmony_ci T(InvalidPrivateMemberRead, \ 4691cb0ef41Sopenharmony_ci "Cannot read private member % from an object whose class did not declare " \ 4701cb0ef41Sopenharmony_ci "it") \ 4711cb0ef41Sopenharmony_ci T(InvalidPrivateMemberWrite, \ 4721cb0ef41Sopenharmony_ci "Cannot write private member % to an object whose class did not declare " \ 4731cb0ef41Sopenharmony_ci "it") \ 4741cb0ef41Sopenharmony_ci T(InvalidPrivateMethodWrite, "Private method '%' is not writable") \ 4751cb0ef41Sopenharmony_ci T(InvalidPrivateGetterAccess, "'%' was defined without a getter") \ 4761cb0ef41Sopenharmony_ci T(InvalidPrivateSetterAccess, "'%' was defined without a setter") \ 4771cb0ef41Sopenharmony_ci T(InvalidUnusedPrivateStaticMethodAccessedByDebugger, \ 4781cb0ef41Sopenharmony_ci "Unused static private method '%' cannot be accessed at debug time") \ 4791cb0ef41Sopenharmony_ci T(JsonParseUnexpectedEOS, "Unexpected end of JSON input") \ 4801cb0ef41Sopenharmony_ci T(JsonParseUnexpectedToken, "Unexpected token % in JSON at position %") \ 4811cb0ef41Sopenharmony_ci T(JsonParseUnexpectedTokenNumber, "Unexpected number in JSON at position %") \ 4821cb0ef41Sopenharmony_ci T(JsonParseUnexpectedTokenString, "Unexpected string in JSON at position %") \ 4831cb0ef41Sopenharmony_ci T(LabelRedeclaration, "Label '%' has already been declared") \ 4841cb0ef41Sopenharmony_ci T(LabelledFunctionDeclaration, \ 4851cb0ef41Sopenharmony_ci "Labelled function declaration not allowed as the body of a control flow " \ 4861cb0ef41Sopenharmony_ci "structure") \ 4871cb0ef41Sopenharmony_ci T(MalformedArrowFunParamList, "Malformed arrow function parameter list") \ 4881cb0ef41Sopenharmony_ci T(MalformedRegExp, "Invalid regular expression: /%/: %") \ 4891cb0ef41Sopenharmony_ci T(MalformedRegExpFlags, "Invalid regular expression flags") \ 4901cb0ef41Sopenharmony_ci T(ModuleExportUndefined, "Export '%' is not defined in module") \ 4911cb0ef41Sopenharmony_ci T(MissingFunctionName, "Function statements require a function name") \ 4921cb0ef41Sopenharmony_ci T(HtmlCommentInModule, "HTML comments are not allowed in modules") \ 4931cb0ef41Sopenharmony_ci T(MultipleDefaultsInSwitch, \ 4941cb0ef41Sopenharmony_ci "More than one default clause in switch statement") \ 4951cb0ef41Sopenharmony_ci T(NewlineAfterThrow, "Illegal newline after throw") \ 4961cb0ef41Sopenharmony_ci T(NoCatchOrFinally, "Missing catch or finally after try") \ 4971cb0ef41Sopenharmony_ci T(ParamAfterRest, "Rest parameter must be last formal parameter") \ 4981cb0ef41Sopenharmony_ci T(FlattenPastSafeLength, \ 4991cb0ef41Sopenharmony_ci "Flattening % elements on an array-like of length % " \ 5001cb0ef41Sopenharmony_ci "is disallowed, as the total surpasses 2**53-1") \ 5011cb0ef41Sopenharmony_ci T(PushPastSafeLength, \ 5021cb0ef41Sopenharmony_ci "Pushing % elements on an array-like of length % " \ 5031cb0ef41Sopenharmony_ci "is disallowed, as the total surpasses 2**53-1") \ 5041cb0ef41Sopenharmony_ci T(ElementAfterRest, "Rest element must be last element") \ 5051cb0ef41Sopenharmony_ci T(BadSetterRestParameter, \ 5061cb0ef41Sopenharmony_ci "Setter function argument must not be a rest parameter") \ 5071cb0ef41Sopenharmony_ci T(ParamDupe, "Duplicate parameter name not allowed in this context") \ 5081cb0ef41Sopenharmony_ci T(ArgStringTerminatesParametersEarly, \ 5091cb0ef41Sopenharmony_ci "Arg string terminates parameters early") \ 5101cb0ef41Sopenharmony_ci T(UnexpectedEndOfArgString, "Unexpected end of arg string") \ 5111cb0ef41Sopenharmony_ci T(RestDefaultInitializer, \ 5121cb0ef41Sopenharmony_ci "Rest parameter may not have a default initializer") \ 5131cb0ef41Sopenharmony_ci T(RuntimeWrongNumArgs, "Runtime function given wrong number of arguments") \ 5141cb0ef41Sopenharmony_ci T(SuperNotCalled, \ 5151cb0ef41Sopenharmony_ci "Must call super constructor in derived class before accessing 'this' or " \ 5161cb0ef41Sopenharmony_ci "returning from derived constructor") \ 5171cb0ef41Sopenharmony_ci T(SingleFunctionLiteral, "Single function literal required") \ 5181cb0ef41Sopenharmony_ci T(SloppyFunction, \ 5191cb0ef41Sopenharmony_ci "In non-strict mode code, functions can only be declared at top level, " \ 5201cb0ef41Sopenharmony_ci "inside a block, or as the body of an if statement.") \ 5211cb0ef41Sopenharmony_ci T(SpeciesNotConstructor, \ 5221cb0ef41Sopenharmony_ci "object.constructor[Symbol.species] is not a constructor") \ 5231cb0ef41Sopenharmony_ci T(StrictDelete, "Delete of an unqualified identifier in strict mode.") \ 5241cb0ef41Sopenharmony_ci T(StrictEvalArguments, "Unexpected eval or arguments in strict mode") \ 5251cb0ef41Sopenharmony_ci T(StrictFunction, \ 5261cb0ef41Sopenharmony_ci "In strict mode code, functions can only be declared at top level or " \ 5271cb0ef41Sopenharmony_ci "inside a block.") \ 5281cb0ef41Sopenharmony_ci T(StrictOctalLiteral, "Octal literals are not allowed in strict mode.") \ 5291cb0ef41Sopenharmony_ci T(StrictDecimalWithLeadingZero, \ 5301cb0ef41Sopenharmony_ci "Decimals with leading zeros are not allowed in strict mode.") \ 5311cb0ef41Sopenharmony_ci T(StrictOctalEscape, \ 5321cb0ef41Sopenharmony_ci "Octal escape sequences are not allowed in strict mode.") \ 5331cb0ef41Sopenharmony_ci T(Strict8Or9Escape, "\\8 and \\9 are not allowed in strict mode.") \ 5341cb0ef41Sopenharmony_ci T(StrictWith, "Strict mode code may not include a with statement") \ 5351cb0ef41Sopenharmony_ci T(TemplateOctalLiteral, \ 5361cb0ef41Sopenharmony_ci "Octal escape sequences are not allowed in template strings.") \ 5371cb0ef41Sopenharmony_ci T(Template8Or9Escape, "\\8 and \\9 are not allowed in template strings.") \ 5381cb0ef41Sopenharmony_ci T(ThisFormalParameter, "'this' is not a valid formal parameter name") \ 5391cb0ef41Sopenharmony_ci T(AwaitBindingIdentifier, \ 5401cb0ef41Sopenharmony_ci "'await' is not a valid identifier name in an async function") \ 5411cb0ef41Sopenharmony_ci T(AwaitExpressionFormalParameter, \ 5421cb0ef41Sopenharmony_ci "Illegal await-expression in formal parameters of async function") \ 5431cb0ef41Sopenharmony_ci T(TooManyArguments, \ 5441cb0ef41Sopenharmony_ci "Too many arguments in function call (only 65535 allowed)") \ 5451cb0ef41Sopenharmony_ci T(TooManyParameters, \ 5461cb0ef41Sopenharmony_ci "Too many parameters in function definition (only 65534 allowed)") \ 5471cb0ef41Sopenharmony_ci T(TooManyProperties, "Too many properties to enumerate") \ 5481cb0ef41Sopenharmony_ci T(TooManySpreads, \ 5491cb0ef41Sopenharmony_ci "Literal containing too many nested spreads (up to 65534 allowed)") \ 5501cb0ef41Sopenharmony_ci T(TooManyVariables, "Too many variables declared (only 4194303 allowed)") \ 5511cb0ef41Sopenharmony_ci T(TooManyElementsInPromiseCombinator, \ 5521cb0ef41Sopenharmony_ci "Too many elements passed to Promise.%") \ 5531cb0ef41Sopenharmony_ci T(TypedArrayTooShort, \ 5541cb0ef41Sopenharmony_ci "Derived TypedArray constructor created an array which was too small") \ 5551cb0ef41Sopenharmony_ci T(UnexpectedEOS, "Unexpected end of input") \ 5561cb0ef41Sopenharmony_ci T(UnexpectedPrivateField, "Unexpected private field") \ 5571cb0ef41Sopenharmony_ci T(UnexpectedReserved, "Unexpected reserved word") \ 5581cb0ef41Sopenharmony_ci T(UnexpectedStrictReserved, "Unexpected strict mode reserved word") \ 5591cb0ef41Sopenharmony_ci T(UnexpectedSuper, "'super' keyword unexpected here") \ 5601cb0ef41Sopenharmony_ci T(UnexpectedNewTarget, "new.target expression is not allowed here") \ 5611cb0ef41Sopenharmony_ci T(UnexpectedTemplateString, "Unexpected template string") \ 5621cb0ef41Sopenharmony_ci T(UnexpectedToken, "Unexpected token '%'") \ 5631cb0ef41Sopenharmony_ci T(UnexpectedTokenUnaryExponentiation, \ 5641cb0ef41Sopenharmony_ci "Unary operator used immediately before exponentiation expression. " \ 5651cb0ef41Sopenharmony_ci "Parenthesis must be used to disambiguate operator precedence") \ 5661cb0ef41Sopenharmony_ci T(UnexpectedTokenIdentifier, "Unexpected identifier") \ 5671cb0ef41Sopenharmony_ci T(UnexpectedTokenNumber, "Unexpected number") \ 5681cb0ef41Sopenharmony_ci T(UnexpectedTokenString, "Unexpected string") \ 5691cb0ef41Sopenharmony_ci T(UnexpectedTokenRegExp, "Unexpected regular expression") \ 5701cb0ef41Sopenharmony_ci T(UnexpectedLexicalDeclaration, \ 5711cb0ef41Sopenharmony_ci "Lexical declaration cannot appear in a single-statement context") \ 5721cb0ef41Sopenharmony_ci T(UnknownLabel, "Undefined label '%'") \ 5731cb0ef41Sopenharmony_ci T(UnresolvableExport, \ 5741cb0ef41Sopenharmony_ci "The requested module '%' does not provide an export named '%'") \ 5751cb0ef41Sopenharmony_ci T(UnterminatedArgList, "missing ) after argument list") \ 5761cb0ef41Sopenharmony_ci T(UnterminatedRegExp, "Invalid regular expression: missing /") \ 5771cb0ef41Sopenharmony_ci T(UnterminatedTemplate, "Unterminated template literal") \ 5781cb0ef41Sopenharmony_ci T(UnterminatedTemplateExpr, "Missing } in template expression") \ 5791cb0ef41Sopenharmony_ci T(FoundNonCallableHasInstance, "Found non-callable @@hasInstance") \ 5801cb0ef41Sopenharmony_ci T(InvalidHexEscapeSequence, "Invalid hexadecimal escape sequence") \ 5811cb0ef41Sopenharmony_ci T(InvalidUnicodeEscapeSequence, "Invalid Unicode escape sequence") \ 5821cb0ef41Sopenharmony_ci T(UndefinedUnicodeCodePoint, "Undefined Unicode code-point") \ 5831cb0ef41Sopenharmony_ci T(YieldInParameter, "Yield expression not allowed in formal parameter") \ 5841cb0ef41Sopenharmony_ci /* EvalError */ \ 5851cb0ef41Sopenharmony_ci T(CodeGenFromStrings, "%") \ 5861cb0ef41Sopenharmony_ci T(NoSideEffectDebugEvaluate, "Possible side-effect in debug-evaluate") \ 5871cb0ef41Sopenharmony_ci /* URIError */ \ 5881cb0ef41Sopenharmony_ci T(URIMalformed, "URI malformed") \ 5891cb0ef41Sopenharmony_ci /* Wasm errors (currently Error) */ \ 5901cb0ef41Sopenharmony_ci T(WasmTrapUnreachable, "unreachable") \ 5911cb0ef41Sopenharmony_ci T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ 5921cb0ef41Sopenharmony_ci T(WasmTrapUnalignedAccess, "operation does not support unaligned accesses") \ 5931cb0ef41Sopenharmony_ci T(WasmTrapDivByZero, "divide by zero") \ 5941cb0ef41Sopenharmony_ci T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ 5951cb0ef41Sopenharmony_ci T(WasmTrapRemByZero, "remainder by zero") \ 5961cb0ef41Sopenharmony_ci T(WasmTrapFloatUnrepresentable, "float unrepresentable in integer range") \ 5971cb0ef41Sopenharmony_ci T(WasmTrapTableOutOfBounds, "table index is out of bounds") \ 5981cb0ef41Sopenharmony_ci T(WasmTrapFuncSigMismatch, "null function or function signature mismatch") \ 5991cb0ef41Sopenharmony_ci T(WasmTrapMultiReturnLengthMismatch, "multi-return length mismatch") \ 6001cb0ef41Sopenharmony_ci T(WasmTrapJSTypeError, "type incompatibility when transforming from/to JS") \ 6011cb0ef41Sopenharmony_ci T(WasmTrapDataSegmentOutOfBounds, "data segment out of bounds") \ 6021cb0ef41Sopenharmony_ci T(WasmTrapElemSegmentDropped, "element segment has been dropped") \ 6031cb0ef41Sopenharmony_ci T(WasmTrapRethrowNull, "rethrowing null value") \ 6041cb0ef41Sopenharmony_ci T(WasmTrapNullDereference, "dereferencing a null pointer") \ 6051cb0ef41Sopenharmony_ci T(WasmTrapIllegalCast, "illegal cast") \ 6061cb0ef41Sopenharmony_ci T(WasmTrapArrayOutOfBounds, "array element access out of bounds") \ 6071cb0ef41Sopenharmony_ci T(WasmTrapArrayTooLarge, "requested new array is too large") \ 6081cb0ef41Sopenharmony_ci T(WasmExceptionError, "wasm exception") \ 6091cb0ef41Sopenharmony_ci /* Asm.js validation related */ \ 6101cb0ef41Sopenharmony_ci T(AsmJsInvalid, "Invalid asm.js: %") \ 6111cb0ef41Sopenharmony_ci T(AsmJsCompiled, "Converted asm.js to WebAssembly: %") \ 6121cb0ef41Sopenharmony_ci T(AsmJsInstantiated, "Instantiated asm.js: %") \ 6131cb0ef41Sopenharmony_ci T(AsmJsLinkingFailed, "Linking failure in asm.js: %") \ 6141cb0ef41Sopenharmony_ci /* DataCloneError messages */ \ 6151cb0ef41Sopenharmony_ci T(DataCloneError, "% could not be cloned.") \ 6161cb0ef41Sopenharmony_ci T(DataCloneErrorOutOfMemory, "Data cannot be cloned, out of memory.") \ 6171cb0ef41Sopenharmony_ci T(DataCloneErrorDetachedArrayBuffer, \ 6181cb0ef41Sopenharmony_ci "An ArrayBuffer is detached and could not be cloned.") \ 6191cb0ef41Sopenharmony_ci T(DataCloneErrorNonDetachableArrayBuffer, \ 6201cb0ef41Sopenharmony_ci "ArrayBuffer is not detachable and could not be cloned.") \ 6211cb0ef41Sopenharmony_ci T(DataCloneErrorSharedArrayBufferTransferred, \ 6221cb0ef41Sopenharmony_ci "A SharedArrayBuffer could not be cloned. SharedArrayBuffer must not be " \ 6231cb0ef41Sopenharmony_ci "transferred.") \ 6241cb0ef41Sopenharmony_ci T(DataCloneDeserializationError, "Unable to deserialize cloned data.") \ 6251cb0ef41Sopenharmony_ci T(DataCloneDeserializationVersionError, \ 6261cb0ef41Sopenharmony_ci "Unable to deserialize cloned data due to invalid or unsupported " \ 6271cb0ef41Sopenharmony_ci "version.") \ 6281cb0ef41Sopenharmony_ci /* Builtins-Trace Errors */ \ 6291cb0ef41Sopenharmony_ci T(TraceEventCategoryError, "Trace event category must be a string.") \ 6301cb0ef41Sopenharmony_ci T(TraceEventNameError, "Trace event name must be a string.") \ 6311cb0ef41Sopenharmony_ci T(TraceEventNameLengthError, \ 6321cb0ef41Sopenharmony_ci "Trace event name must not be an empty string.") \ 6331cb0ef41Sopenharmony_ci T(TraceEventPhaseError, "Trace event phase must be a number.") \ 6341cb0ef41Sopenharmony_ci T(TraceEventIDError, "Trace event id must be a number.") \ 6351cb0ef41Sopenharmony_ci /* Weak refs */ \ 6361cb0ef41Sopenharmony_ci T(InvalidWeakRefsUnregisterToken, "Invalid unregisterToken ('%')") \ 6371cb0ef41Sopenharmony_ci T(WeakRefsCleanupMustBeCallable, \ 6381cb0ef41Sopenharmony_ci "FinalizationRegistry: cleanup must be callable") \ 6391cb0ef41Sopenharmony_ci T(InvalidWeakRefsRegisterTarget, \ 6401cb0ef41Sopenharmony_ci "FinalizationRegistry.prototype.register: invalid target") \ 6411cb0ef41Sopenharmony_ci T(WeakRefsRegisterTargetAndHoldingsMustNotBeSame, \ 6421cb0ef41Sopenharmony_ci "FinalizationRegistry.prototype.register: target and holdings must not " \ 6431cb0ef41Sopenharmony_ci "be same") \ 6441cb0ef41Sopenharmony_ci T(InvalidWeakRefsWeakRefConstructorTarget, "WeakRef: invalid target") \ 6451cb0ef41Sopenharmony_ci T(OptionalChainingNoNew, "Invalid optional chain from new expression") \ 6461cb0ef41Sopenharmony_ci T(OptionalChainingNoSuper, "Invalid optional chain from super property") \ 6471cb0ef41Sopenharmony_ci T(OptionalChainingNoTemplate, "Invalid tagged template on optional chain") \ 6481cb0ef41Sopenharmony_ci /* AggregateError */ \ 6491cb0ef41Sopenharmony_ci T(AllPromisesRejected, "All promises were rejected") \ 6501cb0ef41Sopenharmony_ci /* Web snapshots */ \ 6511cb0ef41Sopenharmony_ci T(WebSnapshotError, "Web snapshot failed: %") 6521cb0ef41Sopenharmony_ci 6531cb0ef41Sopenharmony_cienum class MessageTemplate { 6541cb0ef41Sopenharmony_ci#define TEMPLATE(NAME, STRING) k##NAME, 6551cb0ef41Sopenharmony_ci MESSAGE_TEMPLATES(TEMPLATE) 6561cb0ef41Sopenharmony_ci#undef TEMPLATE 6571cb0ef41Sopenharmony_ci kMessageCount 6581cb0ef41Sopenharmony_ci}; 6591cb0ef41Sopenharmony_ci 6601cb0ef41Sopenharmony_ciinline MessageTemplate MessageTemplateFromInt(int message_id) { 6611cb0ef41Sopenharmony_ci DCHECK_LT(static_cast<unsigned>(message_id), 6621cb0ef41Sopenharmony_ci static_cast<unsigned>(MessageTemplate::kMessageCount)); 6631cb0ef41Sopenharmony_ci return static_cast<MessageTemplate>(message_id); 6641cb0ef41Sopenharmony_ci} 6651cb0ef41Sopenharmony_ci 6661cb0ef41Sopenharmony_ci} // namespace internal 6671cb0ef41Sopenharmony_ci} // namespace v8 6681cb0ef41Sopenharmony_ci 6691cb0ef41Sopenharmony_ci#endif // V8_COMMON_MESSAGE_TEMPLATE_H_ 670