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

Unified Diff: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart

Issue 1148343004: Remove ConstantExpression.value (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update comments. 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
Index: pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
index 7d5122ba4acbb047720a26c9a85d9e6aed2f67d5..2e9ed2176bff4f0f7769ce828e0fe93f3f5c7693 100644
--- a/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/parameter_stub_generator.dart
@@ -100,12 +100,11 @@ class ParameterStubGenerator {
parametersBuffer[optionalParameterStart + index] =
new jsAst.Parameter(jsName);
} else {
- ConstantExpression constant = handler.getConstantForVariable(element);
- if (constant == null) {
+ ConstantValue value = handler.getConstantValueForVariable(element);
+ if (value == null) {
argumentsBuffer[count] =
emitter.constantReference(new NullConstantValue());
} else {
- ConstantValue value = constant.value;
if (!value.isNull) {
// If the value is the null constant, we should not pass it
// down to the native method.
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698