- 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}
-
- 18 Mar, 2020 2 commits
-
-
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}
-
Tobias Tebbi authored
- Allow type expression for abstract type supertypes. For consistency, and ease of implementation, also allow this for enums. - Allow subtyping of structs. This requires changing all places where we checked for struct types and instead check if we have a subtype of a struct type. - This allows defining two subtypes of the Reference<T> struct for mutable and constant references. Mutable references are a subtype of constant references. - &T desugars to MutableReference<T> const &T desugars to ConstReference<T> - A const field of a class produces a constant reference. A const field of a mutable reference to a struct is const. A mutable field of a const reference to a struct is const. - It is possible to assign a new struct value to a mutable reference to a struct, even if the struct contains const fields. This is analogous to allowing assignments of let-bound structs with constant fields. Not in this CL: - A notion of const slices. - Applying const to appropriate class fields. Bug: v8:7793 Change-Id: I6e7b09d44f54db25f8bf812be5f3b554b80414e0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2096615Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66759}
-
- 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}
-
- 23 Dec, 2019 1 commit
-
-
Nico Hartmann authored
Bug: v8:10053 Change-Id: I90e0798ce490dea035cf4ecb934a4b8d98c61bc3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1977859 Auto-Submit: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65551}
-
- 20 Dec, 2019 1 commit
-
-
Tobias Tebbi authored
This allows the definition of classes with several arrays and ports SmallOrderedHashTable subclasses to Torque as an example, including the existing CSA allocation functions for them. Overview of changes: - Introduce ResidueClass to encapsulate the modulo-arithmetic necessary to do alignment checks. - Add MachineOperatorReducer to the CSA pipeline to address now missing CSA ad-hoc constant folding that got blocked by a temporary phi. - Allow assignments to references to structs. This is needed to initialize the data_table part of SmallOrderedHashMap. - Make the NumberLiteralExpression AST-node store a double instead of a string. This is necessary to detect arrays with constant size used for padding. - Turn offsets into base::Optional<size_t> to ensure we don't use an invalid or statically unknown offset. - Remove CreateFieldReferenceInstruction since it doesn't work for complex offset computations and the logic can be expressed better in ImplementationVisitor. - Validate alignment of structs embedded in classes. Bug: v8:10004 v8:7793 Change-Id: Ifa414b42278e572a0c577bf9da3d37f80771a258 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1958011 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#65538}
-
- 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}
-
- 12 Dec, 2019 1 commit
-
-
Tobias Tebbi authored
This allows arbitrary expressions to specify the length of an array. These expressions get access to globally declared things and the preceding fields of the current object. Unfortunately, this breaks generated C++ runtime code, so as a workaround, I special-case expressions that are just an identifier and handle them as before. We might want to support more cases there in the future, probably also with special-casing since having a full C++ back-end for Torque is infeasible. Bug: v8:10004 v8:7793 Change-Id: I0d5d1200c0e727766beed7bfb2d43a8abb9cacf0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1942610 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#65427}
-
- 10 Dec, 2019 1 commit
-
-
Tobias Tebbi authored
This CL generalizes and improves how we handle allocations in Torque. Overview of the changes: - Remove obsolete special handling for JSObject classes, since it was incomplete: It breaks as soon as slack tracking is active. - Handle array initialization using slices. - Properly align allocation sizes. This enabled allocating strings. - Port AllocateSeq{One,Two}ByteString to Torque, which is much easier now than the old CSA code since allocation size alignment and large-object space allocation just happen out-of-the-box. - Remove obsolete or unnecessary intrinsics, some of them turn into macros in the torque_internal namespace. - Distinguish between header size and overall size for ClassType, make size optional and only defined when it is statically known. Bug: v8:10004 v8:7793 Change-Id: I623db233e7fb4deed54e8039ae0c24705e9a44e8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1932356Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65397}
-
- 06 Dec, 2019 1 commit
-
-
Seth Brenith authored
This change is the first part of adding Torque support for a "bitfield struct", which represents a set of bitfields packed together into an integer value. With this change, Torque can generate the list of BitField template specializations that allow runtime code to use the bitfield values. The flags used in SharedFunctionInfo are converted to Torque to exercise this functionality. Bitfield values are not yet accessible directly from Torque code. Bug: v8:7793 Change-Id: I9e4a3df7c847111b6e02e513f175dbf938b0be35 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1949047 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#65371}
-
- 22 Nov, 2019 1 commit
-
-
Tobias Tebbi authored
This is a first step towards allowing expressions for array sizes. So far, local variable bindings used a VisitResult and a const flag. This doesn't allow for local bindings to alias other things, like heap references. While this is not generally a feature we need, it will be helpful to create bindings when evaluating array sizes, since we want to grant access to the preceding already initialized object fields, but not to the whole object, which is not completely initialized yet. LocationReference already captures the notion of any readable and assignable location, so it is a good fit to be used for local bindings. The const attribute is no longer needed, since LocationReference already has a notion of constness for stack ranges (that is, LocationReference::Temporary vs LocationReference::VariableAccess). Bug: v8:10004 v8:7793 Change-Id: Ibe0a43e898e5c2c10d6739e2496d92dda542e6cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1928852Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#65117}
-
- 14 Nov, 2019 1 commit
-
-
Seth Brenith authored
Now that we can represent specific weak types with Weak<T>, this CL updates the generated verifier functions so that they permit weak references only to the specified type. As an example, consider the verifier emitted for the following field in PrototypeInfo: object_create_map: Weak<Map>|Undefined; We used to emit the following, which allowed any weak reference: CHECK(object_create_map__value.IsWeakOrCleared() || object_create_map__value.GetHeapObjectOrSmi().IsOddball()); With this change, we emit a stricter check: CHECK(object_create_map__value.IsCleared() || (!object_create_map__value.IsWeak() && object_create_map__value.GetHeapObjectOrSmi().IsOddball()) || (object_create_map__value.IsWeak() && object_create_map__value.GetHeapObjectOrSmi().IsMap())); Bug: v8:7793 Change-Id: I4be236d97dedbcdd6c98207928aee8bda2a77f00 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914613 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#64965}
-
- 07 Oct, 2019 1 commit
-
-
Tobias Tebbi authored
For this, all Torque stub-linkage builtins use TFC instead of TFS, with a custom descriptor added to interface-descriptors.h To avoid having complex logic in the generated code, the new class TorqueInterfaceDescriptor contains the logic to create a CallInterfaceDescriptor from a signature consisting of TNode types. As an example and test, this CL ports StringCharAt to Torque. Bug: v8:7793 Change-Id: I8339d2ad6e4f908ebdc3b8d30244e4bcbd974f21 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1798427Reviewed-by:
Hannes Payer <hpayer@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#64148}
-
- 13 Sep, 2019 1 commit
-
-
Clemens Hammacher authored
After https://crrev.com/c/1800575 and https://crrev.com/c/1803343, which tried to fix this on occuring compile errors, this CL systematically adds the <memory> include to each header that uses {std::unique_ptr}. R=sigurds@chromium.org TBR=mlippautz@chromium.org,alph@chromium.org,rmcilroy@chromium.org,verwaest@chromium.org Bug: v8:9396 Change-Id: If7f9c3140842f9543135dddd7344c0f357999da0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803349Reviewed-by:
Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#63767}
-
- 10 Sep, 2019 1 commit
-
-
Clemens Hammacher authored
Since we switched to C++14 now, we can use {std::make_unique} instead of our own {base::make_unique} from {template-utils.h}. R=mstarzinger@chromium.org, yangguo@chromium.org Bug: v8:9687 No-Try: true Change-Id: I660eb30038bbb079cee93c7861cd87ccd134f01b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1789300 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#63642}
-
- 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}
-
- 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
-
-
Seth Brenith authored
This is a reland of 517ab73f Updates since original: now compressed pointers passed to the function GetObjectProperties are required to be sign-extended. Previously, the function allowed zero-extended values, but that led to ambiguity on pointers like 0x88044919: is it compressed or is the heap range actually centered on 0x100000000? Original change's description: > Add postmortem debugging helper library > > This change begins to implement the functionality described in > https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit# > for investigating V8 state in crash dumps. > > This change adds a new library, v8_debug_helper, for providing platform- > agnostic assistance with postmortem debugging. This library can be used > by extensions built for debuggers such as WinDbg or lldb. Its public API > is described by debug-helper.h; currently the only method it exposes is > GetObjectProperties, but we'd like to add more functionality over time. > The API surface is restricted to plain C-style structs and pointers, so > that it's easy to link from a debugger extension built with a different > toolchain. > > This change also adds a new cctest file to exercise some basic > interaction with the new library. > > The API function GetObjectProperties takes an object pointer (which > could be compressed, or weak, or a SMI), and returns a string > description of the object and a list of properties the object contains. > For now, the list of properties is entirely based on Torque object > definitions, but we expect to add custom properties in future updates so > that it can be easier to make sense of complex data structures such as > dictionaries. > > GetObjectProperties does several things that are intended to generate > somewhat useful results even in cases where memory may be corrupt or > unavailable: > - The caller may optionally provide a type string which will be used if > the memory for the object's Map is inaccessible. > - All object pointers are compared against the list of known objects > generated by mkgrokdump. The caller may optionally provide the > pointers for the first pages of various heap spaces, to avoid spurious > matches. If those pointers are not provided, then any matches are > prefixed with "maybe" in the resulting description string, such as > "maybe UndefinedValue (0x4288000341 <Oddball>)". > > Bug: v8:9376 > > Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012 > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Michael Stanton <mvstanton@chromium.org> > Cr-Commit-Position: refs/heads/master@{#62882} Bug: v8:9376 Change-Id: I866a1cc9d4c34bfe10c7b98462451fe69763cf3f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1717090Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#63008}
-
- 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}
-
- 24 Jul, 2019 1 commit
-
-
Zhi An Ng authored
This reverts commit 517ab73f. Reason for revert: Test failures https://bugs.chromium.org/p/v8/issues/detail?id=9538 Original change's description: > Add postmortem debugging helper library > > This change begins to implement the functionality described in > https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit# > for investigating V8 state in crash dumps. > > This change adds a new library, v8_debug_helper, for providing platform- > agnostic assistance with postmortem debugging. This library can be used > by extensions built for debuggers such as WinDbg or lldb. Its public API > is described by debug-helper.h; currently the only method it exposes is > GetObjectProperties, but we'd like to add more functionality over time. > The API surface is restricted to plain C-style structs and pointers, so > that it's easy to link from a debugger extension built with a different > toolchain. > > This change also adds a new cctest file to exercise some basic > interaction with the new library. > > The API function GetObjectProperties takes an object pointer (which > could be compressed, or weak, or a SMI), and returns a string > description of the object and a list of properties the object contains. > For now, the list of properties is entirely based on Torque object > definitions, but we expect to add custom properties in future updates so > that it can be easier to make sense of complex data structures such as > dictionaries. > > GetObjectProperties does several things that are intended to generate > somewhat useful results even in cases where memory may be corrupt or > unavailable: > - The caller may optionally provide a type string which will be used if > the memory for the object's Map is inaccessible. > - All object pointers are compared against the list of known objects > generated by mkgrokdump. The caller may optionally provide the > pointers for the first pages of various heap spaces, to avoid spurious > matches. If those pointers are not provided, then any matches are > prefixed with "maybe" in the resulting description string, such as > "maybe UndefinedValue (0x4288000341 <Oddball>)". > > Bug: v8:9376 > > Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012 > Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Reviewed-by: Michael Stanton <mvstanton@chromium.org> > Cr-Commit-Position: refs/heads/master@{#62882} TBR=yangguo@chromium.org,mvstanton@chromium.org,jgruber@chromium.org,tebbi@chromium.org,seth.brenith@microsoft.com Change-Id: Ia078f2e8d101d2375b5db88021b2d65d28f1b075 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:9376 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1716033Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#62899}
-
- 23 Jul, 2019 1 commit
-
-
Seth Brenith authored
This change begins to implement the functionality described in https://docs.google.com/document/d/1evHnb1uLlSbvHAAsmOXyc25x3uh1DjgNa8u1RHvwVhk/edit# for investigating V8 state in crash dumps. This change adds a new library, v8_debug_helper, for providing platform- agnostic assistance with postmortem debugging. This library can be used by extensions built for debuggers such as WinDbg or lldb. Its public API is described by debug-helper.h; currently the only method it exposes is GetObjectProperties, but we'd like to add more functionality over time. The API surface is restricted to plain C-style structs and pointers, so that it's easy to link from a debugger extension built with a different toolchain. This change also adds a new cctest file to exercise some basic interaction with the new library. The API function GetObjectProperties takes an object pointer (which could be compressed, or weak, or a SMI), and returns a string description of the object and a list of properties the object contains. For now, the list of properties is entirely based on Torque object definitions, but we expect to add custom properties in future updates so that it can be easier to make sense of complex data structures such as dictionaries. GetObjectProperties does several things that are intended to generate somewhat useful results even in cases where memory may be corrupt or unavailable: - The caller may optionally provide a type string which will be used if the memory for the object's Map is inaccessible. - All object pointers are compared against the list of known objects generated by mkgrokdump. The caller may optionally provide the pointers for the first pages of various heap spaces, to avoid spurious matches. If those pointers are not provided, then any matches are prefixed with "maybe" in the resulting description string, such as "maybe UndefinedValue (0x4288000341 <Oddball>)". Bug: v8:9376 Change-Id: Iebf3cc2dea3133c7811bcefcdf38d9458b02fded Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628012 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#62882}
-
- 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}
-
- 11 Jun, 2019 3 commits
-
-
Simon Zünd authored
This CL adds lint errors for unused Torque macros. To prevent lots of noisy warnings, the check is rather narrow. Macros declared as "extern" or marked with "@export" are ignored. Also macros starting with "Convert", "Cast" or "FromConstexpr" are not checked. Drive-by: Removing some unused macros. Bug: v8:7793 Change-Id: Ie0d2e445f8882a9b0ebbda45876b342abf341248 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645312 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62092}
-
Simon Zünd authored
This CL adds a lint error for variables that are unnecessarily bound with 'let' when they could be bound using 'const. This test is skipped for struct types. For struct types, the "constness" also depends on the struct methods called and whether these methods write to the struct or not. This is not straight-forward to detect. Drive-by: Fix all the newly introduced lint errors. Bug: v8:7793 Change-Id: I0522ffcc4321350eef2e9573b8430bc78200ddce Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645322 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62085}
-
Simon Zünd authored
This CL creates global-context.cc and moves the GlobalContext constructor impl to this new file. Preparatory refactoring for import syntax. This CL also removes one unused static method from GlobalContext and changes two use-sites where Get() was used together with a static accessor. Drive-by: "Include what you use" for global-context.h Bug: v8:9183 Change-Id: Iafd877d03af9ad65b1c99ebd9743be64192f45c9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1649790 Commit-Queue: Simon Zünd <szuend@chromium.org> Auto-Submit: Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62081}
-
- 06 Jun, 2019 1 commit
-
-
Simon Zünd authored
This CL adds lint errors when 'let' bindings, arguments and labels are not used. Note that errors for 'const' bindings will be added later. In cases where arguments are actually needed to match the signature, the warning can be silenced by prefixing identifiers with "_". This might be needed for generic specializations or builtins called from TurboFan. Trying to use a variable or label that was marked with "_" results in a compilation error. Implicit arguments are not linted. They are implemented using exact string matching. Prefixing an implicit argument with "_" in a callee would break all callers as the names would no longer match. Drive-by: Fix all new lint errors in the existing Torque code. Bug: v8:7793 Change-Id: I68b3c59c76b956e9f88709e9388a40a19546ce52 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645092 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#62027}
-
- 05 Jun, 2019 2 commits
-
-
Tobias Tebbi authored
TBR: yangguo@chromium.org Bug: v8:7793 Change-Id: Ie680d72a1da23038d3136f82532496eabbd9c363 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1632227 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#62004}
-
Simon Zünd authored
R=tebbi@chromium.org Bug: v8:7793 Change-Id: Ibba7651f8bd6a8e06b7810a8190d210b4cd54be0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1645324 Auto-Submit: Simon Zünd <szuend@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#62001}
-
- 27 May, 2019 2 commits
-
-
Tobias Tebbi authored
Instead of generating one CodeStubAssembler-like class per namespace, Torque-generated macros are now free-standing functions not included from CSA code, and explicitly exported macros become part of the new TorqueGeneratedExportedMacrosAssembler, which CodeStubAssembler inherits from, thus making them available to all CSA code. Structs are now defined in a new header csa-types-tq.h as free-standing types with the prefix "TorqueStruct". This is a preparation for generating per Torque-file instead of per namespace. Change-Id: I60fadc493a63f85d1d340768ec6f11ae47be0cb8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1628787 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#61865}
-
Clemens Hammacher authored
This replaces all typedefs that define types and not functions by the equivalent "using" declaration. This was done mostly automatically using this command: ag -l '\btypedef\b' src test | xargs -L1 \ perl -i -p0e 's/typedef ([^*;{}]+) (\w+);/using \2 = \1;/sg' Patchset 2 then adds some manual changes for typedefs for pointer types, where the regular expression did not match. R=mstarzinger@chromium.org TBR=yangguo@chromium.org, jarin@chromium.org Bug: v8:9183 Change-Id: I6f6ee28d1793b7ac34a58f980b94babc21874b78 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631409 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#61849}
-
- 17 May, 2019 1 commit
-
-
Simon Zünd authored
The language server and unit tests pass in an empty output directory to signal that no C++ files should be generated. As these generation steps include some validations, they should also be included in language server and unit test compilation runs. This CL introduces a "dry run" flag on the ImplementationVisitor. Additionaly, the implementation visitor wraps the file writing functionality. In case of a dry-run, file writing becomes a no-op. R=sigurds@chromium.org Bug: v8:7793 Change-Id: Id699fdf0b35311ddd3c1f5419baa0237b40ddce4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617244Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#61599}
-
- 16 May, 2019 1 commit
-
-
Sigurd Schneider authored
Bug: v8:7793 Change-Id: I390b4b5e1f486c53c122f7ebf8dd4106c9bbd10e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1607650 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61564}
-
- 14 May, 2019 2 commits
-
-
Sigurd Schneider authored
Change-Id: I75a4a2af4bbe9d495d583b13fb6d885d8509c2b8 Bug: v8:7793 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611797 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61491}
-
Sigurd Schneider authored
This CL introduces the new suffix '-tq' for Torque generated files, and replaces the infix 'FromDSL' in type names with a prefix 'TorqueGenerated'. Change-Id: I1e90460cc0c666da6cf5017e8b3cb7c39c6ac668 Bug: v8:7793 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609798 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61490}
-
- 10 May, 2019 1 commit
-
-
Seth Brenith authored
This change generates functions that verify the things that Torque knows about objects and their fields. We still must implement each verifier function in objects-debug.cc, but we can call into the generated code to verify that field types match their Torque definitions. If no additional verification is required, we can use the macro USE_TORQUE_VERIFIER as a shorthand for a verifier that calls the corresponding generated function. A new annotation @noVerifier can be applied to both class and field definitions, to prevent generating verification code. This allows fully customized verification for complicated cases like JSFunction::prototype_or_initial_map, which might not exist at all, and JSObject::elements, which might be a one pointer filler map. Because Factory::InitializeJSObjectFromMap fills new objects with undefined values, and many verifiers need to deal with partially- initialized objects, the generated verifiers allow undefined values on every class deriving from JSObject. In cases where stricter checks were previously performed, they are kept in objects-debug.cc. Bug: v8:7793 Change-Id: I84034efadca89ba0aceddf92e886ffbfaa4c23fa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594042 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#61422}
-
- 07 May, 2019 1 commit
-
-
Sigurd Schneider authored
Torque semantic analysis is now a four-stage process: 1. The TypeDeclarationVisitor introduces a TypeAlias for every TypeDeclaration* (or derived) in the Torque source, but does not process the TypeDeclaration* itself. 2. All aliases are resolved in a dependency respecting manner. This CL also changes struct member resolution to happen at this point already. Types for classes are created, but their members are not resolved to allow classes to mutually reference each other in their field types. 3. 'value' declarations (macros, etc.) are processed. 4. Members of classes are processed. Bug: v8:7793 Change-Id: I46108555a5cdf30df03c5d4399ec786ee6cc6df4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1584319 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61264}
-
- 06 May, 2019 1 commit
-
-
Simon Zünd authored
This CL adds navigation support for labels listed in the "otherwise" part of a call expression. There are two places where a definition for such a label can be found: - The signature of the current macro (caller) - A label block of a "try" statement that surrounds the call expression. R=tebbi@chromium.org Bug: v8:8880 Change-Id: If8849ad29abcf94f301d7a51e3e52c5517601bc0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1593295 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61228}
-
- 11 Apr, 2019 1 commit
-
-
Tobias Tebbi authored
This adds references to HeapObject fields to Torque. The syntax is based on Rust (which is essentially C pointer syntax). The type &T is a reference to T (which must be a scalar type for now). We can create references from field access expressions, using the addressof(&) operator: &obj.fieldname To read or assign a reference, we use the dereference(*) operator: *someref = *otherref This CL also uses references internally normal class field accesses, but only if there is no overload for field accessor functions. This allows to have overloaded field accessors for a subtype like FastJSArray. However, there is a change in behavior in that an operator ".fieldname" will stop reference creation and will therefore also stop write access to a class field of the same name. That's why this CL had to add a write overload ".length=" for FastJSArray. References desugar to a pair of a tagged HeapObject pointer and an untagged offset into this HeapObject. On the CSA-side, they are represented by the C++ struct struct TorqueReference { TNode<HeapObject> object; TNode<IntPtrT> offset; }; Bug: v8:7793 Change-Id: Ica6468d47847bd68fb6b85f731cf8fbe142fa401 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557151 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#60780}
-
- 09 Apr, 2019 1 commit
-
-
Sigurd Schneider authored
The new @generatePrint annotation automatically generates ...Print methods for objects from their Torque class definition. While this is mostly geared towards objects derived from Struct, it works on any Torque class. Bug: v8:7793 Change-Id: Iaa772879d397b95c7853dafdd9f09a85dbde8e35 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1557152 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#60708}
-