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

Unified Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 48323003: Implement fromEnvironment on bool, int, String in dart2js. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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: sdk/lib/_internal/compiler/implementation/compiler.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/compiler.dart (revision 29517)
+++ sdk/lib/_internal/compiler/implementation/compiler.dart (working copy)
@@ -465,7 +465,12 @@
Element identicalFunction;
Element functionApplyMethod;
Element invokeOnMethod;
+ Element intEnvironment;
+ Element boolEnvironment;
+ Element stringEnvironment;
+ fromEnvironment(String name) => null;
+
Element get currentElement => _currentElement;
String tryToString(object) {
@@ -844,6 +849,15 @@
symbolValidatedConstructorSelector);
} else if (mirrorsUsedClass == cls) {
mirrorsUsedConstructor = cls.constructors.head;
+ } else if (intClass == cls) {
+ intEnvironment = intClass.lookupConstructor(
+ new Selector.callConstructor('fromEnvironment', null, 2));
+ } else if (stringClass == cls) {
+ stringEnvironment = stringClass.lookupConstructor(
+ new Selector.callConstructor('fromEnvironment', null, 2));
+ } else if (boolClass == cls) {
+ boolEnvironment = boolClass.lookupConstructor(
+ new Selector.callConstructor('fromEnvironment', null, 1));
kasperl 2013/10/30 13:35:25 Again, I don't really see why bool.fromEnvironment
ngeoffray 2013/10/30 15:13:59 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698