Skip to content

Commit

Permalink
AST+Parser: Reduce size of ExpressionKind by boxing things
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Dec 19, 2024
1 parent e1de4db commit 6805d3c
Show file tree
Hide file tree
Showing 29 changed files with 872 additions and 746 deletions.
128 changes: 64 additions & 64 deletions crates/ast/meta/ast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,71 +69,71 @@ ExpressionKind:
as: Enum
children: [self]
Missing: MissingExpression
Eval: EvalExpression
Empty: EmptyExpression
Die: DieExpression
Exit: ExitExpression
Isset: IssetExpression
Unset: UnsetExpression
Print: PrintExpression
Literal: Literal
ArithmeticOperation: ArithmeticOperationExpression
AssignmentOperation: AssignmentOperationExpression
BitwiseOperation: BitwiseOperationExpression
ComparisonOperation: ComparisonOperationExpression
LogicalOperation: LogicalOperationExpression
Concat: ConcatExpression
Instanceof: InstanceofExpression
Reference: ReferenceExpression
Parenthesized: ParenthesizedExpression
ErrorSuppress: ErrorSuppressExpression
Identifier: Identifier
Variable: Variable
Include: IncludeExpression
IncludeOnce: IncludeOnceExpression
Require: RequireExpression
RequireOnce: RequireOnceExpression
FunctionCall: FunctionCallExpression
FunctionClosureCreation: FunctionClosureCreationExpression
MethodCall: MethodCallExpression
MethodClosureCreation: MethodClosureCreationExpression
NullsafeMethodCall: NullsafeMethodCallExpression
StaticMethodCall: StaticMethodCallExpression
StaticVariableMethodCall: StaticVariableMethodCallExpression
StaticMethodClosureCreation: StaticMethodClosureCreationExpression
StaticVariableMethodClosureCreation: StaticVariableMethodClosureCreationExpression
PropertyFetch: PropertyFetchExpression
NullsafePropertyFetch: NullsafePropertyFetchExpression
StaticPropertyFetch: StaticPropertyFetchExpression
ConstantFetch: ConstantFetchExpression
Static: StaticExpression
Self_: SelfExpression
Parent: ParentExpression
ShortArray: ShortArrayExpression
Array: ArrayExpression
List: ListExpression
Closure: ClosureExpression
ArrowFunction: ArrowFunctionExpression
New: NewExpression
InterpolatedString: InterpolatedStringExpression
Heredoc: HeredocExpression
Nowdoc: NowdocExpression
ShellExec: ShellExecExpression
AnonymousClass: AnonymousClassExpression
Bool: BoolExpression
ArrayIndex: ArrayIndexExpression
Eval: Box<EvalExpression>
Empty: Box<EmptyExpression>
Die: Box<DieExpression>
Exit: Box<ExitExpression>
Isset: Box<IssetExpression>
Unset: Box<UnsetExpression>
Print: Box<PrintExpression>
Literal: Box<Literal>
ArithmeticOperation: Box<ArithmeticOperationExpression>
AssignmentOperation: Box<AssignmentOperationExpression>
BitwiseOperation: Box<BitwiseOperationExpression>
ComparisonOperation: Box<ComparisonOperationExpression>
LogicalOperation: Box<LogicalOperationExpression>
Concat: Box<ConcatExpression>
Instanceof: Box<InstanceofExpression>
Reference: Box<ReferenceExpression>
Parenthesized: Box<ParenthesizedExpression>
ErrorSuppress: Box<ErrorSuppressExpression>
Identifier: Box<Identifier>
Variable: Box<Variable>
Include: Box<IncludeExpression>
IncludeOnce: Box<IncludeOnceExpression>
Require: Box<RequireExpression>
RequireOnce: Box<RequireOnceExpression>
FunctionCall: Box<FunctionCallExpression>
FunctionClosureCreation: Box<FunctionClosureCreationExpression>
MethodCall: Box<MethodCallExpression>
MethodClosureCreation: Box<MethodClosureCreationExpression>
NullsafeMethodCall: Box<NullsafeMethodCallExpression>
StaticMethodCall: Box<StaticMethodCallExpression>
StaticVariableMethodCall: Box<StaticVariableMethodCallExpression>
StaticMethodClosureCreation: Box<StaticMethodClosureCreationExpression>
StaticVariableMethodClosureCreation: Box<StaticVariableMethodClosureCreationExpression>
PropertyFetch: Box<PropertyFetchExpression>
NullsafePropertyFetch: Box<NullsafePropertyFetchExpression>
StaticPropertyFetch: Box<StaticPropertyFetchExpression>
ConstantFetch: Box<ConstantFetchExpression>
Static: Box<StaticExpression>
Self_: Box<SelfExpression>
Parent: Box<ParentExpression>
ShortArray: Box<ShortArrayExpression>
Array: Box<ArrayExpression>
List: Box<ListExpression>
Closure: Box<ClosureExpression>
ArrowFunction: Box<ArrowFunctionExpression>
New: Box<NewExpression>
InterpolatedString: Box<InterpolatedStringExpression>
Heredoc: Box<HeredocExpression>
Nowdoc: Box<NowdocExpression>
ShellExec: Box<ShellExecExpression>
AnonymousClass: Box<AnonymousClassExpression>
Bool: Box<BoolExpression>
ArrayIndex: Box<ArrayIndexExpression>
"Null": Span
MagicConstant: MagicConstantExpression
ShortTernary: ShortTernaryExpression
Ternary: TernaryExpression
Coalesce: CoalesceExpression
Clone: CloneExpression
Match: MatchExpression
Throw: ThrowExpression
Yield: YieldExpression
YieldFrom: YieldFromExpression
Cast: CastExpression
Name: Name
MagicConstant: Box<MagicConstantExpression>
ShortTernary: Box<ShortTernaryExpression>
Ternary: Box<TernaryExpression>
Coalesce: Box<CoalesceExpression>
Clone: Box<CloneExpression>
Match: Box<MatchExpression>
Throw: Box<ThrowExpression>
Yield: Box<YieldExpression>
YieldFrom: Box<YieldFromExpression>
Cast: Box<CastExpression>
Name: Box<Name>
Noop: Span

MissingExpression:
Expand Down
Loading

0 comments on commit 6805d3c

Please sign in to comment.