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

Side by Side Diff: frog/value.dart

Issue 9107031: fix Library*NegativeTests (and a couple Prefix ones by accident) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Represents a meta-value for code generation. 6 * Represents a meta-value for code generation.
7 */ 7 */
8 class Value { 8 class Value {
9 Type _type; 9 Type _type;
10 10
11 /** The javascript code to generate this value. */ 11 /** The javascript code to generate this value. */
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 983
984 class MapValue extends EvaluatedValue { 984 class MapValue extends EvaluatedValue {
985 List<Value> values; 985 List<Value> values;
986 986
987 MapValue(this.values, bool isConst, Type type, SourceSpan span): 987 MapValue(this.values, bool isConst, Type type, SourceSpan span):
988 super(isConst, type, span); 988 super(isConst, type, span);
989 989
990 String get code() { 990 String get code() {
991 // Cache? 991 // Cache?
992 var items = new ListValue(values, false, world.listType, span); 992 var items = new ListValue(values, false, world.listType, span);
993 var tp = world.corelib.topType; 993 var tp = world.coreimpl.topType;
994 Member f = isConst ? tp.getMember('_constMap') : tp.getMember('_map'); 994 Member f = isConst ? tp.getMember('_constMap') : tp.getMember('_map');
995 // TODO(jimhug): Clean up invoke signature 995 // TODO(jimhug): Clean up invoke signature
996 var value = f.invoke(null, null, new Value.type(tp, null), 996 var value = f.invoke(null, null, new Value.type(tp, null),
997 new Arguments(null, [items])); 997 new Arguments(null, [items]));
998 return value.code; 998 return value.code;
999 } 999 }
1000 1000
1001 GlobalValue getGlobalValue() { 1001 GlobalValue getGlobalValue() {
1002 assert(isConst); 1002 assert(isConst);
1003 1003
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 } 1225 }
1226 1226
1227 _ensureCode(); 1227 _ensureCode();
1228 return null; 1228 return null;
1229 } 1229 }
1230 } 1230 }
1231 1231
1232 String _escapeForComment(String text) { 1232 String _escapeForComment(String text) {
1233 return text.replaceAll('/*', '/ *').replaceAll('*/', '* /'); 1233 return text.replaceAll('/*', '/ *').replaceAll('*/', '* /');
1234 } 1234 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698