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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 11052011: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index f57db2a62021e75825c97ae53a1f17e569874982..fc4265a7f914139e80ce4ae6802130cf2cf814a1 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -196,8 +196,9 @@ class SsaBuilderTask extends CompilerTask {
// If there is an estimate of the parameter types assume these types
// when compiling.
+ FunctionElement function = element;
ahe 2012/10/03 14:56:33 The test above could fail for things that aren't f
karlklose 2012/10/04 08:50:00 I added a TODO and an else branch that throws an i
OptionalParameterTypes defaultValueTypes = null;
- FunctionSignature signature = element.computeSignature(compiler);
+ FunctionSignature signature = function.computeSignature(compiler);
if (signature.optionalParameterCount > 0) {
defaultValueTypes =
new OptionalParameterTypes(signature.optionalParameterCount);
@@ -1334,7 +1335,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
// for us here?
LibraryElement library = body.getLibrary();
Selector selector = new Selector.call(name, library, arity);
- HInstruction invoke = new HInvokeDynamicMethod(selector, bodyCallInputs);
+ HInvokeDynamic invoke =
+ new HInvokeDynamicMethod(selector, bodyCallInputs);
invoke.element = body;
add(invoke);
}
@@ -2614,8 +2616,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
// TODO(johnniwinther): Try to eliminate the need to distinguish declaration
// and implementation signatures. Currently it is need because the
// signatures have different elements for parameters.
- FunctionSignature params
- = function.implementation.computeSignature(compiler);
+ FunctionElement implementation = function.implementation;
+ FunctionSignature params = implementation.computeSignature(compiler);
if (params.optionalParameterCount !== 0) {
compiler.cancel(
'JS_TO_CLOSURE does not handle closure with optional parameters',

Powered by Google App Engine
This is Rietveld 408576698