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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 968843003: Implement type argument access and reification of runtime types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unbreak long line. Created 5 years, 10 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/compiler/lib/src/tree_ir/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 24255022ee55661d1ccd5e8f767b72ff6fa704fd..2e8ace867f7ec4f812dbee52c451901a559df761 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -125,6 +125,8 @@ class Builder implements cps_ir.Visitor<Node> {
VariableUse getVariableUse(cps_ir.Reference<cps_ir.Primitive> reference) {
Variable variable = getVariable(reference.definition);
if (variable == null) {
+ // Note: this may fail because you forgot to implement a visit-function
+ // in the RegisterAllocator.
internalError(
CURRENT_ELEMENT_SPANNABLE,
"Reference to ${reference.definition} has no register");
@@ -634,5 +636,12 @@ class Builder implements cps_ir.Visitor<Node> {
Expression visitIsTrue(cps_ir.IsTrue node) {
return getVariableUse(node.value);
}
-}
+ Expression visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
+ return new ReifyRuntimeType(getVariableUse(node.value));
+ }
+
+ Expression visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
+ return new ReadTypeVariable(node.variable, getVariableUse(node.target));
+ }
+}
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698