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

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

Issue 614993002: Rename Constant to ConstantValue and ConstExp to ConstantExpression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 3 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/new_js_emitter/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/new_js_emitter/emitter.dart b/sdk/lib/_internal/compiler/implementation/new_js_emitter/emitter.dart
index 49f4e317ff81ac70451d64f1b657fc77730b2ac9..243b05f4f56894f69312ed39af7aee92ba806674 100644
--- a/sdk/lib/_internal/compiler/implementation/new_js_emitter/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/new_js_emitter/emitter.dart
@@ -9,7 +9,7 @@ import 'model_emitter.dart';
import '../common.dart';
import '../js/js.dart' as js;
-import '../constants/values.dart' show PrimitiveConstant;
+import '../constants/values.dart' show PrimitiveConstantValue;
import '../tree/tree.dart' show DartString;
import '../js_backend/js_backend.dart' show Namer, JavaScriptBackend;
@@ -200,7 +200,7 @@ class Emitter implements emitterTask.Emitter {
}
// TODO(floitsch): copied from OldEmitter. Adjust or share.
- bool isConstantInlinedOrAlreadyEmitted(Constant constant) {
+ bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant) {
if (constant.isFunction) return true; // Already emitted.
if (constant.isPrimitive) return true; // Inlined.
if (constant.isDummy) return true; // Inlined.
@@ -212,7 +212,7 @@ class Emitter implements emitterTask.Emitter {
}
// TODO(floitsch): copied from OldEmitter. Adjust or share.
- int compareConstants(Constant a, Constant b) {
+ int compareConstants(ConstantValue a, ConstantValue b) {
// Inlined constants don't affect the order and sometimes don't even have
// names.
int cmp1 = isConstantInlinedOrAlreadyEmitted(a) ? 0 : 1;
@@ -239,15 +239,15 @@ class Emitter implements emitterTask.Emitter {
return js.string("init.$global");
}
- js.Expression constantReference(Constant value) {
+ js.Expression constantReference(ConstantValue value) {
if (!value.isPrimitive) return js.string("<<unimplemented>>");
- PrimitiveConstant constant = value;
+ PrimitiveConstantValue constant = value;
if (constant.isBool) return new js.LiteralBool(constant.isTrue);
if (constant.isString) {
- DartString dartString = constant.value;
+ DartString dartString = constant.primitiveValue;
return js.string(dartString.slowToString());
}
- if (constant.isNum) return js.number(constant.value);
+ if (constant.isNum) return js.number(constant.primitiveValue);
if (constant.isNull) return new js.LiteralNull();
return js.string("<<unimplemented>>");
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/native/ssa.dart ('k') | sdk/lib/_internal/compiler/implementation/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698