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

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

Issue 10911181: Collect getters in a FunctionSet while resolving. (Closed) Base URL: http://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 | « lib/compiler/implementation/ssa/nodes.dart ('k') | lib/compiler/implementation/universe/function_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/optimize.dart
===================================================================
--- lib/compiler/implementation/ssa/optimize.dart (revision 12169)
+++ lib/compiler/implementation/ssa/optimize.dart (working copy)
@@ -696,7 +696,7 @@
const SourceString('length'),
lengthInterceptor.getLibrary()); // TODO(kasperl): Wrong.
HInvokeInterceptor length = new HInvokeInterceptor(
- selector, <HInstruction>[interceptor, receiver]);
+ selector, <HInstruction>[interceptor, receiver], true);
types[length] = HType.INTEGER;
node.block.addBefore(node, length);
@@ -755,6 +755,9 @@
bool isDeadCode(HInstruction instruction) {
return !instruction.hasSideEffects(types)
&& instruction.usedBy.isEmpty()
+ // A dynamic getter that has no side effect can still throw
+ // a NoSuchMethodError or a NullPointerException.
+ && instruction is !HInvokeDynamicGetter
&& instruction is !HCheck
&& instruction is !HTypeGuard
&& !instruction.isControlFlow();
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | lib/compiler/implementation/universe/function_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698