summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h
AgeCommit message (Collapse)Author
2021-06-28LibJS: Add and use the %ThrowTypeError% intrinsicIdan Horowitz
2021-06-27LibJS: Rename Function => FunctionObjectAndreas Kling
2021-06-19LibJS: Add the Number.prototype.toFixed methodIdan Horowitz
2021-06-17LibJS: Add the Object.prototype.__lookup{Getter, Setter}__ methodsIdan Horowitz
These are a part of the Annex B extension of the specification.
2021-06-17LibJS: Add the Object.prototype.__define{Getter, Setter}__ methodsIdan Horowitz
These are a part of the Annex B extension of the specification.
2021-06-17LibJS: Add the Object.prototype.__proto__ native accessor propertyIdan Horowitz
This is part of the Annex B extension of the specification.
2021-06-16LibJS: Add the String.prototype.codePointAt() methodIdan Horowitz
This commit also brings charAt & charCodeAt closer to the specification
2021-06-16LibJS: Add the String.fromCodePoint() methodIdan Horowitz
2021-06-15LibJS: Add all of the FinalizationRegistry.prototype methodsIdan Horowitz
More specifically: cleanupSome, register & unregister. FinalizationRegistery.prototype.cleanupSome is actually still a stage 2 proposal, but since test262 test cases already exist for it, i decided to go for it :)
2021-06-15LibJS: Add the Object.fromEntries methodIdan Horowitz
2021-06-14LibJS: Implement Array.prototype.copyWithin genericallydavidot
2021-06-14LibJS: Implement Array.prototype.flatMapdavidot
Also made recursive_array_flat more compliant with the spec So renamed it to flatten_into_array
2021-06-14LibJS: Add all of the DataView.prototype.set* methodsIdan Horowitz
2021-06-14LibJS: Add all of the DataView.prototype.get* methodsIdan Horowitz
2021-06-13LibJS: Avoid lots of string-to-int during global object constructionAndreas Kling
We were doing a *lot* of string-to-int conversion while creating a new global object. This happened because Object::put() would try to convert the property name (string) to an integer to see if it refers to an indexed property. Sidestep this issue by using PropertyName for the CommonPropertyNames struct on VM (vm.names.foo), and giving PropertyName a flag that tells us whether it's a string that *may be* a number. All CommonPropertyNames are set up so they are known to not be numbers.
2021-06-12LibJS: Add the Object.getOwnPropertySymbols methodIdan Horowitz
2021-06-12LibJS: Add the WeakRef built-in objectIdan Horowitz
2021-06-12LibJS: Implement Object.assign()Linus Groh
2021-06-11LibJS: Implement the Error Cause proposalLinus Groh
Currently stage 3. https://github.com/tc39/proposal-error-cause
2021-06-11LibJS: Implement AggregateErrorLinus Groh
2021-06-11LibJS: Implement generator functions (only in bytecode mode)Ali Mohammad Pur
2021-06-09LibJS: Add most of the Set.prototype methodsIdan Horowitz
Specifically all aside from "values" and "entries" which require an implementation of the SetIterator object.
2021-06-09LibJS: Add the Set built-in objectIdan Horowitz
2021-06-08LibJS: Implement Proxy.revocable()Linus Groh
2021-06-06LibJS: Add Date.setUTC{Date, Month, Hours, ...}() aliasesIdan Horowitz
These are a bit hacky, since they are supposed to be separate methods, but since serenity only supports UTC currently, they are equivalent.
2021-06-06LibJS: Add Date.prototype.setTime()Idan Horowitz
2021-06-06LibJS: Add Date.prototype.setMonth()Idan Horowitz
2021-06-06LibJS: Add Date.prototype.setDate()Idan Horowitz
2021-06-06LibJS: Stub out Date.prototype.getTimezoneOffset()Idan Horowitz
We only support UTC currently, so this always returns 0 as long as the date is not invalid.
2021-06-05LibJS: Add the global escape() & unescape() methodsIdan Horowitz
2021-06-05LibJS: Add the Number.{MAX, MIN}_VALUE constantsIdan Horowitz
2021-06-02LibJS: Add the String.prototype.trim{Left, Right} aliasesIdan Horowitz
These are the same as trim{Start, End} respectively.
2021-05-30LibJS: Add String.prototype.anchor & friendsIdan Horowitz
Adds an implementation of the following StringPrototype methods: anchor, big, blink, bold, fixed, fontcolor, fontsize, italics, link, small, strike, sub, sup.
2021-05-29LibJS: Add Date.prototype.{get, set}Year()Idan Horowitz
2021-05-21LibJS: Expose TypedArray.prototype.byteOffsetLuke
2021-05-21LibJS: Expose TypedArray.prototype.bufferLuke
2021-05-18LibJS: Implement Object.hasOwn() :^)Andreas Kling
This is currently a TC39 Stage 2 proposal, but let's go for it! https://github.com/tc39/proposal-accessible-object-hasownproperty I wrote the C++, @linusg found bugs and wrote the test.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-18LibJS: Implement console.assert()Linus Groh
2021-04-14LibJS: Implement the encode/decodeURI(Component) family of functionsIdan Horowitz
These are generally useful and in particular needed for twitter.com
2021-04-10LibJS: Implement Object.create()Linus Groh
2021-04-10LibJS: Implement Object.defineProperties()Linus Groh
2021-04-07LibJS: Implement Object.isFrozen() and Object.isSealed()Linus Groh
2021-04-07LibJS: Implement Object.freeze() and Object.seal()Linus Groh
2021-04-02LibJS: Add initial support for PromisesLinus Groh
Almost a year after first working on this, it's finally done: an implementation of Promises for LibJS! :^) The core functionality is working and closely following the spec [1]. I mostly took the pseudo code and transformed it into C++ - if you read and understand it, you will know how the spec implements Promises; and if you read the spec first, the code will look very familiar. Implemented functions are: - Promise() constructor - Promise.prototype.then() - Promise.prototype.catch() - Promise.prototype.finally() - Promise.resolve() - Promise.reject() For the tests I added a new function to test-js's global object, runQueuedPromiseJobs(), which calls vm.run_queued_promise_jobs(). By design, queued jobs normally only run after the script was fully executed, making it improssible to test handlers in individual test() calls by default [2]. Subsequent commits include integrations into LibWeb and js(1) - pretty-printing, running queued promise jobs when necessary. This has an unusual amount of dbgln() statements, all hidden behind the PROMISE_DEBUG flag - I'm leaving them in for now as they've been very useful while debugging this, things can get quite complex with so many asynchronously executed functions. I've not extensively explored use of these APIs for promise-based functionality in LibWeb (fetch(), Notification.requestPermission() etc.), but we'll get there in due time. [1]: https://tc39.es/ecma262/#sec-promise-objects [2]: https://tc39.es/ecma262/#sec-jobs-and-job-queues
2021-03-22LibJS Date: Added toUTCString()Petróczi Zoltán
toGMTString() is deprecated but is kept for compatibility's sake, but because HTTP Dates are always expressed in GMT, it should be safe to call toUTCString() in toGMTString().
2021-03-19LibJS: Add Date methods: setHours, setMinutes, setSeconds, setMillisecondstuqqu
2021-03-15LibJS: Add arguments.callee to our hack arguments objectAndreas Kling
arguments.callee refers to the currently executing function.
2021-03-15LibJS: Add Date.prototype.toGMTString()Andreas Kling
2021-03-15LibJS: Partial support for Date.prototype.setFullYear()Andreas Kling