• Daniel Clifford's avatar
    Refactor/cleanup various Torque classes, inclduing making Type a Declarable · 90415437
    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: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52947}
    90415437
Name
Last commit
Last update
..
Torque.g4 Loading commit data...
TorqueBaseListener.cpp Loading commit data...
TorqueBaseListener.h Loading commit data...
TorqueBaseVisitor.cpp Loading commit data...
TorqueBaseVisitor.h Loading commit data...
TorqueLexer.cpp Loading commit data...
TorqueLexer.h Loading commit data...
TorqueListener.cpp Loading commit data...
TorqueListener.h Loading commit data...
TorqueParser.cpp Loading commit data...
TorqueParser.h Loading commit data...
TorqueVisitor.cpp Loading commit data...
TorqueVisitor.h Loading commit data...
ast-generator.cc Loading commit data...
ast-generator.h Loading commit data...
ast.h Loading commit data...
declarable.h Loading commit data...
declaration-visitor.cc Loading commit data...
declaration-visitor.h Loading commit data...
declarations.cc Loading commit data...
declarations.h Loading commit data...
file-visitor.cc Loading commit data...
file-visitor.h Loading commit data...
global-context.h Loading commit data...
implementation-visitor.cc Loading commit data...
implementation-visitor.h Loading commit data...
scope.cc Loading commit data...
scope.h Loading commit data...
torque.cc Loading commit data...
type-oracle.h Loading commit data...
types.cc Loading commit data...
types.h Loading commit data...
utils.cc Loading commit data...
utils.h Loading commit data...