Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 2538643002: Handle "as" in kernel with ir.AsExpression case. (Closed)

Created:
4 years ago by Emily Fortuna
Modified:
4 years ago
Reviewers:
sra1
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Handle "as" in kernel with ir.AsExpression case. BUG=https://github.com/dart-lang/sdk/issues/27394 R=sra@google.com Committed: https://github.com/dart-lang/sdk/commit/ecb9b3618a5fa4461eb02bffaa96cafbb87f5abd

Patch Set 1 : . #

Total comments: 2

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M pkg/compiler/lib/src/ssa/builder_kernel.dart View 1 chunk +35 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Emily Fortuna
4 years ago (2016-11-29 02:35:39 UTC) #3
sra1
LGTM with test fix (or modifying a language test to cover this case) https://codereview.chromium.org/2538643002/diff/20001/tests/compiler/dart2js_extra/as_operator_test.dart File ...
4 years ago (2016-11-29 03:39:47 UTC) #4
Emily Fortuna
Committed patchset #2 (id:40001) manually as ecb9b3618a5fa4461eb02bffaa96cafbb87f5abd (presubmit successful).
4 years ago (2016-11-29 20:46:49 UTC) #6
Emily Fortuna
4 years ago (2016-11-29 20:47:52 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2538643002/diff/20001/tests/compiler/dart2js_...
File tests/compiler/dart2js_extra/as_operator_test.dart (right):

https://codereview.chromium.org/2538643002/diff/20001/tests/compiler/dart2js_...
tests/compiler/dart2js_extra/as_operator_test.dart:21: Expect.equals(5, (c as
C).foo());
On 2016/11/29 03:39:47, sra1 wrote:
> It is possible that these are optimized away completely.
> You could make one of the 'as' expressions (b or c) have an input that is not
> directly the HCreate with a known type.
> 
> if (confuse(false)) c = new A();
> 
> @NoInline() @AssumeDynamic()
> confuse(x) => x;
> 
> If there is already a language test that does this, nevermind.

found the language test in type_error_test. removing this test.

Powered by Google App Engine
This is Rietveld 408576698