Annotate all instructions with position information.
This addresses several outstanding issues: blocks can now be reordered without
issue, if positions are present all instructions will be annotated, in
particular move-exceptions for synchornized blocks. This change requires that
all IR tranformations properly transfer position information for each
instruction.
Bug: 65618023
Bug: 65567013
Bug: 65474153
Change-Id: I9ded6003c2b349e738f50e7be58f35536bc5b08b
diff --git a/src/test/debugTestResources/SharedCode.java b/src/test/debugTestResources/SharedCode.java
new file mode 100644
index 0000000..f88fdbd
--- /dev/null
+++ b/src/test/debugTestResources/SharedCode.java
@@ -0,0 +1,25 @@
+// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+public class SharedCode {
+
+ public static int sharedIf(int x) {
+ if (x == 0) {
+ doit(1); doit(2); doit(1); doit(2);
+ } else {
+ doit(1); doit(2); doit(1); doit(2);
+ }
+ return x;
+ }
+
+
+ public static void doit(int x) {
+ // nothing to do really.
+ }
+
+ public static void main(String[] args) {
+ System.out.println(sharedIf(0));
+ System.out.println(sharedIf(1));
+ }
+}