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

Issue 1969753002: Adjusts dart2js SSA builder to tolerate method type arguments. (Closed)

Created:
4 years, 7 months ago by eernst
Modified:
4 years, 7 months ago
Reviewers:
Johnni Winther
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Adjusts dart2js SSA builder to tolerate method type arguments. This CL changes `Types.getClassContext` to return null for method type arguments (indicating that the given `type` does not contain any type variables, which fits the current "ignore them" approach to that kind of type variable). It introduces a new class `MethodTypeVariableType` which models a method type variables and ensures that it is treated as `dynamic` (such that type annotations are permissive, and usages as a type expression `T` in `.. is T` or `.. as T` are treated like a malformed type). For RTI, method type variables are ignored (such that no additional classes are claimed to be needed for RTI due to method type variables, no matter how they are used). Finally, `SsaBuilder.addTypeVariableReference` generates code yielding the value `dynamic` for method type variables. Adresses issue 26436. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/ee926fac8dd4fbc1b1cec9c8e836be916baf81b1

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -8 lines) Patch
M pkg/compiler/lib/src/dart_types.dart View 2 chunks +13 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/runtime_types.dart View 1 chunk +6 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/signatures.dart View 1 chunk +4 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/resolution/type_resolver.dart View 1 chunk +0 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 chunk +11 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (2 generated)
eernst
Needs sanity checking at builder.dart:4773-4779, which may touch invariants that I don't know about (the ...
4 years, 7 months ago (2016-05-11 12:42:18 UTC) #2
Johnni Winther
lgtm https://codereview.chromium.org/1969753002/diff/1/pkg/compiler/lib/src/ssa/builder.dart File pkg/compiler/lib/src/ssa/builder.dart (right): https://codereview.chromium.org/1969753002/diff/1/pkg/compiler/lib/src/ssa/builder.dart#newcode4769 pkg/compiler/lib/src/ssa/builder.dart:4769: } else if (type is MethodTypeVariableType) { I ...
4 years, 7 months ago (2016-05-11 12:58:30 UTC) #3
eernst
4 years, 7 months ago (2016-05-11 13:04:25 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
ee926fac8dd4fbc1b1cec9c8e836be916baf81b1 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698