blob: a22f3891acc6ebe12d2b040b5cd73ca79d038755 [file] [log] [blame]
Alex Lightd8936da2016-11-28 16:24:32 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17class Transform {
18 private void Start() {
19 if (Main.doPrint()) {
20 System.out.println("hello - private");
21 }
22 }
23
24 private void Finish() {
25 if (Main.doPrint()) {
26 System.out.println("goodbye - private");
27 }
28 }
29
30 public void sayHi(Runnable r) {
31 if (Main.doPrint()) {
32 System.out.println("Pre Start private method call");
33 }
34 Start();
35 if (Main.doPrint()) {
36 System.out.println("Post Start private method call");
37 }
38 // TODO Revist with b/33616143
39 // TODO Uncomment this
40 // r.run();
41 // TODO This is a very temporary fix until we get either deoptimization near runtime frames
42 // working, forcing current method to be always read from the stack or both working.
43 Main.doCall(r);
44 if (Main.doPrint()) {
45 System.out.println("Pre Finish private method call");
46 }
47 Finish();
48 if (Main.doPrint()) {
49 System.out.println("Post Finish private method call");
50 }
51 }
52}