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

Unified Diff: pkg/kernel/lib/transformations/closure/converter.dart

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Reformat comment with Markdown, throw exception in type propagation Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/lib/transformations/closure/converter.dart
diff --git a/pkg/kernel/lib/transformations/closure/converter.dart b/pkg/kernel/lib/transformations/closure/converter.dart
index 2f64971e0542daccbff2d2af1b5be1b8364ae758..b081d82911cba72c45be47e9184638d12470cca8 100644
--- a/pkg/kernel/lib/transformations/closure/converter.dart
+++ b/pkg/kernel/lib/transformations/closure/converter.dart
@@ -52,6 +52,7 @@ import '../../ast.dart'
VariableDeclaration,
VariableGet,
VariableSet,
+ VectorType,
transformList;
import '../../frontend/accessors.dart' show VariableAccessor;
@@ -263,7 +264,7 @@ class ClosureConverter extends Transformer {
VariableDeclaration contextVariable = new VariableDeclaration(
"#contextParameter",
- type: contextClass.rawType,
+ type: const VectorType(),
isFinal: true);
Context parent = context;
context = context.toNestedContext(
@@ -315,13 +316,13 @@ class ClosureConverter extends Transformer {
/// Add a new class to the current library that looks like this:
///
/// class Closure#0 extends core::Object implements core::Function {
- /// field _in::Context context;
- /// constructor •(final _in::Context #t1) → dynamic
- /// : self::Closure 0::context = #t1
+ /// field Vector context;
+ /// constructor •(final Vector #t1) → dynamic
+ /// : self::Closure#0::context = #t1
/// ;
/// method call(/* The parameters of [function] */) → dynamic {
/// /// #t2 is [contextVariable].
- /// final _in::Context #t2 = this.{self::Closure#0::context};
+ /// final Vector #t2 = this.{self::Closure#0::context};
/// /* The body of [function]. */
/// }
/// }
@@ -340,7 +341,7 @@ class ClosureConverter extends Transformer {
Field contextField = new Field(
// TODO(ahe): Rename to #context.
new Name("context"),
- type: contextClass.rawType,
+ type: const VectorType(),
fileUri: currentFileUri);
Class closureClass = createClosureClass(function,
fields: [contextField], substitution: substitution);
« no previous file with comments | « pkg/kernel/lib/transformations/closure/context.dart ('k') | pkg/kernel/lib/transformations/closure/mock.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698