22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "interpreter/interpreter.hpp" |
26 #include "interpreter/interpreter.hpp" |
27 #include "interpreter/interpreterGenerator.hpp" |
|
28 #include "oops/constMethod.hpp" |
27 #include "oops/constMethod.hpp" |
29 #include "oops/method.hpp" |
28 #include "oops/method.hpp" |
30 #include "runtime/arguments.hpp" |
29 #include "runtime/arguments.hpp" |
31 #include "runtime/frame.inline.hpp" |
30 #include "runtime/frame.inline.hpp" |
32 #include "runtime/synchronizer.hpp" |
31 #include "runtime/synchronizer.hpp" |
33 #include "utilities/macros.hpp" |
32 #include "utilities/macros.hpp" |
34 |
33 |
|
34 // Size of interpreter code. Increase if too small. Interpreter will |
|
35 // fail with a guarantee ("not enough space for interpreter generation"); |
|
36 // if too small. |
|
37 // Run with +PrintInterpreter to get the VM to print out the size. |
|
38 // Max size with JVMTI |
|
39 #ifdef _LP64 |
|
40 // The sethi() instruction generates lots more instructions when shell |
|
41 // stack limit is unlimited, so that's why this is much bigger. |
|
42 int TemplateInterpreter::InterpreterCodeSize = 260 * K; |
|
43 #else |
|
44 int TemplateInterpreter::InterpreterCodeSize = 230 * K; |
|
45 #endif |
35 |
46 |
36 int AbstractInterpreter::BasicType_as_index(BasicType type) { |
47 int AbstractInterpreter::BasicType_as_index(BasicType type) { |
37 int i = 0; |
48 int i = 0; |
38 switch (type) { |
49 switch (type) { |
39 case T_BOOLEAN: i = 0; break; |
50 case T_BOOLEAN: i = 0; break; |
105 int monitors, |
116 int monitors, |
106 int callee_params, |
117 int callee_params, |
107 int callee_locals, |
118 int callee_locals, |
108 bool is_top_frame) { |
119 bool is_top_frame) { |
109 // Note: This calculation must exactly parallel the frame setup |
120 // Note: This calculation must exactly parallel the frame setup |
110 // in InterpreterGenerator::generate_fixed_frame. |
121 // in TemplateInterpreterGenerator::generate_fixed_frame. |
111 |
122 |
112 int monitor_size = monitors * frame::interpreter_frame_monitor_size(); |
123 int monitor_size = monitors * frame::interpreter_frame_monitor_size(); |
113 |
124 |
114 assert(monitor_size == round_to(monitor_size, WordsPerLong), "must align"); |
125 assert(monitor_size == round_to(monitor_size, WordsPerLong), "must align"); |
115 |
126 |