- 27 Sep, 2021 1 commit
-
-
Nico Hartmann authored
Prepare the Torque compiler to generate Kythe artifacts to be consumed by CodeSearch. Drive-by changes. * Extend SourcePosition by an offset in the input string, as this is required by the Kythe graph. * Correctly set missing identifier positions in Declarations. Bug: v8:12261 Change-Id: Ida0a4a562c99f58ab924ddde36f3146f3d3fd415 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181102 Commit-Queue: Nico Hartmann <nicohartmann@chromium.org> Reviewed-by: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/main@{#77099}
-
- 31 Jul, 2020 1 commit
-
-
Tobias Tebbi authored
This allows templates to preserve the type of implicit parameters to select a better ovleroad, without generally extending overload resolution to implicit parameters, which could be confusing. Bug: v8:7793 Change-Id: Ie57090a295b0b46d03789829b975fc16e2a9c5b9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2329630 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#69177}
-
- 31 Oct, 2019 1 commit
-
-
Tobias Tebbi authored
This has two advantages: - It improves error messages by avoiding wrong template instantiations. - More flexible overloads by disabling generics for overload resolution when their constraints are violated. Bug: v8:7793 Change-Id: I7d2b8ef736988e8de16d25a4a4b16b49e27c6a11 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890097Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#64676}
-
- 24 Oct, 2019 1 commit
-
-
Tobias Tebbi authored
This expands the existing mechanism for generic structs to also cover abstract types. This involves: - Moving the SpecializationKey from StructType to Type, so that it's also available to AbstractType. - Moving the generic parameters out of the StructDeclaration AST node and using the existing GenericDeclaration AST node for generic structs and abstract types too. - The GenericStructType declarable gets generalized to GenericType. This will be useful for defining a Weak<T> type for weak pointers. Bug: v8:7793 Change-Id: I183b3a038a143cf0ae5888150104c4a025fd736c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1859623 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#64533}
-
- 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}
-
- 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}
-