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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1023673012: Emit diagnostics for bad NSM implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 3559724bea44f8bc7922f4c0dd156e70dd7b85b9..9f01c25031c0b608ae7114c43d278b8c15be58d7 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -1115,6 +1115,11 @@ class JavaScriptBackend extends Backend {
rti.computeClassesNeedingRti();
}
+ onInferenceComplete() {
+ super.onInferenceComplete();
+ noSuchMethodRegistry.onInferenceComplete();
+ }
+
void registerGetRuntimeTypeArgument(Registry registry) {
enqueueInResolution(getGetRuntimeTypeArgument(), registry);
enqueueInResolution(getGetTypeArgumentByIndex(), registry);
@@ -1216,7 +1221,7 @@ class JavaScriptBackend extends Backend {
enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry);
}
- void registerNoSuchMethod(Element noSuchMethod) {
+ void registerNoSuchMethod(FunctionElement noSuchMethod) {
noSuchMethodRegistry.registerNoSuchMethod(noSuchMethod);
}
@@ -1399,6 +1404,7 @@ class JavaScriptBackend extends Backend {
int assembleProgram() {
int programSize = emitter.assembleProgram();
+ noSuchMethodRegistry.emitDiagnostic();
int totalMethodCount = generatedCode.length;
if (totalMethodCount != preMirrorsMethodCount) {
int mirrorCount = totalMethodCount - preMirrorsMethodCount;

Powered by Google App Engine
This is Rietveld 408576698