Rewrite the invoke stubs to use JValue[]s.
The tests were only testing the static stubs, so extend the tests to include
non-static stubs too.
Also add just enough of an ARM disassembler to disassemble the invoke stubs.
Change-Id: If71dfb66b8b8188f9d871914f0eaf1013c9993b9
diff --git a/test/NonStaticLeafMethods/NonStaticLeafMethods.java b/test/NonStaticLeafMethods/NonStaticLeafMethods.java
new file mode 100644
index 0000000..28e03c6
--- /dev/null
+++ b/test/NonStaticLeafMethods/NonStaticLeafMethods.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+class NonStaticLeafMethods {
+ NonStaticLeafMethods() {
+ }
+ void nop() {
+ }
+ byte identity(byte x) {
+ return x;
+ }
+ int identity(int x) {
+ return x;
+ }
+ int sum(int a, int b) {
+ return a + b;
+ }
+ int sum(int a, int b, int c) {
+ return a + b + c;
+ }
+ int sum(int a, int b, int c, int d) {
+ return a + b + c + d;
+ }
+ int sum(int a, int b, int c, int d, int e) {
+ return a + b + c + d + e;
+ }
+ double identity(double x) {
+ return x;
+ }
+ double sum(double a, double b) {
+ return a + b;
+ }
+ double sum(double a, double b, double c) {
+ return a + b + c;
+ }
+ double sum(double a, double b, double c, double d) {
+ return a + b + c + d;
+ }
+ double sum(double a, double b, double c, double d, double e) {
+ return a + b + c + d + e;
+ }
+}