Skip to content

Commit

Permalink
remove unneeded workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
bfarmer67 committed Dec 23, 2024
1 parent 987d383 commit a67c279
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
3 changes: 0 additions & 3 deletions src/Hyperbee.Expressions/CompilerServices/JumpTableBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public static Expression Build( StateContext.Scope current, IReadOnlyList<StateC

return Switch(
stateField,
#if FAST_COMPILER
Empty(),
#endif
[.. jumpTable]
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,12 @@ Expression Expression()
{
var stateOrder = context.StateNode.StateOrder;

Expression defaultBody;

if ( DefaultNode != null )
{
defaultBody = GotoOrFallThrough(
stateOrder,
DefaultNode,
allowNull: true
);
}
#if FAST_COMPILER
else
{
defaultBody = Empty();
}
#endif
var cases = CaseNodes
.Select( switchCase => switchCase.Reduce( stateOrder ) )
.ToArray();

return Switch(
SwitchValue,
#if FAST_COMPILER
defaultBody,
#endif
cases
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ List<Expression> Expressions()
),
Switch( // Handle error
TryStateVariable,
#if FAST_COMPILER
Empty(),
#endif
switchCases
)
];
Expand Down

0 comments on commit a67c279

Please sign in to comment.