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

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

Issue 14404004: Throw NoSuchMethod or ArgumentError instead of generating a bailout, when we know the next instruct… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 21808)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -2494,7 +2494,10 @@
if (value != null) {
stack.add(graph.addConstant(value));
} else if (element.isField() && isLazilyInitialized(element)) {
- push(new HLazyStatic(element));
+ HInstruction instruction = new HLazyStatic(element);
+ instruction.instructionType =
+ new HType.inferredTypeForElement(element, compiler);
+ push(instruction);
} else {
if (element.isGetter()) {
Selector selector = elements.getSelector(send);
@@ -2505,9 +2508,16 @@
}
// TODO(5346): Try to avoid the need for calling [declaration] before
// creating an [HStatic].
- push(new HStatic(element.declaration));
+ HInstruction instruction = new HStatic(element.declaration);
if (element.isGetter()) {
- push(new HInvokeStatic(<HInstruction>[pop()], HType.UNKNOWN));
+ add(instruction);
+ push(new HInvokeStatic(
+ <HInstruction>[instruction],
+ new HType.inferredReturnTypeForElement(element, compiler)));
+ } else {
+ instruction.instructionType =
+ new HType.inferredTypeForElement(element, compiler);
+ push(instruction);
}
}
} else if (Elements.isInstanceSend(send, elements)) {

Powered by Google App Engine
This is Rietveld 408576698