- 20 May, 2022 1 commit
-
-
Frank Tang authored
Spec Text: https://tc39.es/proposal-temporal/#sup-temporal.plaindate.prototype.tostring https://tc39.es/proposal-temporal/#sup-temporal.plaindate.prototype.tolocalestring https://tc39.es/proposal-temporal/#sup-temporal.plainmonthday.prototype.tostring https://tc39.es/proposal-temporal/#sup-temporal.plainmonthday.prototype.tolocalestring https://tc39.es/proposal-temporal/#sup-temporal.plainyearmonth.prototype.tostring https://tc39.es/proposal-temporal/#sup-temporal.plainyearmonth.prototype.tolocalestring Implement toString/toLocaleString as non-intl version. Because toString took options bag in Temporal, we cannot use the same way how we handle Date.prototype.toLocaleString() for non-intl build by just forwarding to it's toString implementation. Change built-ins-defintions.h to always has built-ins for *.toLocaleString , not just in intl build. Change src/init/bootstrapper.cc away of the toLocaleString forward to toString approach. Implement the non-intl version of ToLocaleString in js-temporal-objects.cc for Temporal.Plain(Date|YearMonth|MonthDay) Bug: v8:11544 Change-Id: I202bcf28ef05ed03c337475300cfdfd18b52ffb3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3656137Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#80675}
-
- 03 May, 2022 1 commit
-
-
Rob Paveza authored
This change adds support for computing SHA-256 hashes in the stack output of errors by adding a function to the prototype of the `CallSite` object, passed to `Error.prepareStackTrace`. Additionally, it updates the `hash` property from `Debugger.scriptParsed` and `Debugger.scriptFailedToParse` to be SHA-256 instead of the proprietary hash it is today. It is intended to be an advancement in indexing source maps to support improved tooling, especially for post-hoc or in-production diagnostics scenarios. The explainer can be found here: https://docs.google.com/document/d/13hNeeLC2Ve_FVieNndZUUUP15x2O4ltvjnGWwOsMlrU/edit?usp=sharing Change-Id: Ifbbed4b22c8256e74e6d79974d2dd1e444143eda Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229957Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Auto-Submit: Robert Paveza <Rob.Paveza@microsoft.com> Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#80320}
-
- 28 Apr, 2022 1 commit
-
-
Simon Zünd authored
Doc: https://bit.ly/revive-restart-frame Context: https://crrev.com/c/3582395 (jumbo CL with the whole feature) This CL adds a new builtin called "RestartFrameTrampoline". This trampoline is relatively simple: It leaves the current frame and re-invokes the function. This essentially restarts the function and is one of the key components required to bring back the "Restart frame" DevTools debugging feature. The builtin is closely related to the "FrameDropperTrampoline" removed in the CL https://crrev.com/c/2854750. The key difference is that the "FrameDropperTrampoline" dropped to an "arbitrary" frame pointer before restarting the function (arbitrary in the sense that it was provided as an argument). This caused issues as the feature was implemented in a way that the frame pointer wasn't necessarily valid anymore. In comparison, the "RestartFrameTrampoline" relies on the V8 unwinder to drop it in the correct frame first and is then invoked via either the CEntry stub or the deoptimizer (see design doc for details). Bug: chromium:1303521 Change-Id: I7bd46620808f8694c2c776b8bcd267e525d5b581 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585944 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#80254}
-
- 26 Apr, 2022 1 commit
-
-
Victor Gomes authored
- For simplicity we call a builtin when allocating a number. - Elision of boxing/unboxing nodes will be done in a followup CL. Bug: v8:7700 Change-Id: Iec4422d84c6597d3369ab512a1662adb0f077c98 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3602514Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#80178}
-
- 22 Apr, 2022 3 commits
-
-
Frank Tang authored
Spec Text: https://tc39.es/proposal-temporal/#sec-temporal.calendar.prototype.fields Bug: v8:11544 Change-Id: I8df987ddbbf08372da637d7c4620c428fce97cae Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534619Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#80127}
-
legendecas authored
As per https://tc39.es/ecma262/#sec-hostimportmoduledynamically defined, referencingScriptOrModule in HostImportModuleDynamically can be a Script Record, a Module Record, or null. So to https://tc39.es/proposal-shadowrealm/#sec-shadowrealmimportvalue, the HostImportModuleDynamicallyCallback is been invoked with a `null` resource_name. This may not be considered a breaking change as the parameter resource_name is defined as Local<Value>. Updates d8's DoHostImportModuleDynamically to handle null resource_name, and resolve the dynamically imported specifier relative to the executing script's origin. In this way, we have to set ModuleEmbedderData.origin even if the JavaScript source to be evaluated is Script. Also, a ModuleEmbedderData is created for each ShadowRealm to separate their module maps from the initiator context's. Bug: v8:11989 Change-Id: If70fb140657da4f2dd92eedfcc4515211602aa46 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522883Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#80118}
-
jameslahm authored
This CL extends GetIterator to check whether the result of calling @@iterator is JSReceiver and throw SymbolIteratorInvalid if it's not JSReceiver. GetIterator bytecode involves 3 steps now: - method = GetMethod(obj, @@iterator) - iterator = Call(method, obj) - if(!IsJSReceiver(iterator)) throw SymbolIteratorInvalid [Added] New Builtin: CallIteratorWithFeedbackLazyDeoptContinuation, which is used when lazy deopt is triggered by call @@iterator. Related spec: https://tc39.es/ecma262/#sec-getiterator. Related doc: https://docs.google.com/document/d/1s67HC2f-4zxA_s1Bmm7dfwMFv_KDUfMiWIKkNSeQNKw/edit#heading=h.kdzv8mq4g4ks. Bug: v8:9489 Change-Id: I17952c0f3e24e1e600ee1348809fb188c2c70f8e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3563447Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: 王澳 <wangao.james@bytedance.com> Cr-Commit-Position: refs/heads/main@{#80112}
-
- 20 Apr, 2022 1 commit
-
-
Marja Hölttä authored
This enables downloading web snapshots with XMLHttpRequest and deserializing them. Bug: v8:11525 Change-Id: I498f1e99795d474a1715fce9aa1d8c1a34651c42 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585961Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/main@{#80064}
-
- 19 Apr, 2022 1 commit
-
-
Jakob Gruber authored
Having it around is an invitation to use it in new places. This CL removes the generic Dummy descriptor and replaces it by other existing descriptors if possible, and defines specialized dummies otherwise. In the future, every builtin should have a real descriptor. Especially new ASM builtins should define descriptors and use them in their implementation (use Descriptor::FooRegister() instead of documenting the calling convention as comments). Change-Id: Ib577aa03b5e5a522460d1084cc9605c55cd29d6c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585945 Auto-Submit: Jakob Linke <jgruber@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/main@{#80030}
-
- 14 Apr, 2022 1 commit
-
-
Jakob Gruber authored
This is a reland of commit a4216b7b Original change's description: > [osr] Extract extended OSR checks to BaselineOnStackReplacement builtin > > .. to reduce Sparkplug code size. > > Bug: v8:12161 > Change-Id: I4029a75dfa37f716c285ce27153c077a0a82a341 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3576119 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Jakob Linke <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79962} Bug: v8:12161 Change-Id: I69afd0832d7ca447b5481651ef47ebaa8d023ded Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3585943 Auto-Submit: Jakob Linke <jgruber@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#79980}
-
- 13 Apr, 2022 2 commits
-
-
Tobias Tebbi authored
This reverts commit a4216b7b. Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/43174/overview Original change's description: > [osr] Extract extended OSR checks to BaselineOnStackReplacement builtin > > .. to reduce Sparkplug code size. > > Bug: v8:12161 > Change-Id: I4029a75dfa37f716c285ce27153c077a0a82a341 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3576119 > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Commit-Queue: Jakob Linke <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79962} Bug: v8:12161 Change-Id: I382609d0b8cd951a3df5c9c834fe7071eb90faa5 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3584121 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Owners-Override: Tobias Tebbi <tebbi@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#79966}
-
Jakob Gruber authored
.. to reduce Sparkplug code size. Bug: v8:12161 Change-Id: I4029a75dfa37f716c285ce27153c077a0a82a341 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3576119Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#79962}
-
- 04 Apr, 2022 1 commit
-
-
Jakob Gruber authored
.. since they are the same as eager deopts (% an unused counter). Fixed: v8:12765 Change-Id: I2be6210e476ead4ac6629a49259f28321e965867 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565717Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#79729}
-
- 31 Mar, 2022 1 commit
-
-
Joyee Cheung authored
As a follow-up of https://chromium-review.googlesource.com/c/v8/v8/+/3481475, this renames a few more operations related to property stores to keep them consistent and adds comments to explain about what they do. Summary of the renamed identifiers: - SetPropertyInLiteral -> CreateDataProperty: this implements [[CreateDataProperty]] in the spec which does [[DefineOwnProperty]] instead of [[Set]], so rename for clarity. - IsStoreIC(), IsStoreICKind() -> IsSetNamedIC(), IsSetNamedICKind(): these only check whether the feedback kind is kSetNamedSloppy or kSetNamedStrict, so the scope can be narrowed. - StoreMode::kOrdinary -> StoreMode::kSet: this implements [[Set]] in the spec and is used by both KeyedStoreIC and StoreIC to set the properties when there is no feedback. - StoreMode::kInLiteral -> StoreMode::kDefineKeyedOwnInLiteral: this implements [[CreateDataProperty]] while expecting the receiver to be a JSObject created by us (the `InLiteral` part). Prepend `DefineKeyedOwn` to it so that it's more aligned with other StoreModes - it should be possible to just merge this into the more generic StoreMode::kDefineKeyedOwn later. - KeyedStoreGenericAssembler::SetProperty -> KeyedStoreGenericAssembler::StoreProperty: these helpers are used by both define and set operations, distinguished with the StoreMode, so rename it to the more generic StoreProperty. Bug: v8:12548 Change-Id: Iccef673c1dc707bbdbf010f02f7db1e9ec32b3e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3557690Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79694}
-
- 25 Mar, 2022 1 commit
-
-
legendecas authored
Implement WrappedFunction properties name/length. Bug: v8:11989 Change-Id: I050af5814537552ef6c2077802ffc726f2e08fa3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3507201Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#79628}
-
- 24 Mar, 2022 1 commit
-
-
jameslahm authored
In LowerStringCodePointAt, rather than call StringCodePointAt builtin, we could inline it using StringCharCodeAt. Bug: v8:11743 Change-Id: I924f4180ffcfd583cfcbba57b2e0cf114adef068 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3517935Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#79598}
-
- 21 Mar, 2022 1 commit
-
-
Jakob Gruber authored
This CL removes: - Dynamic map checks aka minimorphic property loads (TF support, builtins). - "Bailout" deopts (= drop to the interpreter once, but don't throw out optimized code). - "EagerWithResume" deopts (= part of dynamic map check functionality, we call a builtin for the deopt check and deopt or resume based on the result). Fixed: v8:12552 Change-Id: I492cf1667e0f54586690b2f72a65ea804224b840 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3401585 Auto-Submit: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#79544}
-
- 17 Mar, 2022 1 commit
-
-
Shu-yu Guo authored
Bug: v8:12547 Change-Id: Ie27831b793f214368a003adac24b7c92f1a5fc11 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3518426Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#79504}
-
- 16 Mar, 2022 1 commit
-
-
Frank Tang authored
Implement the Intl.PluralRules.prototype.selectRange (start, end) of the spec See https://tc39.es/proposal-intl-numberformat-v3/out/pluralrules/diff.html https://chromestatus.com/guide/edit/5707621009981440 Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit Bug: v8:10776 Change-Id: Ie9c56df7ce68199492281fdf2483c3d6f822cc9e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3504421Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#79495}
-
- 10 Mar, 2022 1 commit
-
-
Shu-yu Guo authored
Atomics.load and Atomics.store now accept string field names as the 2nd argument when the 1st argument is a shared struct. Currently these are implemented in C++ and not yet in CSA. Bug: v8:12547 Change-Id: Ideeafc13fb6a925540edf3dc17428c8e50bcee79 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3510837 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#79431}
-
- 08 Mar, 2022 2 commits
-
-
Joyee Cheung authored
For background and reasoning, see https://docs.google.com/document/d/1jvSEvXFHRkxg4JX-j6ho3nRqAF8vZI2Ai7RI8AY54gM/edit This is the first step towards pulling the DefineNamedOwn operation out of StoreIC. Summary of the renamed identifiers: Bytecodes: - StaNamedProperty -> SetNamedProperty: calls StoreIC and emitted for normal named property sets like obj.x = 1. - StaNamedOwnProperty -> DefineNamedOwnProperty: calls DefineNamedOwnIC (previously StoreOwnIC), and emitted for initialization of named properties in object literals and named public class fields. - StaKeyedProperty -> SetKeyedProperty: calls KeyedStoreIC and emitted for keyed property sets like obj[x] = 1. - StaKeyedPropertyAsDefine -> DefineKeyedOwnProperty: calls DefineKeyedOwnIC (previously KeyedDefineOwnIC) and emitted for initialization of private class fields and computed public class fields. - StaDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral: calls DefineKeyedOwnPropertyInLiteral runtime function (previously DefineDataPropertyInLiteral) and emitted for initialization of keyed properties in object literals and static class initializers. (note that previously the StoreDataPropertyInLiteral runtime function name was taken by object spreads and array literal creation instead) - LdaKeyedProperty -> GetKeyedProperty, LdaNamedProperty -> GetNamedProperty, LdaNamedPropertyFromSuper -> GetNamedPropertyFromSuper: we drop the Sta prefix for the property store operations since the accumulator use is implicit and to make the wording more natural, for symmetry the Lda prefix for the property load operations is also dropped. opcodes: - (JS)StoreNamed -> (JS)SetNamedProperty: implements set semantics for named properties, compiled from SetNamedProperty (previously StaNamedProperty) and lowers to StoreIC or Runtime::kSetNamedProperty - (JS)StoreNamedOwn -> (JS)DefineNamedOwnProperty: implements define semantics for initializing named own properties in object literal and public class fields, compiled from DefineNamedOwnProperty (previously StaNamedOwnProperty) and lowers to DefineNamedOwnIC (previously StoreOwnIC) - (JS)StoreProperty -> (JS)SetKeyedProperty: implements set semantics for keyed properties, only compiled from SetKeyedProperty(previously StaKeyedProperty) and lowers to KeyedStoreIC - (JS)DefineProperty -> (JS)DefineKeyedOwnProperty: implements define semantics for initialization of private class fields and computed public class fields, compiled from DefineKeyedOwnProperty (previously StaKeyedPropertyAsDefine) and calls DefineKeyedOwnIC (previously KeyedDefineOwnIC). - (JS)StoreDataPropertyInLiteral -> (JS)DefineKeyedOwnPropertyInLiteral: implements define semantics for initialization of keyed properties in object literals and static class initializers, compiled from DefineKeyedOwnPropertyInLiteral (previously StaDataPropertyInLiteral) and calls the DefineKeyedOwnPropertyInLiteral runtime function (previously DefineDataPropertyInLiteral). Runtime: - DefineDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral: following the bytecode/opcodes change, this is used by DefineKeyedOwnPropertyInLiteral (previously StaDataPropertyInLiteral) for object and class literal initialization. - StoreDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral_Simple: it's just a simplified version of DefineDataPropertyInLiteral that does not update feedback or perform function name configuration. This is used by object spread and array literal creation. Since we are renaming DefineDataPropertyInLiteral to DefineKeyedOwnPropertyInLiteral, rename this simplified version with a `_Simple` suffix. We can consider merging it into DefineKeyedOwnPropertyInLiteral in the future. See https://docs.google.com/document/d/1jvSEvXFHRkxg4JX-j6ho3nRqAF8vZI2Ai7RI8AY54gM/edit?disco=AAAAQQIz6mU - Other changes following the bytecode/IR changes IC: - StoreOwn -> DefineNamedOwn: used for initialization of named properties in object literals and named public class fields. - StoreOwnIC -> DefineNamedOwnIC - StoreMode::kStoreOwn -> StoreMode::kDefineNamedOwn - StoreICMode::kStoreOwn -> StoreICMode::kDefineNamedOwn - IsStoreOwn() -> IsDefineNamedOwn() - DefineOwn -> DefineKeyedOwn: IsDefineOwnIC() was already just IsDefineKeyedOwnIC(), and IsAnyDefineOwn() includes both named and keyed defines so we don't need an extra generic predicate. - StoreMode::kDefineOwn -> StoreMode::kDefineKeyedOwn - StoreICMode::kDefineOwn -> StoreICMode::kDefineKeyedOwn - IsDefineOwn() -> IsDefineKeyedOwn() - IsDefineOwnIC() -> IsDefineKeyedOwnIC() - Removing IsKeyedDefineOwnIC() as its now a duplicate of IsDefineKeyedOwnIC() - KeyedDefineOwnIC -> DefineKeyedOwnIC, KeyedDefineOwnGenericGenerator() -> DefineKeyedOwnGenericGenerator: make the ordering of terms more consistent - IsAnyStoreOwn() -> IsAnyDefineOwn(): this includes the renamed and DefineNamedOwn and DefineKeyedOwn. Also is_any_store_own() is removed since it's just a duplicate of this. - IsKeyedStoreOwn() -> IsDefineNamedOwn(): it's unclear where the "keyed" part came from, but it's only used when DefineNamedOwnIC (previously StoreOwnIC) reuses KeyedStoreIC, so rename it accordingly Interpreter & compiler: - BytecodeArrayBuilder: following bytecode changes - StoreNamedProperty -> SetNamedProperty - StoreNamedOwnProperty -> DefineNamedOwnProperty - StoreKeyedProperty -> SetKeyedProperty - DefineKeyedProperty -> DefineKeyedOwnProperty - StoreDataPropertyInLiteral -> DefineKeyedOwnPropertyInLiteral - FeedbackSlotKind: - kDefineOwnKeyed -> kDefineKeyedOwn: make the ordering of terms more consistent - kStoreOwnNamed -> kDefineNamedOwn: following the IC change - kStoreNamed{Sloppy|Strict} -> kSetNamed{Sloppy|Strict}: only used in StoreIC for set semantics - kStoreKeyed{Sloppy|Strict} -> kSetKeyed{Sloppy|Strict}: only used in KeyedStoreIC for set semantics - kStoreDataPropertyInLiteral -> kDefineKeyedOwnPropertyInLiteral: following the IC change - BytecodeGraphBuilder - StoreMode::kNormal, kOwn -> NamedStoreMode::kSet, kDefineOwn: this is only used by BytecodeGraphBuilder::BuildNamedStore() to tell the difference between SetNamedProperty and DefineNamedOwnProperty operations. Not changed: - StoreIC and KeyedStoreIC currently contain mixed logic for both Set and Define operations, and the paths are controlled by feedback. The plan is to refactor the hierarchy like this: ``` - StoreIC - DefineNamedOwnIC - SetNamedIC (there could also be a NamedStoreIC if that's helpful) - KeyedStoreIC - SetKeyedIC - DefineKeyedOwnIC - DefineKeyedOwnICLiteral (could be merged into DefineKeyedOwnIC) - StoreInArrayLiteralIC - ... ``` StoreIC and KeyedStoreIC would then contain helpers shared by their subclasses, therefore it still makes sense to keep the word "Store" in their names since they would be generic base classes for both set and define operations. - The Lda and Sta prefixes of bytecodes not involving object properties (e.g. Ldar, Star, LdaZero) are kept, since this patch focuses on property operations, and distinction between Set and Define might be less relevant or nonexistent for bytecodes not involving object properties. We could consider rename some of them in future patches if that's helpful though. Bug: v8:12548 Change-Id: Ia36997b02f59a87da3247f20e0560a7eb13077f3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3481475Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79409}
-
Frank Tang authored
Bug: v8:11544 Change-Id: I781119561db5ec05b12b9bca31c98403355e35ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3378882Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#79396}
-
- 04 Mar, 2022 1 commit
-
-
Frank Tang authored
Add NumberFormat.prototype.formatRange(ToParts)? https://github.com/tc39/proposal-intl-numberformat-v3 https://chromestatus.com/guide/edit/5707621009981440 Design Doc: https://docs.google.com/document/d/19jAogPBb6W4Samt8NWGZKu47iv0_KoQhBvLgQH3xvr8/edit Bug: v8:10776 Change-Id: I9bb163c0c15ccac9d3a2d5e55ad38aa5c06bbaa6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429464Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#79373}
-
- 03 Mar, 2022 1 commit
-
-
jameslahm authored
- add CopyDataPropertiesWithExcludedProperties intrinsic - add CopyDataPropertiesWithExcludedProperties_Baseline intrinsic Bug: v8:11614 Change-Id: Ie6a3db4c9edda40ecf84b8d1107e70fd7ff0d5fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3470349Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#79342}
-
- 25 Feb, 2022 1 commit
-
-
legendecas authored
Bootstrap ShadowRealm.prototype.evaluate, WrappedFunction and WrappedFunction.[[Call]]. Bug: v8:11989 Change-Id: Id380acb71cd5719e783c8f5d741cc4ccf2a93e78 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3432729Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#79293}
-
- 23 Feb, 2022 1 commit
-
-
Shu-yu Guo authored
This is a reland of 1025bf26 Changes since revert: - TSAN issue fixed by https://crrev.com/c/3475084 - Skip the shared-struct-workers test until shared GC deadlock is fixed, being tracked in v8:12645 Original change's description: > [shared-struct] Prototype JS shared structs > > Unlike the Stage 1 proposal, for simplicity the prototype does not add > any new syntax, instead opting for exposing a SharedStructType > constructor which takes an array of field names. This type constructor > returns constructors for shared structs. > > Shared structs can be shared across Isolates, are fixed layout, have no > prototype, have no .constructor, and can only store primitives and > other shared structs. > > The initial prototype does not have TurboFan support. > > Bug: v8:12547 > Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643 > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Shu-yu Guo <syg@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79156} Bug: v8:12547 Change-Id: Ic1f5cf9fa9791ae2d5d5dc7c110614ca10b5d98e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3475078Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#79215}
-
- 18 Feb, 2022 1 commit
-
-
Michael Achenbach authored
This reverts commit 1025bf26. Reason for revert: https://crbug.com/v8/12645 Original change's description: > [shared-struct] Prototype JS shared structs > > Unlike the Stage 1 proposal, for simplicity the prototype does not add > any new syntax, instead opting for exposing a SharedStructType > constructor which takes an array of field names. This type constructor > returns constructors for shared structs. > > Shared structs can be shared across Isolates, are fixed layout, have no > prototype, have no .constructor, and can only store primitives and > other shared structs. > > The initial prototype does not have TurboFan support. > > Bug: v8:12547 > Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643 > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Marja Hölttä <marja@chromium.org> > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Shu-yu Guo <syg@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79156} Bug: v8:12547 Change-Id: I44f2b8bb7487b4d39ba1282585e0b2282501230f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474676 Auto-Submit: Michael Achenbach <machenbach@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/main@{#79170}
-
- 17 Feb, 2022 1 commit
-
-
Shu-yu Guo authored
Unlike the Stage 1 proposal, for simplicity the prototype does not add any new syntax, instead opting for exposing a SharedStructType constructor which takes an array of field names. This type constructor returns constructors for shared structs. Shared structs can be shared across Isolates, are fixed layout, have no prototype, have no .constructor, and can only store primitives and other shared structs. The initial prototype does not have TurboFan support. Bug: v8:12547 Change-Id: I23bdd819940b42139692bcdb53d372099b0d4426 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3390643Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#79156}
-
- 31 Jan, 2022 1 commit
-
-
Benedikt Meurer authored
Previously we'd predict exceptions thrown in [[Reject]] handlers as always caught (by PromiseRejectReactionJob), but that's not what is actually specified in ECMAScript. The PromiseRejectReactionJob will turn any exception thrown into a promise rejection just like we do in the case of PromiseFulfillReactionJob, and so the catch prediction should match that behavior. Fixed: chromium:1290861 Change-Id: Id992708b009666da7c6bf1b6e3cf30752ca0a227 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3423775 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/main@{#78864}
-
- 28 Jan, 2022 1 commit
-
-
Hao Xu authored
The Descriptor of Builtin defines the allocated machine registers for its parameters. However, when an argument is in InterpreterAccumulatorRegister, the Descriptor might require another machine register holding the the value of this argument and result in a redundant register-to-register move. This CL avoids this move by allocating a same register for such argument. It also changes the assigned registers for Typeof, KeyedLoadIC and KeyedHasIC to align the use in Baseline Builtins. Change-Id: I14004d8e44c4c45f2a1bea2c09b06160f615709b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3416544Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#78833}
-
- 27 Jan, 2022 1 commit
-
-
legendecas authored
The Array Grouping proposal [1] reached Stage 3 in December 2021 TC39. [1] https://github.com/tc39/proposal-array-grouping/ Bug: v8:12499 Change-Id: I05b4838d915ab1b0cf8126aa30a3e48f47b9ee59 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3366630Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#78794}
-
- 26 Jan, 2022 1 commit
-
-
Thibaud Michaud authored
Create and return the chained promise, which resumes the suspended wasm continuation once the JS promise resolves: - Add stub for the WasmResume builtin, which will resume the given suspender. - Add the JS function wrapper for the builtin. - On suspension, return promise.then(onFulfilled) to the prompt. R=ahaas@chromium.org CC=fgm@chromium.org Bug: v8:12191 Change-Id: I2d6136b2bd610daa4be1880f347b7bdf897e75ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3404776Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#78787}
-
- 25 Jan, 2022 1 commit
-
-
legendecas authored
1. Expose all the functions to empty builtins. 2. Wire up the basic structure of ShadowRealm and internal slots. Bug: v8:11989 Change-Id: If7545fe18a74b2bd4b70a1a25776e41f03aaff89 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3195532Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#78757}
-
- 14 Jan, 2022 1 commit
-
-
Thibaud Michaud authored
- Add suspend asm builtin stub, and call it from the suspending wasm-to-js wrapper - Rename frame type to match both builtins (prompt and suspend) - Add suspend bool to the import cache key R=ahaas@chromium.org CC=fgm@chromium.org Bug: v8:12191 Change-Id: Ie5a8ca7cbe4bcb91697e05b6470e3d632d608993 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3345004Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#78628}
-
- 13 Jan, 2022 1 commit
-
-
Benedikt Meurer authored
This unifies and simplifies the way we instrument async functions for the purpose of async stack traces and async stepping. It does so while retaining the observable behavior on the inspector level (for now). Previously we'd mark the implicit promise of the async function object with the async task ID, and whenever we awaited, we'd copy the async task ID to the throwaway promise that is created by the `await`. This however made things unnecessarily interesting in the following regards: 1. We'd see `DebugDidHandle` and `DebugWillHandle` events after the `AsyncFunctionFinished` events, coming from the throwaway promises, while the implicit promise is "done". This is especially confusing with rejection propagation and requires very complex stepping logic for async functions (after this CL it'll be possible to unify and simplify the stepping logic). 2. We have to thread through the "can suspend" information from the Parser all the way through AsyncFunctionReject/AsyncFunctionResolve to the async function instrumentation to decide whether to cancel the pending task when the async function finishes. This CL changes the instrumentation to only happen (non recurringly) for the throwaway promises allocated upon `await`. This solves both problems mentioned above, and works because upon the first `await` the stack captured for the throwaway promise will include the synchronous part as expected, while upon later `await`s the synchronous part will be empty and the asynchronous part will be the stack captured for the previous throwaway promise (and the V8Debugger automatically short circuits stacks with empty synchronous part). Bug: chromium:1280519, chromium:1277451, chromium:1246867 Change-Id: Id604dabc19ea133ea2e9dd63181b1fc33ccb5eda Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383775Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78599}
-
- 07 Jan, 2022 1 commit
-
-
Frank Tang authored
Bug: v8:11544 Change-Id: I3206ca3e0c505b14e4497ccb2af25a31940a1c1e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967755Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#78518}
-
- 02 Dec, 2021 1 commit
-
-
Hao Xu authored
Baseline compiler generates calls to builtin Bitwise_Baseline for bitwise bytecodes with Smi rhs. The builtin still performs type check for rhs even though it is known to be Smi. This CL implements new builtins for bitwise operations which does not do speculation for rhs. Bug: v8:12442 Change-Id: Ia6e1b25a74d00db8c39600b4f81f6e9aa5d59253 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310520Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Hao A Xu <hao.a.xu@intel.com> Cr-Commit-Position: refs/heads/main@{#78206}
-
- 30 Nov, 2021 1 commit
-
-
Hao Xu authored
Current Baseline compiler generates calls to Binop_Baseline for both Binop and Binop with Smi rhs. This CL make BinopSmi calls to BinopSmi_Baseline which does not do speculation for rhs. Bug: v8:12442 Change-Id: Ied786af028429aa0842b9b6d2a5736779f24b568 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303807Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Hao A Xu <hao.a.xu@intel.com> Cr-Commit-Position: refs/heads/main@{#78141}
-
- 26 Oct, 2021 1 commit
-
-
Thibaud Michaud authored
R=ahaas@chromium.org CC=fgm@chromium.org Bug: v8:12191 Change-Id: Ied9ab5fa5009e5ab268d1c9893729d8210ae62ce Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3220344 Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77542}
-
- 13 Oct, 2021 1 commit
-
-
Joyee Cheung authored
Introduces several new runtime mechanics for defining private fields, including: - Bytecode StaKeyedPropertyAsDefine - Builtins StoreOwnIC{Trampoline|Baseline|_NoFeedback} - Builtins KeyedDefineOwnIC{Trampoline|Baseline|_Megamorphic} - TurboFan IR opcode JSDefineProperty These new operations can reduce a runtime call per class field into a more traditional Store equivalent. In the microbenchmarks, this results in a substantial win over the status quo (~8x benchmark score for single fields with the changes, ~20x with multiple fields). The TurboFan JSDefineProperty op is lowered in JSNativeContextSpecialization, however this required some hacks. Because private fields are defined as DONT_ENUM when added to the object, we can't find a suitable transition using the typical data property (NONE) flags. I've added a mechanism to specify the required PropertyAttributes for the transition we want to look up. Details: New bytecodes: - StaKeyedPropertyAsDefine, which is essentially StaKeyedProperty but with a different IC builtin (KeyedDefineOwnIC). This is a bytecode rather than a flag for the existing StaKeyedProperty in order to avoid impacting typical keyed stores in any way due to additional branching and testing. New builtins: - StoreOwnIC{TTrampoline|Baseline|_NoFeedback} is now used for StaNamedOwnProperty. Unlike the regular StoreIC, this variant will no longer look up the property name in the prototype. In adddition, this CL changes an assumption that StoreNamedOwnProperty can't result in a map transition, as we can't rely on the property already being present in the Map due to an object literal boilerplate. In the context of class features, this replaces the runtime function %CreateDataProperty(). - KeyedDefineOwnIC{Trampoline|Baseline|_Megamorphic} is used by the new StaKeyedPropertyAsDefine bytecode. This is similar to an ordinary KeyedStoreIC, but will not check the prototype for setters, and for private fields, will take the slow path if the field already exists. In the context of class features, this replaces the runtime function %AddPrivateField(). TurboFan IR: - JSDefineProperty is introduced to represent a situation where we need to use "Define" semantics, in particular, it codifies that we do not consult the prototype chain, and the semantics relating to private fields are implied as well. R=leszeks@chromium.org, syg@chromium.org, rmcilroy@chromium.org Bug: v8:9888 Change-Id: Idcc947585c0e612f9e8533aa4e2e0f8f0df8875d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2795831Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#77377}
-