- 28 Feb, 2019 1 commit
-
-
Simon Zünd authored
This CL introduces a new contextual 'LanguageSererData'. Its purpose is to hold all the eagerly calculated data needed to answer language server requests. The first thing collected are the definitoins of some IdentifierExpresisons and macro/builtin call-sites. Collecting this data is not necessary for normal compilation, so it is disabled by default and can be enabled via a Torque compiler option. Since the holder class is a contextual for which no scope exists during normal compilation, accidental collection of unnecessary language server data *should* be prevented. R=tebbi@chromium.org Bug: v8:7793 Change-Id: Iffcebad4c420a0a51b1ed3c37a37c3475c6ab2e8 Reviewed-on: https://chromium-review.googlesource.com/c/1491594Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/master@{#59941}
-
- 19 Feb, 2019 1 commit
-
-
Simon Zünd authored
This change will enable basic "goto definition" support in the upcoming Torque language server. R=tebbi@chromium.org Bug: v8:7793 Change-Id: I8e50cc58288991a2f6024d06bf38f4fd66f21eea Reviewed-on: https://chromium-review.googlesource.com/c/1477055 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#59694}
-
- 04 Feb, 2019 1 commit
-
-
Daniel Clifford authored
In the process add missing base Torque functionality for 8-bit and 16-bit integers and Cast<> operators to make them easy to use. As a poster child, port the field declarations of SharedFunctionInfo to the class definition in base.tq. As a drive by: Add the missing GN dependency on class-definitions-from-dsl.h Bug: v8:7793 Change-Id: I76a41c2e81ffd1cbb90ac7a4ef8d4003ac86e8dc Reviewed-on: https://chromium-review.googlesource.com/c/1445882Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#59321}
-
- 10 Jan, 2019 1 commit
-
-
Daniel Clifford authored
Class declarations support structured heap data that is a subtype of HeapObject. Only fields of Object subtypes (both strong and weak) are currently supported (no scalar fields yet). With this CL, both the field list macro used with the C++ DEFINE_FIELD_OFFSET_CONSTANTS macro (to make field offset constants) as well as the Torque "operator '.field'" macros are generated for the classes declared in Torque. This is a first step to removing the substantial amount of duplication and boilerplate code needed to declare heap object classes. As a proof of concept, and handful of class field definitions, including those for non trivial classes like JSFunction, have been moved to Torque. Bug: v8:7793 Change-Id: I2fa0b53db65fa6f5fe078fb94e1db3418f908753 Reviewed-on: https://chromium-review.googlesource.com/c/1373971 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#58704}
-
- 05 Dec, 2018 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: I12aae5d61a21f3e6e010e07622fe0d01a5ba03eb Reviewed-on: https://chromium-review.googlesource.com/c/1344118 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#58052}
-
- 13 Nov, 2018 1 commit
-
-
Mike Stanton authored
BUG=v8:7793 Change-Id: Ibcf16998ef9a44ae899a2536ccf02af1b7b7193d Reviewed-on: https://chromium-review.googlesource.com/c/1333410 Commit-Queue: Michael Stanton <mvstanton@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#57469}
-
- 05 Nov, 2018 1 commit
-
-
Tobias Tebbi authored
- Name lookup in module scopes has namespace semantics now: All overloads from all parent modules are combined before overload resolution. - Allow overloads of different callables: runtime-functions, macros, builtins, and generics. - The duplication between the DeclarationVisitor and the ImplementationVisitor is removed: The DeclarationVisitor creates declarables for everything except for implicit generic specializations. The ImplementationVisitor iterates over declarables. The DeclarationVisitor only looks at the header of declarations, not at the body. - Modules become Declarable's, which will enable them to be nested. - Modules replace the existing Scope chain mechanism, which will make it easier to inline macros. - The DeclarationVisitor and Declarations become stateless. All state is moved to contextual variables and the GlobalContext. - Implicit specializations are created directly from the ImplementationVisitor. This will enable template parameter inference. - As a consequence, the list of all builtins is only available after the ImplementationVisitor has run. Thus GenerateBuiltinDefinitions has to move to the ImplementationVisitor. Also, this makes it necessary to resolve the link from function pointer types to example builtins only at this point. Bug: v8:7793 Change-Id: I61cef2fd3e954ab148c252974344a6e38ee2d01d Reviewed-on: https://chromium-review.googlesource.com/c/1304294 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#57231}
-
- 15 Oct, 2018 1 commit
-
-
Tobias Tebbi authored
While this is mostly a mechanical change to enable re-visiting macros for inlining, it has a few user-facing effects: - Labels and (variables, parameters, local constants) are handled separately, so they do not shadow each other. - A local variable or constant is not bound in its initializer. This allows code like: const x = 5; { const x = x + 1; } Bug: v8:7793 Change-Id: I968e1f93d92689737362c803342a797d312e95cd Reviewed-on: https://chromium-review.googlesource.com/c/1276628 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#56649}
-
- 04 Oct, 2018 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: I5261122faf422987968ee1e405966f878ff910a1 Reviewed-on: https://chromium-review.googlesource.com/c/1245766 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#56391}
-
- 24 Jul, 2018 1 commit
-
-
Tobias Tebbi authored
This also fixes all resulting failures. Bug: v8:7965 Change-Id: I5451cdd3a3ec48c708107a22445808c268efe861 Reviewed-on: https://chromium-review.googlesource.com/1148336 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#54643}
-
- 20 Jul, 2018 1 commit
-
-
Tobias Tebbi authored
Bug: v8:7793 Change-Id: I208edf856f0283d840358f3c11bab97af0397056 Reviewed-on: https://chromium-review.googlesource.com/1095192Reviewed-by: Daniel Clifford <danno@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#54574}
-
- 15 Jun, 2018 1 commit
-
-
Daniel Clifford authored
In the process: - Make it possible to add 'otherwise' labels to operators - operators can be defined by non-external macros Bug: v8:7793 Change-Id: Ia16ae7c95a4719703c80a927dee44c74b65c170b Reviewed-on: https://chromium-review.googlesource.com/1100826 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53754}
-
- 13 Jun, 2018 1 commit
-
-
Daniel Clifford authored
In the process and as a test case of the module/file-handling, separate Array.p.forEach into its own Torque file. Bug: v8:7793 Change-Id: If45103a9df3bf8fade34e7bcf7c7c9c060e25966 Reviewed-on: https://chromium-review.googlesource.com/1097755Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#53703}
-
- 30 May, 2018 1 commit
-
-
Tobias Tebbi authored
In Torque, we have several global singleton classes. Using the contextual variable pattern instead of passing around pointers in random places makes the code more readable. This CL does this for TypeOracle, we plan to do it for more classes in the future. Bug: v8:7754 Change-Id: Ib744b476ce51a4932c52274b2210149515f1663d Reviewed-on: https://chromium-review.googlesource.com/1078729 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#53444}
-
- 16 May, 2018 2 commits
-
-
Tobias Tebbi authored
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I20e30f0c19c887b1e093b02e39c7bd3d53d15182 Reviewed-on: https://chromium-review.googlesource.com/1054073 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#53221}
-
Daniel Clifford authored
Including specialization, e.g.: // Declare parameterized generic macro GenericMacroTest<T: type>(param: T): Object { return Undefined; } // Declare specialization of generic GenericMacroTest<Object>(param: Object): Object { return param; } ... assert(GenericMacroTest<Smi>(0) == Undefined); assert(GenericMacroTest<Smi>(1) == Undefined); assert(GenericMacroTest<Object>(Null) == Null); assert(GenericMacroTest<Object>(False) == False); ... Known issue: specialization doesn't rigorously checked to verify that specialization signature precisely matches generic declaration. Change-Id: I9d9d96da4c5c8c9a76550844680e9e133a5edaed Reviewed-on: https://chromium-review.googlesource.com/1043986 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#53203}
-
- 08 May, 2018 1 commit
-
-
Tobias Tebbi authored
Change-Id: I61a594e194082577135dbc82b2673bf477105ef3 Reviewed-on: https://chromium-review.googlesource.com/1046949 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#53050}
-
- 04 May, 2018 1 commit
-
-
Daniel Clifford authored
- In debug builds, 'assert(<expr>)' evaluates and aborts execution if the provided Torque expression is false at runtime. assert(<expr>) supports the same set of expressions protocols as Toruqe's if statement, i.e. both bool values and BranchIf- style tests. Upon failure, the assertion prints the Torque source code of the failed expression, not the generated CSA code. - 'unreachable' calls CSA's Unreachable() and signals to Torque that code execution cannot continue (i.e. its statement returns the 'never' type). In debug builds, the line number and position of the statement are printed before breaking. - 'debug' calls CSA's DebugBreak(). In debug builds, the line number and position of the 'debug' are printed before breaking. Change-Id: I4efd052536bb402c097a0d5f7be56e154b5b3676 Reviewed-on: https://chromium-review.googlesource.com/1042570 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#52984}
-
- 03 May, 2018 1 commit
-
-
Daniel Clifford authored
This is a preparatory step for implementing generics. Along the way, clean up and encapsulate a bunch of code, including: * Fully encapsulate Scope by adding the new class ScopeChain that provide an abstraction for creating and activating scopes. * Untangle Modules and Scopes. * Unify scope activation so that it is always associated with an AST node and triggered by a RAII helper class. * Unify (somewhat) how builtins and macros are created, fixing a few inconsistencies with when and how parameters and their types are declared. * Create a new Declarations class that brokers between the visitor classes and the ScopeChain. This moves handling of declaration-related errors out of the visitors but also makes it possible to do so without polluting Scope and ScopeChain with details about resolving SourcePositions in error cases. Change-Id: I180017d4cf39ccf5ef1d20b84f53284c252f8d87 Reviewed-on: https://chromium-review.googlesource.com/1038504 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#52947}
-
- 24 Apr, 2018 1 commit
-
-
Daniel Clifford authored
Bug: v8:7666 Change-Id: Ida9b6f964261bad75a4eb5d567ad37ec82569bcc Reviewed-on: https://chromium-review.googlesource.com/1023061 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#52751}
-
- 16 Apr, 2018 1 commit
-
-
Daniel Clifford authored
An overview of motivation behind Torque and some of its principles can be found here: https://bit.ly/2qAI5Ep Note that there is quite a bit of work left to do in order to get Torque production-ready for any non-trivial amount of code, but landing the prototype as-is will allow for much faster iteration. Bugs will be filed for all of the big-ticket items that are not landing blockers but called out in this patch as important to fix. Cq-Include-Trybots: luci.v8.try:v8_linux_nosnap_rel;luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: Ib07af70966d5133dc57344928885478b9c6b8b73 Reviewed-on: https://chromium-review.googlesource.com/845682 Commit-Queue: Daniel Clifford <danno@chromium.org> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#52618}
-