- 03 Aug, 2020 1 commit
-
-
Tobias Tebbi authored
Change-Id: Id545ca00106fb54ee08078177ad7f24842752afe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332799Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#69196}
-
- 27 Jul, 2020 1 commit
-
-
Tobias Tebbi authored
When mksnapshot fails on a static assert in Torque, print the statement and position from the Torque source. To enable special treatment, change the syntax of static asserts in Torque from StaticAssert() to static_assert() to align with assert() and check() statements. Bug: v8:7793 Change-Id: Idda8e3c342bdcefc893ff297f8d7727d2734c221 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2317314 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#69069}
-
- 16 Jul, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: Ie573b3feef58329d524e51c942b67cf0525963ff Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2300545 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#68885}
-
- 10 Jul, 2020 1 commit
-
-
Gus Caplan authored
This allows `new (Pretenured) X{}` to force a pretenured allocation. Bug: v8:7793 Change-Id: Ib09f186b3b503b9b23291c39c1390f120d25eebe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288409 Commit-Queue: Gus Caplan <me@gus.host> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#68801}
-
- 03 Jul, 2020 1 commit
-
-
Daniel Clifford authored
This change also makes it possible to create Torque references to elements in the context. Change-Id: I064b73dedf8463c8d92b94b0e59f3cb4e366611a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280084 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#68677}
-
- 23 Jun, 2020 1 commit
-
-
Daniel Clifford authored
This change enables automatic generation of Cast<> operators for classes that are defined in Torque. * Cast<> macros are generated for all classes that are defined in Torque code that are neither shapes nor marked with a new @doNotGenerateCast annotation. * Implicitly generated Cast macros simply call through to an internally-defined "DownCastForTorqueClass" macro that implements the cast using one of three strategies for efficiency. If the class has subclasses (i.e. a range of instance types including subtypes), the DownCastForTorqueClass checks for inclusion in the instance type range. If the class has a single instance type (i.e. no subclasses), then either 1) a map check is used if the class has a globally- defined map constant or 2) an equality check for the instance type is used. * Added new intrinsics to introspect class information, e.g. fetching instance type ranges for a class, accessing the globally-defined map for a class. * Removed a whole pile of existing explicit Cast<> operators that are no longer needed because of the implicitly generated Cast<> macros. * Added tests for the new Cast<> implementations. Bug: v8:7793 Change-Id: I3aadb0c62b720e9de4e7978b9ec4f05075771b8b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250239 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#68478}
-
- 22 May, 2020 1 commit
-
-
Seth Brenith authored
Sometimes CSA code carefully constructs a mask to check several bitfields at once. Thus far, such a check has been very awkward to write in Torque. This change adds a way to do so, using the non-short-circuiting binary `&` operator. So now you can write an expression that depends on several bitfields from a bitfield struct, like `x.a == 5 & x.b & !x.c & x.d == 2` (assuming b is a one-bit value), and it will be reduced to a single mask and equality check. To demonstrate a usage of this new reduction, this change ports the trivial macro IsSimpleObjectMap to Torque. I manually verified that the generated code for the builtin SetDataProperties, which uses that macro, is unchanged. Bug: v8:7793 Change-Id: I4a23e0005d738a6699ea0f2a63f9fd67b01e7026 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2183276 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#67948}
-
- 12 May, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: Id2a93f8ac8c512dbc5cdeb43a97e04d8d6684954 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2196130 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#67748}
-
- 07 May, 2020 1 commit
-
-
Shu-yu Guo authored
Normative change in ecma262 [1]. Errors thrown by GetMethod(iterator, "return") are suppressed in favor of the original exception. [1] https://github.com/tc39/ecma262/pull/1408 Bug: v8:10397 Change-Id: I0dea8bd677c557cced7103c846416bd81f06f482 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2183400 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#67662}
-
- 06 May, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:10421, v8:7793 Change-Id: If11fc7666f04ed0914f5fdfcdaa87acb8655d956 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2169100 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#67591}
-
- 04 May, 2020 1 commit
-
-
Tobias Tebbi authored
Summary of changes: - GC visitors no longer rely on superclass visitors, but instead visit everything themselves. This enables generating better code. - Try to match simple body descriptors to reduce the amount of generated code. - Turn SizeFor(instance) into an AllocatedSize() method. - Remove the special handling of resizable object sizes from Torque and instead overwrite AllocatedSize in classes that need special handling in C++. - Split the visitor id lists depending on whether the class has pointer fields. - Turn Torque-generated body descriptors into an .inc file to simplify includes. - Fix generated size functions to properly align the size. - Generate GC visitors (and C++ class definitions) for all string classes and FixedArray, WeakFixedArray, and WeakArrayList. - Store generated instance types in Torque class types. This is only used to determine if a type has a single instance type in this CL. Bug: v8:7793 Change-Id: I4d362e96b047c305bd6d065247734957b8958c42 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2110014 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67542}
-
- 01 May, 2020 1 commit
-
-
Tobias Tebbi authored
Torque desugars try-catch/label constructs with several handlers into nested try structures, with the first handler ending-up innermost. So currently, if you write try { ... } label Foo { Throw(...); } catch (e) { } The catch will catch the preceding Throw in another handler. This is different from how multiple try-catch handlers are done in languages like Java, where throwing from a preceding catch handler is not caught by a later one. To avoid this possible ambiguity, this CL prohibits this pattern, enforcing that a catch handler comes first, before any other label-handler attached to the same try. This way, a catch handler never catches from any other handler on the same try, since they have to come later. Bug: v8:7793 Change-Id: I943f14b2393d307c4254a3fc3a78f236dbcf86df Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2169098 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#67516}
-
- 28 Apr, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:10404, v8:7793 Change-Id: I7ed5fc790bd97af0dd3671669779e416101731ce Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2162877 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#67435}
-
- 23 Apr, 2020 1 commit
-
-
Seth Brenith authored
This change allows Torque code to initialize bitfield structs, using the same syntax as struct initialization. It also moves the definition of the JSPromise flags to Torque as an example usage. Bug: v8:7793 Change-Id: I3d5e49aa22139ffb4b8ea9f308dd36a2d22b2c1b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2148176 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#67338}
-
- 07 Apr, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: I3a49a6208be8e6dd68c261dc423ee80cc891b806 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2139577Reviewed-by: Marja Hölttä <marja@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#67040}
-
- 18 Mar, 2020 1 commit
-
-
Tobias Tebbi authored
To ensure good error messages, we do create bindings even for non-const fields but then add a new error message mechanism when accessing such a binding. Bug: v8:7793 Change-Id: I2f20483514660c5ce92202d301c631f6ac055446 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096617 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#66762}
-
- 09 Mar, 2020 1 commit
-
-
Tobias Tebbi authored
In the process: * Augment C++-generated Torque classes with SizeFor methods to calculate size of instances. * Add a new "@generateBodyDescriptor" annotation that causes Torque to generate C++ BodyDescriptors code that can be used to visit objects compatible with existing V8 mechanisms, e.g. GC * Fully automate C++ macro machinery so that adding non-extern Torque class doesn't require any C++ changes, including ensuring generation of instance types and proper boilerplate for validators and printers. * Make handling of @export a true annotation, allowing the modifier to be used on class declarations. * Add functionality such that classes with the @export annotation are available to be used from C++. Field accessors for exported classes are public and factory methods are generated to create instances of the objects from C++. * Change the Torque compiler such that Non-exported classes implicitly have the @generateBodyDescriptor annotation added and causes both verifiers and printers to be generated. * Switch non-extern Torque classes from using existing Struct-based machinery to being first-class classes that support more existing Torque class features. Change-Id: Ic60e60c2c6bd7acd57f949bce086898ad14a3b03 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2007490 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66621}
-
- 16 Jan, 2020 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: I8334a97033ebfa4bbd6bba27eb75c6ae129deab5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995384 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#65812}
-
- 19 Dec, 2019 1 commit
-
-
Daniel Clifford authored
Bug: v8:7793 Change-Id: Ib950ce398f101779a4654353d08ce947b8e05a66 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1526016Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#65518}
-
- 18 Dec, 2019 1 commit
-
-
Nico Hartmann authored
This CL implements enums in Torque in three steps: 1.) It implements necessary changes to Torque's type system. In particular, the constraints on constexpr types are relaxed such that constexpr types can exist without a corresponding non-constexpr version. Furthermore, constexpr and their non-constexpr counterpart need not be of the same kind of type. This allows an AbstractType to have a UnionType as its non-constexpr counterpart. 2.) The enum feature itself is realized as a pure desugaring in the parser, where all required types, constants and macro specializations (like FromConstexpr<>) are generated from a simple enum declaration, such that enum entries are not just constants, but are namespace scoped and have distinct types so that they can be used within typeswitch constructs. 3.) Almost all of the existing constants defined in torque (.tq files) are ported to new enum definitions. Bug: v8:10053 Change-Id: I72426d3b1434f301fd690847e15603de0dc1021b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1964392 Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65503}
-
- 17 Dec, 2019 1 commit
-
-
Seth Brenith authored
This change implements support for reading and writing bitfields from Torque code, and adds a couple of unit tests for this functionality. As Tobias suggested, the LocationReference for a bitfield access contains a nested LocationReference to where the bitfield struct is stored, so that store operations can read the original value, update part of it, and write it back. Bug: v8:7793 Change-Id: I1004a5c7fcb6cf58df5ad50109b114bf89c80efc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1957841 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65487}
-
- 16 Dec, 2019 1 commit
-
-
Tobias Tebbi authored
This makes it obvious that methods are actually macros. Also, in the future, we might allow methods that are actually builtins. Bug: v8:7793 Change-Id: Ib641c4b5a222b27c67aa0c31fd3611ed4a11842c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1967330Reviewed-by: Michael Stanton <mvstanton@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65455}
-
- 24 Oct, 2019 1 commit
-
-
Tobias Tebbi authored
The Torque formatter script did a hack to put spaces arount the | of union types. This was broken when the inserted comment ended up on the end of a line. For this reason, and since it doesn't make sense to fight the Google-wide TypeScript style for union types, this CL reverts to not putting spaces around union types. Bug: v8:7793 Change-Id: Ic0acf9e1da82540432a8e21b58497a6a7d523b9c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1871604 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Joshua Litt <joshualitt@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#64536}
-
- 30 Aug, 2019 1 commit
-
-
Georg Schmid authored
This CL adds a LocationReference specifically for slices to Torque. This allows us to safely reference arrays in objects and pass around such references. For an array of T-typed elements, referencing yields a Slice<T>. In addition, the traditional element access syntax ('o.array[i]') now internally produces a slice, indexes it at 'i' and dereferences the resulting HeapReference. Bug: v8:7793 Change-Id: I4af58e4d2feac547c55a1f6f9350a6c510383df2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771782 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63479}
-
- 26 Aug, 2019 1 commit
-
-
Tobias Tebbi authored
Changes in the reland: Rebased and added a check that JavaScript-linkage builtins use JSAny in parameters and return type, plus the necessary cleanups for this test to pass. Design Doc: https://docs.google.com/document/d/1z6j0pWHnNIfId0v00uWN2HBrGRDJxJfYuCr5K7Kr1xA This reverts commit 4418a7b9. Original change's description: > Revert "[torque] introduce JSAny type for user-accessible JavaScript values" > > This reverts commit 79b00555. > > Reason for revert: needs more discussion > > Original change's description: > > [torque] introduce JSAny type for user-accessible JavaScript values > > > > This CL introduces a JSAny type for user-exposed JavaScript values and > > a few new types to define it. Especially, it splits Symbol into > > PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed > > symbols). > > > > The change is mostly mechanical, but a few things are interesting: > > - PropertyKey and JSPrimitive were designed to coincide with the spec > > notions of IsPropertyKey() and primitive value, respectively. > > - Since Name is an open type, we define AnyName to be the known > > subtypes of Name. This is not too elegant, but by using AnyName > > instead of Name, typeswitch can properly conclude something if a > > subtype of Name is excluded. > > > > Small drive-by changes, which were necessary: > > - Allow subtyping on label parameters. > > - Fix the formatting of typeswitch, it was broken with union types > > in case types. > > > > Bug: v8:7793 > > Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322 > > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#63114} > > TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org > > Change-Id: Ifde7881d74afe407628f40047997339d54cb2424 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: v8:7793 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741652 > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63115} TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: v8:7793 Change-Id: Icca34e3824f55009b984d9348fd21884400f0081 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1769316 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#63395}
-
- 23 Aug, 2019 1 commit
-
-
Leszek Swirski authored
Replace uses of WordEqual on two tagged representation nodes with a new TaggedEqual helper, which on pointer compressed configs only compares the bottom 32-bits of the word. We no longer allow using WordEqual on anything not known to be a WordT (i.e. Node* or TNode<Object>). In the future, this may allow us to ignore the top bits of an uncompressed Smi, and have simpler decompression, though this patch is not sufficient for such a change. As a necessary drive-by, TNodify a bunch of stuff. Bug: v8:8948 Change-Id: Ie11b70709e5d3073f12551b37b420a172a71bc99 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1763531 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#63372}
-
- 21 Aug, 2019 1 commit
-
-
Georg Schmid authored
This CL consists of several preparatory steps for slices in Torque. Above all, it introduces a user-defined struct, torque_internal::Slice<T>, that performs bounds checking and returns references to elements in arrays. To enable this, several smaller changes were also made: - Constructors of internal classes such as torque_internal::Reference<T> now require a special 'Unsafe' argument, making it clear that there be dragons. - Struct methods are now declared during finalization. This allows instances of generic structs to have methods referring to the same struct. Previously, methods would be declared before the instance had been fully registered, leading to errors during type resolution. Furthermore, such methods were declared in a temporary namespace, that would then erroneously escape and lead to use-after-free issues. - Instances of TypeArgumentInference were not running in the correct (Torque) scopes, leading to type resolution errors. - The chain of ContextualVariable::Scope for any given ContextualVariable (such as CurrentScope) can now be walked, simplifying debugging. R=jgruber@chromium.org, tebbi@chromium.org Bug: v8:7793 Change-Id: I36f808f63cc3ce441062dfc56f511f24f1e3121e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1758322 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63314}
-
- 07 Aug, 2019 2 commits
-
-
Tobias Tebbi authored
This reverts commit 79b00555. Reason for revert: needs more discussion Original change's description: > [torque] introduce JSAny type for user-accessible JavaScript values > > This CL introduces a JSAny type for user-exposed JavaScript values and > a few new types to define it. Especially, it splits Symbol into > PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed > symbols). > > The change is mostly mechanical, but a few things are interesting: > - PropertyKey and JSPrimitive were designed to coincide with the spec > notions of IsPropertyKey() and primitive value, respectively. > - Since Name is an open type, we define AnyName to be the known > subtypes of Name. This is not too elegant, but by using AnyName > instead of Name, typeswitch can properly conclude something if a > subtype of Name is excluded. > > Small drive-by changes, which were necessary: > - Allow subtyping on label parameters. > - Fix the formatting of typeswitch, it was broken with union types > in case types. > > Bug: v8:7793 > Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322 > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63114} TBR=neis@chromium.org,jgruber@chromium.org,tebbi@chromium.org Change-Id: Ifde7881d74afe407628f40047997339d54cb2424 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:7793 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1741652Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63115}
-
Tobias Tebbi authored
This CL introduces a JSAny type for user-exposed JavaScript values and a few new types to define it. Especially, it splits Symbol into PrivateSymbol (not exposed) and PublicSymbol (JavaScript exposed symbols). The change is mostly mechanical, but a few things are interesting: - PropertyKey and JSPrimitive were designed to coincide with the spec notions of IsPropertyKey() and primitive value, respectively. - Since Name is an open type, we define AnyName to be the known subtypes of Name. This is not too elegant, but by using AnyName instead of Name, typeswitch can properly conclude something if a subtype of Name is excluded. Small drive-by changes, which were necessary: - Allow subtyping on label parameters. - Fix the formatting of typeswitch, it was broken with union types in case types. Bug: v8:7793 Change-Id: I14b10507f8cf316ad85e048fe8d53d1df5e0bb13 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735322 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#63114}
-
- 05 Aug, 2019 1 commit
-
-
Tobias Tebbi authored
Now that we can short-circuit control flow in the optimizing compiler, there is no more need for BranchIf... macros in CSA/Torque. Thus removing support for them in Torque and rewriting Torque macros to use bool return values instead. Bug: v8:7793 Change-Id: Ie4b7522aa5558be038fe821d8b5d02859d522ed1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1724211 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#63079}
-
- 02 Aug, 2019 1 commit
-
-
Georg Schmid authored
Previously when creating a new generic struct, one had to explicitly provide all type arguments, e.g., for the generic struct struct Box<T: type> { const value: T; } one would initialize a new box using const aSmi: Smi = ...; const box = Box<Smi> { value: aSmi }; With the additions in this CL the explicit type argument can be omitted. Type inference proceeds analogously to specialization of generic callables. Additionally, this CL slightly refactors class and struct initialization, and make type inference more permissive in the presence of unsupported type constructors (concretely, union types and function types). R=jgruber@chromium.org, tebbi@chromium.org Change-Id: I529be5831a85d317d8caa6cb3a0ce398ad578c86 Bug: v8:7793 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728617 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63036}
-
- 31 Jul, 2019 1 commit
-
-
Georg Schmid authored
With the arrival of generic structs (https://chromium-review.googlesource.com/c/v8/v8/+/1714868) the existing type inference procedure for generic calls became incomplete, since it could not infer types that were only constrained as part of generic types. For instance, given struct Box<T: Type> { ... } macro unbox<T: type>(box: Box<T>): T the type argument (Smi) at the following call site const box: Box<Smi> = ...; unbox(box); could not be inferred. This CL re-implements the inference procedure and documents the semantics of type argument inference in Torque a bit more clearly. R=tebbi@chromium.org Change-Id: I868f16afbd9864b9c810ac49bc1639b467df939c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1720812 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#63005}
-
- 30 Jul, 2019 1 commit
-
-
Tobias Tebbi authored
This allows to return bool values from Torque macros and branch on them without performance penalty, reconstructing good control flow. Drive-by cleanup: Delete EnsureDeferredCodeSingleEntryPoint(), since it's no longer needed. Constructing a graph and then re-inferring deferred blocks based on branch hints achieves this effect automatically. Bug: v8:7793 Change-Id: Idb6802372b407549e4760f290933d5b8f1e9d952 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1681132Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62979}
-
- 26 Jul, 2019 1 commit
-
-
Georg Schmid authored
This CL removes the built-in reference type in favor of a Torque-implemented generic struct, i.e., internal::Reference<T>. It also adds various infrastructure for getting and creating new generic struct instances, as well as matching against them. R=tebbi@chromium.org Change-Id: I1e3d6afe355a0603fa9c3ad789c6b8a97d1b3c26 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1718148 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62939}
-
- 23 Jul, 2019 1 commit
-
-
Georg Schmid authored
This CL introduces generic Torque structs. Generics are grounded early in the Torque compilation pipeline, meaning that every instantiation of a generic struct with concrete types will be turned into a distinct StructType. As an example, consider a Tuple of types T1, T2: struct Tuple<T1: type, T2: type> { const fst: T1; const snd: T2; } which can be manipulated using generic macros, such as macro Swap<T1: type, T2: type>(tuple: Tuple<T1, T2>): Tuple<T2, T1> { return Tuple<T2, T1>{fst: tuple.snd, snd: tuple.fst}; } Currently there is no type inference for struct instantiation sites, so type arguments have to be provided explicitly: const intptrAndSmi = Tuple<intptr, Smi>{fst: 1, snd: 2}; R=sigurds@chromium.org, tebbi@chromium.org Change-Id: I43111561cbe53144db473dc844a478045644ef6c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1714868 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#62878}
-
- 21 Jun, 2019 1 commit
-
-
Sigurd Schneider authored
Rework the implementation of non-external Torque classes to use Struct machinery rather than FixedArray machinery. This allows Torque-only defined 'internal' classes to the automatically generate class verifiers and printers. As part of this change, generate C++ boilerplate accessors for internal Torque classes, since this is a pre-requisite for the verifiers, printers and other Struct-based functionality. Moreover, augment the header-generating functionality in Torque to create separate header files for field offset definitions, internal class C++ definitions and instance types. Bug: v8:7793 Change-Id: I47d5f1570040c2b44d378f23b6cf95d3d132dacc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607645 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62317}
-
- 19 Jun, 2019 1 commit
-
-
Tobias Tebbi authored
This disallows using CSA macros from Torque that have a Node* return type instead of TNode<>. By enforcing CSA types at the boundary between CSA and Torque, we can ensure that the Torque types and the CSA types match. As a drive-by, this CL adds a bit more of CSA typing where it made sense. Bug: v8:7793, v8:6949 Change-Id: I12ea0337c628105ea3c420be747ae50d3a172547 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1660481 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#62293}
-
- 18 Jun, 2019 2 commits
-
-
Seth Brenith authored
For every @noVerifier in base.tq, this change either removes it or ensures that it has some annotation explaining why it can't be removed. The @noVerifier usages that can't be removed fall into the following categories: 1. Classes that don't have their own instance types and therefore have no meaningful way to do an Is...() check 2. Fields that might not exist 3. Fields that are waiting for MaybeObject support in Torque Bug: v8:9311 Change-Id: Id452d4151ec07347ae96a9b5f3b26e2ac8065d31 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1659134Reviewed-by: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#62263}
-
Georg Schmid authored
This CL allows CsaLoadElimination to retain some information in the presence of StoreToObject nodes. Two stores to an object don't alias if either the objects or the offsets don't alias. The analysis approximates either of these two conditions conservatively as follows: - Freshly allocated, distinct objects cannot alias. - Two objects cannot alias if one of is freshly allocated and the other was passed as a parameter or is a heap constant. - Two offsets cannot alias if they are both constant and distinct from each other. R=jarin@chromium.org, tebbi@chromium.org Change-Id: Ibec81913b413f81a3f7cbd40544a22d3711e6e5a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1660626 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62232}
-
- 17 Jun, 2019 1 commit
-
-
Georg Schmid authored
This is a reland of a66e3e57 Original change's description: > [csa] Tweak CSA pipeline to eliminate more redundant checks > > - Lower LoadObjectField to LoadFromObject > - Mark LoadFromObject and StoreToObject as non-allocating > - Use optimizable BitcastTaggedSignedToWord in TaggedIsNotSmi check > > R=jarin@chromium.org, tebbi@chromium.org > > Change-Id: I42992d46597be795aee3702018f7efd93fcc6ebf > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1657926 > Commit-Queue: Georg Schmid <gsps@google.com> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Cr-Commit-Position: refs/heads/master@{#62173} R=tebbi@chromium.org Change-Id: Id7ae13ba17a2083fd4109f34ce026030716ececb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1660622 Commit-Queue: Georg Schmid <gsps@google.com> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62202}
-