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

Unified Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 10914097: Fix type-annotation and add another tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | tests/language/lazy_static4_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js_backend/backend.dart
diff --git a/lib/compiler/implementation/js_backend/backend.dart b/lib/compiler/implementation/js_backend/backend.dart
index d34fc632d0e5fa3a41b70ca4936b08ce43bdeed8..11dec00646645f8338222b8c016866a7db925759 100644
--- a/lib/compiler/implementation/js_backend/backend.dart
+++ b/lib/compiler/implementation/js_backend/backend.dart
@@ -31,8 +31,9 @@ class ReturnInfo {
}
}
- addCompiledFunction(FunctionElement function) =>
- compiledFunctions.add(function);
+ // Note that lazy initializers are treated like functions (but are not
+ // of type [FunctionElement].
+ addCompiledFunction(Element function) => compiledFunctions.add(function);
}
class HTypeList {
@@ -552,7 +553,7 @@ class JavaScriptBackend extends Backend {
* function [callee] has not yet been compiled the returned type is [null].
*/
HType optimisticReturnTypesWithRecompilationOnTypeChange(
- FunctionElement caller, FunctionElement callee) {
+ Element caller, FunctionElement callee) {
returnInfo.putIfAbsent(callee, () => new ReturnInfo.unknownType());
ReturnInfo info = returnInfo[callee];
if (info.returnType != HType.UNKNOWN && caller != null) {
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | tests/language/lazy_static4_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698