[L] Change in dart/sdk[main]: Support more function kinds and nodes in AST-to-IR translation

0 views
Skip to first unread message

Alexander Markov (Gerrit)

unread,
Dec 9, 2025, 1:27:08 PM12/9/25
to Alexander Markov, Slava Egorov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, Commit Queue, rev...@dartlang.org
Attention needed from Slava Egorov

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Slava Egorov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Tue, 09 Dec 2025 18:27:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
Dec 10, 2025, 8:17:50 AM12/10/25
to Alexander Markov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, Commit Queue, rev...@dartlang.org
Attention needed from Alexander Markov

Slava Egorov voted and added 2 comments

Votes added by Slava Egorov

Code-Review+1

2 comments

File pkg/cfg/lib/front_end/ast_to_ir.dart
Line 113, Patchset 1 (Latest): void _implicitGetter(ast.Field node) {
Slava Egorov . unresolved

nit: consider naming these with `build` prefix (e.g. `_buildImplicitGetter`) to make it more obvious what they do.

File pkg/cfg/lib/ir/instructions.dart
Line 946, Patchset 1 (Latest): FlowGraph graph,
Slava Egorov . unresolved

Maybe `inputCount` should have been a named parameter. Then you could use `super.` parameters here as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 13:17:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Dec 10, 2025, 11:40:26 AM12/10/25
to Alexander Markov, Slava Egorov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, Commit Queue, rev...@dartlang.org
Attention needed from Slava Egorov

Alexander Markov voted and added 3 comments

Votes added by Alexander Markov

Commit-Queue+1

3 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Alexander Markov . resolved

PTAL once again - approval was removed.

File pkg/cfg/lib/front_end/ast_to_ir.dart
Line 113, Patchset 1: void _implicitGetter(ast.Field node) {
Slava Egorov . resolved

nit: consider naming these with `build` prefix (e.g. `_buildImplicitGetter`) to make it more obvious what they do.

Alexander Markov

Done

File pkg/cfg/lib/ir/instructions.dart
Line 946, Patchset 1: FlowGraph graph,
Slava Egorov . resolved

Maybe `inputCount` should have been a named parameter. Then you could use `super.` parameters here as well.

Alexander Markov

That's an excellent suggestion! Declaration of IR instructions is now more readable and has less repetitions.

Open in Gerrit

Related details

Attention is currently required from:
  • Slava Egorov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Slava Egorov <veg...@google.com>
Gerrit-Comment-Date: Wed, 10 Dec 2025 16:40:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Slava Egorov <veg...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Slava Egorov (Gerrit)

unread,
Dec 11, 2025, 3:20:56 AM12/11/25
to Alexander Markov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, Commit Queue, rev...@dartlang.org
Attention needed from Alexander Markov

Slava Egorov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Thu, 11 Dec 2025 08:20:49 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Dec 11, 2025, 9:19:17 AM12/11/25
to Alexander Markov, Slava Egorov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, Commit Queue, rev...@dartlang.org

Alexander Markov voted and added 1 comment

Votes added by Alexander Markov

Commit-Queue+2

1 comment

Patchset-level comments
Alexander Markov . resolved

Thank you, Slava!

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
Gerrit-CC: Nate Biggs <nate...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Stephen Adams <s...@google.com>
Gerrit-CC: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Thu, 11 Dec 2025 14:19:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Dec 11, 2025, 9:19:37 AM12/11/25
to Alexander Markov, Slava Egorov, Alexander Aprelev, Stephen Adams, Nate Biggs, Nicholas Shahan, Tess Strickland, rev...@dartlang.org

Commit Queue submitted the change

Change information

Commit message:
Support more function kinds and nodes in AST-to-IR translation

Add support for getters, setters, constructors, implicit field getters,
implicit field setters, field initializers.

Support all kinds of constructor initializers, super and
constructor invocations.

Add IR instructions for field loads and stores and object allocation.
Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Reviewed-by: Slava Egorov <veg...@google.com>
Commit-Queue: Alexander Markov <alexm...@google.com>
Files:
  • M pkg/cfg/lib/front_end/ast_to_ir.dart
  • A pkg/cfg/lib/ir/field.dart
  • M pkg/cfg/lib/ir/flow_graph_builder.dart
  • M pkg/cfg/lib/ir/flow_graph_checker.dart
  • M pkg/cfg/lib/ir/functions.dart
  • M pkg/cfg/lib/ir/instructions.dart
  • M pkg/cfg/lib/ir/ir_to_text.dart
  • M pkg/cfg/lib/ir/ssa_computation.dart
  • M pkg/cfg/lib/ir/visitor.dart
  • M pkg/cfg/lib/passes/constant_propagation.dart
  • M pkg/cfg/lib/passes/simplification.dart
  • M pkg/cfg/test/ir/functions_test.dart
  • M pkg/cfg/test/ir_test.dart
  • M pkg/cfg/testcases/calls.dart
  • M pkg/cfg/testcases/calls.dart.expect
  • M pkg/cfg/testcases/types.dart
  • M pkg/cfg/testcases/types.dart.expect
  • M pkg/cfg/testcases/unreachable_ast.dart.expect
Change size: XL
Delta: 18 files changed, 968 insertions(+), 125 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Slava Egorov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ia83a3e8183958c384c2a177565abcc2b5cb0ef5e
Gerrit-Change-Number: 467121
Gerrit-PatchSet: 3
Gerrit-Owner: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Slava Egorov <veg...@google.com>
Gerrit-CC: Alexander Aprelev <a...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages