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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart

Issue 1134063002: dart2js cps: Introduce GetStatic/SetStatic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix SExpression parsing/unparsing Created 5 years, 7 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
« no previous file with comments | « pkg/analyzer2dart/test/sexpr_data.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
index 32974971161c87d9dd51d66ebb195a8843a92a00..18c323eef24d3e045060bc3848e792cca0a8051a 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
@@ -1085,17 +1085,13 @@ abstract class IrBuilder {
/// Create a read access of the static [field].
ir.Primitive buildStaticFieldGet(FieldElement field,
{SourceInformation sourceInformation}) {
- Selector selector = new Selector.getter(field.name, field.library);
- // TODO(karlklose,sigurdm): build different nodes for getters.
- return _buildInvokeStatic(
- field, selector, const <ir.Primitive>[], sourceInformation);
+ return addPrimitive(new ir.GetStatic(field, sourceInformation));
}
/// Create a getter invocation of the static [getter].
ir.Primitive buildStaticGetterGet(MethodElement getter,
{SourceInformation sourceInformation}) {
Selector selector = new Selector.getter(getter.name, getter.library);
- // TODO(karlklose,sigurdm): build different nodes for getters.
return _buildInvokeStatic(
getter, selector, const <ir.Primitive>[], sourceInformation);
}
@@ -1104,21 +1100,14 @@ abstract class IrBuilder {
/// [function].
ir.Primitive buildStaticFunctionGet(MethodElement function,
{SourceInformation sourceInformation}) {
- Selector selector =
- new Selector.getter(function.name, function.library);
- // TODO(karlklose,sigurdm): build different nodes for getters.
- return _buildInvokeStatic(
- function, selector, const <ir.Primitive>[], sourceInformation);
+ return addPrimitive(new ir.GetStatic(function, sourceInformation));
}
/// Create a write access to the static [field] with the [value].
ir.Primitive buildStaticFieldSet(FieldElement field,
ir.Primitive value,
{SourceInformation sourceInformation}) {
- Selector selector = new Selector.setter(field.name, field.library);
- // TODO(karlklose,sigurdm): build different nodes for setters.
- _buildInvokeStatic(
- field, selector, <ir.Primitive>[value], sourceInformation);
+ add(new ir.SetStatic(field, value, sourceInformation));
return value;
}
@@ -1127,7 +1116,6 @@ abstract class IrBuilder {
ir.Primitive value,
{SourceInformation sourceInformation}) {
Selector selector = new Selector.setter(setter.name, setter.library);
- // TODO(karlklose,sigurdm): build different nodes for setters.
_buildInvokeStatic(
setter, selector, <ir.Primitive>[value], sourceInformation);
return value;
« no previous file with comments | « pkg/analyzer2dart/test/sexpr_data.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698