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

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

Issue 12256036: Fix warning spotted by dartc, and make the HType understand the dynamic class. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 18511)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1528,7 +1528,9 @@
} else if (target == backend.jsStringConcat) {
push(new js.Binary('+', object, arguments[0]), node);
return;
- } else if (target.isNative() && !compiler.enableTypeAssertions) {
+ } else if (target.isNative()
+ && !compiler.enableTypeAssertions
+ && target.isFunction()) {
// Enable direct calls to a native method only if we don't
// run in checked mode, where the Dart version may have
// type annotations on parameters and return type that it
@@ -1540,7 +1542,8 @@
// have the right type. And we could do the closure
// conversion as well as the return type annotation check.
bool canInlineNativeCall = true;
- target.computeSignature(compiler).forEachParameter((Element element) {
+ FunctionElement function = target;
+ function.computeSignature(compiler).forEachParameter((Element element) {
DartType type = element.computeType(compiler).unalias(compiler);
if (type is FunctionType) {
canInlineNativeCall = false;
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698