LibJS: Alphabetically sort property keys and error types

And make ErrorType definitions use a better hanging-indent style, to
make it easier to maintain going forward.

i.e. instead of:

    M(VeryLongErrorNameHere, "very long error "
                             "message across multiple "
                             "lines"

We now have:

    M(VeryLongErrorNameHere,
        "very long error message across multiple "
        "lines")
This commit is contained in:
Timothy Flynn 2024-11-26 09:33:52 -05:00 committed by Tim Flynn
parent 6a9aec29d5
commit a93d32a306
Notes: github-actions[bot] 2024-11-26 16:36:17 +00:00
2 changed files with 335 additions and 335 deletions

View file

@ -13,11 +13,11 @@
namespace JS {
#define ENUMERATE_STANDARD_PROPERTY_NAMES(P) \
P(__proto__) \
P(__defineGetter__) \
P(__defineSetter__) \
P(__lookupGetter__) \
P(__lookupSetter__) \
P(__proto__) \
P($1) \
P($2) \
P($3) \
@ -27,40 +27,6 @@ namespace JS {
P($7) \
P($8) \
P($9) \
P(Atomics) \
P(BYTES_PER_ELEMENT) \
P(BigInt) \
P(Boolean) \
P(E) \
P(EPSILON) \
P(Function) \
P(Infinity) \
P(Intl) \
P(JSON) \
P(LN10) \
P(LN2) \
P(LOG10E) \
P(LOG2E) \
P(MAX_SAFE_INTEGER) \
P(MAX_VALUE) \
P(MIN_SAFE_INTEGER) \
P(MIN_VALUE) \
P(Math) \
P(NEGATIVE_INFINITY) \
P(NaN) \
P(Now) \
P(Number) \
P(PI) \
P(POSITIVE_INFINITY) \
P(Proxy) \
P(Reflect) \
P(RegExp) \
P(SQRT1_2) \
P(SQRT2) \
P(String) \
P(Symbol) \
P(Temporal) \
P(UTC) \
P(abs) \
P(acos) \
P(acosh) \
@ -73,25 +39,29 @@ namespace JS {
P(any) \
P(apply) \
P(arguments) \
P(asIntN) \
P(asUintN) \
P(asin) \
P(asinh) \
P(asIntN) \
P(assert) \
P(assign) \
P(asUintN) \
P(at) \
P(atan) \
P(atan2) \
P(atanh) \
P(Atomics) \
P(baseName) \
P(big) \
P(BigInt) \
P(bind) \
P(blank) \
P(blink) \
P(bold) \
P(Boolean) \
P(buffer) \
P(byteLength) \
P(byteOffset) \
P(BYTES_PER_ELEMENT) \
P(calendar) \
P(calendarId) \
P(calendarName) \
@ -110,6 +80,7 @@ namespace JS {
P(codePointAt) \
P(collation) \
P(compactDisplay) \
P(compare) \
P(compareExchange) \
P(compile) \
P(composite) \
@ -120,7 +91,6 @@ namespace JS {
P(construct) \
P(constructor) \
P(containing) \
P(compare) \
P(copyWithin) \
P(cos) \
P(cosh) \
@ -158,6 +128,7 @@ namespace JS {
P(done) \
P(dotAll) \
P(drop) \
P(E) \
P(easing) \
P(encodeURI) \
P(encodeURIComponent) \
@ -166,6 +137,7 @@ namespace JS {
P(enumerable) \
P(epochMilliseconds) \
P(epochNanoseconds) \
P(EPSILON) \
P(equals) \
P(era) \
P(eraYear) \
@ -179,14 +151,15 @@ namespace JS {
P(exec) \
P(exp) \
P(expm1) \
P(f16round) \
P(fallback) \
P(fill) \
P(filter) \
P(finally) \
P(find) \
P(findIndex) \
P(findLast) \
P(findLastIndex) \
P(findIndex) \
P(firstDay) \
P(firstDayOfWeek) \
P(fixed) \
@ -215,7 +188,7 @@ namespace JS {
P(fromEpochNanoseconds) \
P(fromHex) \
P(fround) \
P(f16round) \
P(Function) \
P(gc) \
P(get) \
P(getBigInt64) \
@ -284,17 +257,19 @@ namespace JS {
P(id) \
P(ignoreCase) \
P(ignorePunctuation) \
P(imul) \
P(importValue) \
P(imul) \
P(includes) \
P(index) \
P(indexOf) \
P(indices) \
P(Infinity) \
P(info) \
P(inLeapYear) \
P(input) \
P(instant) \
P(intersection) \
P(Intl) \
P(is) \
P(isArray) \
P(isDisjointFrom) \
@ -315,6 +290,7 @@ namespace JS {
P(isWordLike) \
P(italics) \
P(join) \
P(JSON) \
P(keyFor) \
P(keys) \
P(language) \
@ -323,23 +299,32 @@ namespace JS {
P(lastChunkHandling) \
P(lastIndex) \
P(lastIndexOf) \
P(lastMatch) \
P(lastParen) \
P(leftContext) \
P(length) \
P(link) \
P(LN10) \
P(LN2) \
P(load) \
P(locale) \
P(localeCompare) \
P(localeMatcher) \
P(log) \
P(log10) \
P(LOG10E) \
P(log1p) \
P(log2) \
P(log10) \
P(lastMatch) \
P(lastParen) \
P(leftContext) \
P(LOG2E) \
P(map) \
P(Math) \
P(max) \
P(MAX_SAFE_INTEGER) \
P(MAX_VALUE) \
P(maxByteLength) \
P(maximize) \
P(maximumFractionDigits) \
P(maximumSignificantDigits) \
P(message) \
P(microsecond) \
P(microseconds) \
@ -348,10 +333,10 @@ namespace JS {
P(milliseconds) \
P(millisecondsDisplay) \
P(min) \
P(MIN_SAFE_INTEGER) \
P(MIN_VALUE) \
P(minimalDays) \
P(minimize) \
P(maximumFractionDigits) \
P(maximumSignificantDigits) \
P(minimumFractionDigits) \
P(minimumIntegerDigits) \
P(minimumSignificantDigits) \
@ -366,15 +351,19 @@ namespace JS {
P(move) \
P(multiline) \
P(name) \
P(NaN) \
P(nanosecond) \
P(nanoseconds) \
P(nanosecondsDisplay) \
P(negated) \
P(NEGATIVE_INFINITY) \
P(next) \
P(normalize) \
P(notation) \
P(notify) \
P(Now) \
P(now) \
P(Number) \
P(numberingSystem) \
P(numeric) \
P(of) \
@ -389,17 +378,20 @@ namespace JS {
P(parseFloat) \
P(parseInt) \
P(pause) \
P(PI) \
P(plainDateISO) \
P(plainDateTimeISO) \
P(plainTime) \
P(plainTimeISO) \
P(pluralCategories) \
P(pop) \
P(POSITIVE_INFINITY) \
P(pow) \
P(preventExtensions) \
P(promise) \
P(propertyIsEnumerable) \
P(prototype) \
P(Proxy) \
P(proxy) \
P(push) \
P(race) \
@ -409,6 +401,8 @@ namespace JS {
P(reason) \
P(reduce) \
P(reduceRight) \
P(Reflect) \
P(RegExp) \
P(region) \
P(reject) \
P(relativeTo) \
@ -420,11 +414,11 @@ namespace JS {
P(reverse) \
P(revocable) \
P(revoke) \
P(rightContext) \
P(round) \
P(roundingIncrement) \
P(roundingMode) \
P(roundingPriority) \
P(rightContext) \
P(script) \
P(seal) \
P(second) \
@ -480,6 +474,8 @@ namespace JS {
P(source) \
P(splice) \
P(sqrt) \
P(SQRT1_2) \
P(SQRT2) \
P(stack) \
P(startOfDay) \
P(startsWith) \
@ -487,6 +483,7 @@ namespace JS {
P(sticky) \
P(store) \
P(strike) \
P(String) \
P(stringify) \
P(style) \
P(sub) \
@ -495,14 +492,16 @@ namespace JS {
P(substring) \
P(subtract) \
P(sup) \
P(suppressed) \
P(supportedLocalesOf) \
P(supportedValuesOf) \
P(suppressed) \
P(Symbol) \
P(symmetricDifference) \
P(table) \
P(take) \
P(tan) \
P(tanh) \
P(Temporal) \
P(test) \
P(then) \
P(time) \
@ -568,15 +567,16 @@ namespace JS {
P(usage) \
P(use) \
P(useGrouping) \
P(UTC) \
P(value) \
P(valueOf) \
P(values) \
P(wait) \
P(waitAsync) \
P(warn) \
P(weekOfYear) \
P(weekday) \
P(weekend) \
P(weekOfYear) \
P(weeks) \
P(weeksDisplay) \
P(with) \

View file

@ -9,10 +9,12 @@
#include <AK/StringView.h>
#define JS_ENUMERATE_ERROR_TYPES(M) \
M(ArrayMaxSize, "Maximum array size exceeded") \
M(AccessorBadField, "Accessor descriptor's '{}' field must be a function or undefined") \
M(AccessorValueOrWritable, "Accessor property descriptor cannot specify a value or writable key") \
M(AgentCannotSuspend, "Agent is not allowed to suspend") \
M(ArrayMaxSize, "Maximum array size exceeded") \
M(BadArgCountMany, "{}() needs {} arguments") \
M(BadArgCountOne, "{}() needs one argument") \
M(BigIntBadOperator, "Cannot use {} operator with BigInt") \
M(BigIntBadOperatorOtherType, "Cannot use {} operator with BigInt and other type") \
M(BigIntFromNonIntegral, "Cannot convert non-integral number to BigInt") \
@ -21,12 +23,12 @@
M(BufferOutOfBounds, "{} contains a property which references a value at an index not contained within its buffer's bounds") \
M(ByteLengthExceedsMaxByteLength, "ArrayBuffer byte length of {} exceeds the max byte length of {}") \
M(CallStackSizeExceeded, "Call stack size limit exceeded") \
M(CannotBeHeldWeakly, "{} cannot be held weakly") \
M(CannotDeclareGlobalFunction, "Cannot declare global function of name '{}'") \
M(CannotDeclareGlobalVariable, "Cannot declare global variable of name '{}'") \
M(CannotBeHeldWeakly, "{} cannot be held weakly") \
M(ClassConstructorWithoutNew, "Class constructor {} must be called with 'new'") \
M(ClassExtendsValueNotAConstructorOrNull, "Class extends value {} is not a constructor or null") \
M(ClassExtendsValueInvalidPrototype, "Class extends value has an invalid prototype {}") \
M(ClassExtendsValueNotAConstructorOrNull, "Class extends value {} is not a constructor or null") \
M(ClassIsAbstract, "Abstract class {} cannot be constructed directly") \
M(ConstructorWithoutNew, "{} constructor must be called with 'new'") \
M(Convert, "Cannot convert {} to {}") \
@ -40,9 +42,12 @@
M(DynamicImportNotAllowed, "Dynamic Imports are not allowed") \
M(FinalizationRegistrySameTargetAndValue, "Target and held value must not be the same") \
M(FixedArrayBuffer, "ArrayBuffer is not resizable") \
M(GetCapabilitiesExecutorCalledMultipleTimes, "GetCapabilitiesExecutor was called multiple times") \
M(GeneratorAlreadyExecuting, "Generator is already executing") \
M(GeneratorBrandMismatch, "Generator brand '{}' does not match generator brand '{}')") \
M(GetCapabilitiesExecutorCalledMultipleTimes, "GetCapabilitiesExecutor was called multiple times") \
M(GetLegacyRegExpStaticPropertyThisValueMismatch, \
"Legacy RegExp static property getter must be called with the RegExp constructor for the this value") \
M(GetLegacyRegExpStaticPropertyValueEmpty, "Legacy RegExp static property getter value is empty") \
M(GlobalEnvironmentAlreadyHasBinding, "Global environment already has binding '{}'") \
M(IndexOutOfRange, "Index {} is out of range of array length {}") \
M(InOperatorWithObject, "'in' operator must be used on an object") \
@ -58,25 +63,27 @@
M(IntlInvalidTime, "Time value must be between -8.64E15 and 8.64E15") \
M(IntlInvalidUnit, "Unit {} is not a valid time unit") \
M(IntlMinimumExceedsMaximum, "Minimum value {} is larger than maximum value {}") \
M(IntlNonNumericOr2DigitAfterNumericOr2Digit, \
"Styles other than 'fractional', numeric', or '2-digit' may not be used in smaller units after being used in larger units") \
M(IntlNumberIsNaNOrOutOfRange, "Value {} is NaN or is not between {} and {}") \
M(IntlOptionUndefined, "Option {} must be defined when option {} is {}") \
M(IntlNonNumericOr2DigitAfterNumericOr2Digit, "Styles other than 'fractional', numeric', or '2-digit' may not be used in smaller " \
"units after being used in larger units") \
M(InvalidAssignToConst, "Invalid assignment to const variable") \
M(InvalidCodePoint, "Invalid code point {}, must be an integer no less than 0 and no greater than 0x10FFFF") \
M(InvalidEnumerationValue, "Invalid value '{}' for enumeration type '{}'") \
M(InvalidFractionDigits, "Fraction Digits must be an integer no less than 0, and no greater than 100") \
M(InvalidHint, "Invalid hint: \"{}\"") \
M(InvalidIndex, "Index must be a positive integer") \
M(InvalidLeftHandAssignment, "Invalid left-hand side in assignment") \
M(InvalidLength, "Invalid {} length") \
M(InvalidNormalizationForm, "The normalization form must be one of NFC, NFD, NFKC, NFKD. Got '{}'") \
M(InvalidOrAmbiguousExportEntry, "Invalid or ambiguous export entry '{}'") \
M(InvalidPrecision, "Precision must be an integer no less than 1, and no greater than 100") \
M(InvalidRadix, "Radix must be an integer no less than 2, and no greater than 36") \
M(InvalidRestrictedFloatingPointParameter, "Expected {} to be a finite floating-point number") \
M(InvalidTimeValue, "Invalid time value") \
M(InvalidRadix, "Radix must be an integer no less than 2, and no greater than 36") \
M(IsNotA, "{} is not a {}") \
M(IsNotAn, "{} is not an {}") \
M(IsNotAEvaluatedFrom, "{} is not a {} (evaluated from '{}')") \
M(IsNotAn, "{} is not an {}") \
M(IsUndefined, "{} is undefined") \
M(IterableNextBadReturn, "iterator.next() returned a non-object value") \
M(IterableReturnBadReturn, "iterator.return() returned a non-object value") \
@ -98,6 +105,7 @@
M(NotASharedArrayBuffer, "The array buffer object must be a SharedArrayBuffer") \
M(NotAString, "{} is not a string") \
M(NotASymbol, "{} is not a symbol") \
M(NotEnoughMemoryToAllocate, "Not enough memory to allocate {} bytes") \
M(NotImplemented, "TODO({} is not implemented in LibJS)") \
M(NotIterable, "{} is not iterable") \
M(NotObjectCoercible, "{} cannot be converted to an object") \
@ -108,11 +116,11 @@
M(ObjectDefineOwnPropertyReturnedFalse, "Object's [[DefineOwnProperty]] method returned false") \
M(ObjectDeleteReturnedFalse, "Object's [[Delete]] method returned false") \
M(ObjectFreezeFailed, "Could not freeze object") \
M(ObjectSealFailed, "Could not seal object") \
M(ObjectSetReturnedFalse, "Object's [[Set]] method returned false") \
M(ObjectSetPrototypeOfReturnedFalse, "Object's [[SetPrototypeOf]] method returned false") \
M(ObjectPreventExtensionsReturnedFalse, "Object's [[PreventExtensions]] method returned false") \
M(ObjectPrototypeWrongType, "Prototype must be an object or null") \
M(ObjectSealFailed, "Could not seal object") \
M(ObjectSetPrototypeOfReturnedFalse, "Object's [[SetPrototypeOf]] method returned false") \
M(ObjectSetReturnedFalse, "Object's [[Set]] method returned false") \
M(OptionIsNotValidValue, "{} is not a valid value for option {}") \
M(OutOfMemory, "Out of memory") \
M(OverloadResolutionFailed, "Overload resolution failed") \
@ -122,86 +130,86 @@
M(PrivateFieldSetAccessorWithoutSetter, "Cannot set private field '{}' as accessor without setter") \
M(PrivateFieldSetMethod, "Cannot set private method '{}'") \
M(PromiseExecutorNotAFunction, "Promise executor must be a function") \
M(ProxyConstructBadReturnType, "Proxy handler's construct trap violates invariant: must return " \
"an object") \
M(ProxyConstructBadReturnType, "Proxy handler's construct trap violates invariant: must return an object") \
M(ProxyConstructorBadType, "Expected {} argument of Proxy constructor to be object, got {}") \
M(ProxyDefinePropExistingConfigurable, "Proxy handler's defineProperty trap violates " \
"invariant: a property cannot be defined as non-configurable if it already exists on the " \
"target object as a configurable property") \
M(ProxyDefinePropIncompatibleDescriptor, "Proxy handler's defineProperty trap violates " \
"invariant: the new descriptor is not compatible with the existing descriptor of the " \
M(ProxyDefinePropExistingConfigurable, \
"Proxy handler's defineProperty trap violates invariant: a property cannot be defined as non-configurable if it " \
"already exists on the target object as a configurable property") \
M(ProxyDefinePropIncompatibleDescriptor, \
"Proxy handler's defineProperty trap violates invariant: the new descriptor is not compatible with the existing " \
"descriptor of the property on the target") \
M(ProxyDefinePropNonConfigurableNonExisting, \
"Proxy handler's defineProperty trap violates invariant: a property cannot be defined as non-configurable if it " \
"does not already exist on the target object") \
M(ProxyDefinePropNonExtensible, \
"Proxy handler's defineProperty trap violates invariant: a property cannot be reported as being defined if the " \
"property does not exist on the target and the target is non-extensible") \
M(ProxyDefinePropNonWritable, \
"Proxy handler's defineProperty trap violates invariant: a non-configurable property cannot be non-writable, " \
"unless there exists a corresponding non-configurable, non-writable own property of the target object") \
M(ProxyDeleteNonConfigurable, \
"Proxy handler's deleteProperty trap violates invariant: cannot report a non-configurable own property of the " \
"target as deleted") \
M(ProxyDeleteNonExtensible, \
"Proxy handler's deleteProperty trap violates invariant: a property cannot be reported as deleted, if it exists " \
"as an own property of the target object and the target object is non-extensible. ") \
M(ProxyGetImmutableDataProperty, \
"Proxy handler's get trap violates invariant: the returned value must match the value on the target if the " \
"property exists on the target as a non-writable, non-configurable own data property") \
M(ProxyGetNonConfigurableAccessor, \
"Proxy handler's get trap violates invariant: the returned value must be undefined if the property exists on the " \
"target as a non-configurable accessor property with an undefined get attribute") \
M(ProxyGetOwnDescriptorInvalidDescriptor, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: invalid property descriptor for existing " \
"property on the target") \
M(ProxyDefinePropNonConfigurableNonExisting, "Proxy handler's defineProperty trap " \
"violates invariant: a property cannot be defined as non-configurable if it does not " \
"already exist on the target object") \
M(ProxyDefinePropNonWritable, "Proxy handler's defineProperty trap violates invariant: a non-configurable property cannot be " \
"non-writable, unless there exists a corresponding non-configurable, non-writable own property of " \
"the target object") \
M(ProxyDefinePropNonExtensible, "Proxy handler's defineProperty trap violates invariant: " \
"a property cannot be reported as being defined if the property does not exist on " \
"the target and the target is non-extensible") \
M(ProxyDeleteNonConfigurable, "Proxy handler's deleteProperty trap violates invariant: " \
"cannot report a non-configurable own property of the target as deleted") \
M(ProxyDeleteNonExtensible, "Proxy handler's deleteProperty trap violates invariant: " \
"a property cannot be reported as deleted, if it exists as an own property of the target object and " \
"the target object is non-extensible. ") \
M(ProxyGetImmutableDataProperty, "Proxy handler's get trap violates invariant: the " \
"returned value must match the value on the target if the property exists on the " \
"target as a non-writable, non-configurable own data property") \
M(ProxyGetNonConfigurableAccessor, "Proxy handler's get trap violates invariant: the " \
"returned value must be undefined if the property exists on the target as a " \
"non-configurable accessor property with an undefined get attribute") \
M(ProxyGetOwnDescriptorInvalidDescriptor, "Proxy handler's getOwnPropertyDescriptor trap " \
"violates invariant: invalid property descriptor for existing property on the target") \
M(ProxyGetOwnDescriptorInvalidNonConfig, "Proxy handler's getOwnPropertyDescriptor trap " \
"violates invariant: cannot report target's property as non-configurable if the " \
"property does not exist, or if it is configurable") \
M(ProxyGetOwnDescriptorNonConfigurable, "Proxy handler's getOwnPropertyDescriptor trap " \
"violates invariant: cannot return undefined for a property on the target which is " \
"a non-configurable property") \
M(ProxyGetOwnDescriptorNonConfigurableNonWritable, "Proxy handler's getOwnPropertyDescriptor trap " \
"violates invariant: cannot a property as both non-configurable and " \
"non-writable, unless it exists as a non-configurable, non-writable own " \
"property of the target object") \
M(ProxyGetOwnDescriptorReturn, "Proxy handler's getOwnPropertyDescriptor trap violates " \
"invariant: must return an object or undefined") \
M(ProxyGetOwnDescriptorUndefinedReturn, "Proxy handler's getOwnPropertyDescriptor trap " \
"violates invariant: cannot report a property as being undefined if it exists as an " \
"own property of the target and the target is non-extensible") \
M(ProxyGetPrototypeOfNonExtensible, "Proxy handler's getPrototypeOf trap violates " \
"invariant: cannot return a different prototype object for a non-extensible target") \
M(ProxyGetPrototypeOfReturn, "Proxy handler's getPrototypeOf trap violates invariant: " \
"must return an object or null") \
M(ProxyHasExistingNonConfigurable, "Proxy handler's has trap violates invariant: a " \
"property cannot be reported as non-existent if it exists on the target as a " \
"non-configurable property") \
M(ProxyHasExistingNonExtensible, "Proxy handler's has trap violates invariant: a property " \
"cannot be reported as non-existent if it exists on the target and the target is " \
"non-extensible") \
M(ProxyIsExtensibleReturn, "Proxy handler's isExtensible trap violates invariant: " \
"return value must match the target's extensibility") \
M(ProxyOwnPropertyKeysNotStringOrSymbol, "Proxy handler's ownKeys trap violates invariant: " \
"the type of each result list element is either String or Symbol") \
M(ProxyOwnPropertyKeysDuplicates, "Proxy handler's ownKeys trap violates invariant: " \
"the result list may not contain duplicate elements") \
M(ProxyOwnPropertyKeysSkippedNonconfigurableProperty, "Proxy handler's ownKeys trap violates invariant: " \
"cannot skip non-configurable property '{}'") \
M(ProxyOwnPropertyKeysNonExtensibleSkippedProperty, "Proxy handler's ownKeys trap violates invariant: " \
"cannot skip property '{}' of non-extensible object") \
M(ProxyOwnPropertyKeysNonExtensibleNewProperty, "Proxy handler's ownKeys trap violates invariant: " \
"cannot report new property '{}' of non-extensible object") \
M(ProxyPreventExtensionsReturn, "Proxy handler's preventExtensions trap violates " \
"invariant: cannot return true if the target object is extensible") \
M(ProxyGetOwnDescriptorInvalidNonConfig, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: cannot report target's property as " \
"non-configurable if the property does not exist, or if it is configurable") \
M(ProxyGetOwnDescriptorNonConfigurable, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: cannot return undefined for a property on the " \
"target which is a non-configurable property") \
M(ProxyGetOwnDescriptorNonConfigurableNonWritable, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: cannot a property as both non-configurable and " \
"non-writable, unless it exists as a non-configurable, non-writable own property of the target object") \
M(ProxyGetOwnDescriptorReturn, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: must return an object or undefined") \
M(ProxyGetOwnDescriptorUndefinedReturn, \
"Proxy handler's getOwnPropertyDescriptor trap violates invariant: cannot report a property as being undefined " \
"if it exists as an own property of the target and the target is non-extensible") \
M(ProxyGetPrototypeOfNonExtensible, \
"Proxy handler's getPrototypeOf trap violates invariant: cannot return a different prototype object for a " \
"non-extensible target") \
M(ProxyGetPrototypeOfReturn, "Proxy handler's getPrototypeOf trap violates invariant: must return an object or null") \
M(ProxyHasExistingNonConfigurable, \
"Proxy handler's has trap violates invariant: a property cannot be reported as non-existent if it exists on the " \
"target as a non-configurable property") \
M(ProxyHasExistingNonExtensible, \
"Proxy handler's has trap violates invariant: a property cannot be reported as non-existent if it exists on the " \
"target and the target is non-extensible") \
M(ProxyIsExtensibleReturn, \
"Proxy handler's isExtensible trap violates invariant: return value must match the target's extensibility") \
M(ProxyOwnPropertyKeysDuplicates, \
"Proxy handler's ownKeys trap violates invariant: the result list may not contain duplicate elements") \
M(ProxyOwnPropertyKeysNonExtensibleNewProperty, \
"Proxy handler's ownKeys trap violates invariant: cannot report new property '{}' of non-extensible object") \
M(ProxyOwnPropertyKeysNonExtensibleSkippedProperty, \
"Proxy handler's ownKeys trap violates invariant: cannot skip property '{}' of non-extensible object") \
M(ProxyOwnPropertyKeysNotStringOrSymbol, \
"Proxy handler's ownKeys trap violates invariant: the type of each result list element is either String or Symbol") \
M(ProxyOwnPropertyKeysSkippedNonconfigurableProperty, \
"Proxy handler's ownKeys trap violates invariant: cannot skip non-configurable property '{}'") \
M(ProxyPreventExtensionsReturn, \
"Proxy handler's preventExtensions trap violates invariant: cannot return true if the target object is extensible") \
M(ProxyRevoked, "An operation was performed on a revoked Proxy object") \
M(ProxySetImmutableDataProperty, "Proxy handler's set trap violates invariant: cannot " \
"return true for a property on the target which is a non-configurable, non-writable " \
"own data property") \
M(ProxySetNonConfigurableAccessor, "Proxy handler's set trap violates invariant: cannot " \
"return true for a property on the target which is a non-configurable own accessor " \
"property with an undefined set attribute") \
M(ProxySetPrototypeOfNonExtensible, "Proxy handler's setPrototypeOf trap violates " \
"invariant: the argument must match the prototype of the target if the " \
"target is non-extensible") \
M(ProxySetImmutableDataProperty, \
"Proxy handler's set trap violates invariant: cannot return true for a property on the target which is a " \
"non-configurable, non-writable own data property") \
M(ProxySetNonConfigurableAccessor, \
"Proxy handler's set trap violates invariant: cannot return true for a property on the target which is a " \
"non-configurable own accessor property with an undefined set attribute") \
M(ProxySetPrototypeOfNonExtensible, \
"Proxy handler's setPrototypeOf trap violates invariant: the argument must match the prototype of the target if " \
"the target is non-extensible") \
M(ReduceNoInitial, "Reduce of empty array with no initial value") \
M(ReferenceNullishDeleteProperty, "Cannot delete property '{}' of {}") \
M(ReferenceNullishSetProperty, "Cannot set property '{}' of {}") \
@ -209,11 +217,13 @@
M(ReferenceUnresolvable, "Unresolvable reference") \
M(RegExpCompileError, "RegExp compile error: {}") \
M(RegExpObjectBadFlag, "Invalid RegExp flag '{}'") \
M(RegExpObjectRepeatedFlag, "Repeated RegExp flag '{}'") \
M(RegExpObjectIncompatibleFlags, "RegExp flag '{}' is incompatible with flag '{}'") \
M(RestrictedFunctionPropertiesAccess, "Restricted function properties like 'callee', 'caller' and 'arguments' may " \
"not be accessed in strict mode") \
M(RegExpObjectRepeatedFlag, "Repeated RegExp flag '{}'") \
M(RestrictedFunctionPropertiesAccess, \
"Restricted function properties like 'callee', 'caller' and 'arguments' may not be accessed in strict mode") \
M(RestrictedGlobalProperty, "Cannot declare global property '{}'") \
M(SetLegacyRegExpStaticPropertyThisValueMismatch, \
"Legacy RegExp static property setter must be called with the RegExp constructor for the this value") \
M(ShadowRealmEvaluateAbruptCompletion, "The evaluated script did not complete normally") \
M(ShadowRealmWrappedValueNonFunctionObject, "Wrapped value must be primitive or a function object, got {}") \
M(SharedArrayBuffer, "The array buffer object cannot be a SharedArrayBuffer") \
@ -279,20 +289,10 @@
M(TypedArrayTypeIsNot, "Typed array {} element type is not {}") \
M(UnknownIdentifier, "'{}' is not defined") \
M(UnsupportedDeleteSuperProperty, "Can't delete a property on 'super'") \
M(URIMalformed, "URI malformed") /* LibWeb bindings */ \
M(WrappedFunctionCallThrowCompletion, "Call of wrapped target function did not complete normally") \
M(WrappedFunctionCopyNameAndLengthThrowCompletion, "Trying to copy target name and length did not complete normally") \
M(YieldFromIteratorMissingThrowMethod, "yield* protocol violation: iterator must have a throw method") \
M(URIMalformed, "URI malformed") /* LibWeb bindings */ \
M(BadArgCountOne, "{}() needs one argument") \
M(BadArgCountMany, "{}() needs {} arguments") \
M(NotEnoughMemoryToAllocate, "Not enough memory to allocate {} bytes") \
M(InvalidEnumerationValue, "Invalid value '{}' for enumeration type '{}'") \
M(InvalidNormalizationForm, "The normalization form must be one of NFC, NFD, NFKC, NFKD. Got '{}'") \
M(SetLegacyRegExpStaticPropertyThisValueMismatch, "Legacy RegExp static property setter " \
"must be called with the RegExp constructor for the this value") \
M(GetLegacyRegExpStaticPropertyThisValueMismatch, "Legacy RegExp static property getter " \
"must be called with the RegExp constructor for the this value") \
M(GetLegacyRegExpStaticPropertyValueEmpty, "Legacy RegExp static property getter value is empty")
M(YieldFromIteratorMissingThrowMethod, "yield* protocol violation: iterator must have a throw method")
namespace JS {