a02596b28f
Reduces the usage of temps in the following cases to remove unneeded StoreLocal/Push instructions: Refactors visitVariableSet so that a temporary is used only if the variable is captured and the result is not ignored. (That is, sets of uncaptured late final fields no longer need a temporary.) Only allocate a temp for FunctionDeclarations and FunctionExpressions if there are function type arguments to capture or if the function is generic (in which case the delayed type arguments field must be empty-initialized, not null initialized). ----- Clean up how source positions are emitted to both be more consistent and to also move some source position emissions closer to the actual instruction that performs the operation: Move emission of debugging information for FunctionDeclaration, and VariableSet to when the variable is actually set. The emission in VariableDeclaration stays before the initializer as that's when debugger tests expect to pause at it. Change the implementation of _genConditionAndJumpIf to use if/else chaining instead of early returns so that the condition's source position can be recorded once before the if/then chain and then the previous source position restored afterward the chain. This means that _emitDebuggerInformation can be used. _generateNonLocalControlTransfer is only called during visit methods where the parent call to _generateNode has already recorded the from node's position, so there's no need to record it during that call. Instead, move the emission of the source position to the jump within the passed continuation. Remove _emitLocalSourcePosition, since it is no longer used. Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try Change-Id: Id7722146769c57713ae466d67401258c010cee37 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/473380 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com>
This package contains Dart bytecode compiler.
Status: experimental
NOTE: This package is currently experimental and not published or included in the SDK.
Do not take dependency on this package unless you are prepared for breaking changes and possibly removal of this code at any point in time.