Index: pkg/compiler/lib/src/ssa/codegen.dart |
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart |
index ea200c3cb337ce2af6834488c480f7351e302bed..6e5b80e6d313aff703df3de9aa2cb0a3be67c1b2 100644 |
--- a/pkg/compiler/lib/src/ssa/codegen.dart |
+++ b/pkg/compiler/lib/src/ssa/codegen.dart |
@@ -1624,16 +1624,28 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
Element element = node.element; |
List<DartType> instantiatedTypes = node.instantiatedTypes; |
- registry.registerStaticInvocation(element); |
- |
if (instantiatedTypes != null && !instantiatedTypes.isEmpty) { |
instantiatedTypes.forEach((type) { |
registry.registerInstantiatedType(type); |
}); |
} |
- push(backend.emitter.staticFunctionAccess(node.element)); |
- push(new js.Call(pop(), visitArguments(node.inputs, start: 0)), node); |
+ List<js.Expression> arguments = visitArguments(node.inputs, start: 0); |
+ |
+ if (element == backend.getCheckConcurrentModificationError() && |
floitsch
2015/04/17 12:40:34
Add comments:
We inline the checkConcurrentModific
sra1
2015/04/17 18:16:56
Done.
|
+ arguments.length == 2) { |
floitsch
2015/04/17 12:40:33
Is that check necessary? or should it be an assert
sra1
2015/04/17 18:16:56
Done.
|
+ Element throwFunction = backend.getThrowConcurrentModificationError(); |
+ registry.registerStaticInvocation(throwFunction); |
+ push(js.js('# || (0, #)(#)',[ |
floitsch
2015/04/17 12:40:33
add comment for the "(0, #)".
sra1
2015/04/17 18:16:56
Done.
|
+ arguments[0], |
+ backend.emitter.staticFunctionAccess(throwFunction), |
+ arguments[1]])); |
+ } else { |
+ registry.registerStaticInvocation(element); |
+ push(backend.emitter.staticFunctionAccess(element)); |
+ push(new js.Call(pop(), arguments), node); |
+ } |
+ |
} |
visitInvokeSuper(HInvokeSuper node) { |