-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CFE] Constant transformation for expression compilation
Fixes #42240 Change-Id: Idc75e99aed6acbb67755c77faa1904183a630f91 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153355 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
- Loading branch information
Showing
10 changed files
with
120 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/const_usage.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
entry_point: "main.dart" | ||
definitions: [] | ||
position: "main.dart" | ||
expression: | | ||
const42.x |
8 changes: 8 additions & 0 deletions
8
pkg/front_end/testcases/expression/const_usage.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Errors: { | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return (#C2).{main::ConstClass::x}; | ||
constants { | ||
#C1 = 42 | ||
#C2 = main::ConstClass {x:#C1} | ||
} |
9 changes: 9 additions & 0 deletions
9
pkg/front_end/testcases/expression/const_usage_class.expression.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
entry_point: "main.dart" | ||
definitions: [] | ||
position: "main.dart#ConstClass" | ||
expression: | | ||
classConst42.x |
8 changes: 8 additions & 0 deletions
8
pkg/front_end/testcases/expression/const_usage_class.expression.yaml.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Errors: { | ||
} | ||
method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr() → dynamic | ||
return (#C2).{main::ConstClass::x}; | ||
constants { | ||
#C1 = 42 | ||
#C2 = main::ConstClass {x:#C1} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters