Mercurial > hg > truffle
comparison src/share/vm/interpreter/bytecodeInterpreter.hpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | bfd9d884693d |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
64 | 64 |
65 | 65 |
66 typedef class BytecodeInterpreter* interpreterState; | 66 typedef class BytecodeInterpreter* interpreterState; |
67 | 67 |
68 struct call_message { | 68 struct call_message { |
69 class Method* _callee; // method to call during call_method request | 69 class Method* _callee; /* method to call during call_method request */ |
70 address _callee_entry_point; // address to jump to for call_method request | 70 address _callee_entry_point; /* address to jump to for call_method request */ |
71 int _bcp_advance; // size of the invoke bytecode operation | 71 int _bcp_advance; /* size of the invoke bytecode operation */ |
72 }; | 72 }; |
73 | 73 |
74 struct osr_message { | 74 struct osr_message { |
75 address _osr_buf; // the osr buffer | 75 address _osr_buf; /* the osr buffer */ |
76 address _osr_entry; // the entry to the osr method | 76 address _osr_entry; /* the entry to the osr method */ |
77 }; | 77 }; |
78 | 78 |
79 struct osr_result { | 79 struct osr_result { |
80 nmethod* nm; // osr nmethod | 80 nmethod* nm; /* osr nmethod */ |
81 address return_addr; // osr blob return address | 81 address return_addr; /* osr blob return address */ |
82 }; | 82 }; |
83 | 83 |
84 // Result returned to frame manager | 84 // Result returned to frame manager |
85 union frame_manager_message { | 85 union frame_manager_message { |
86 call_message _to_call; // describes callee | 86 call_message _to_call; /* describes callee */ |
87 osr_message _osr; // describes the osr | 87 Bytecodes::Code _return_kind; /* i_return, a_return, ... */ |
88 osr_result _osr_result; // result of OSR request | 88 osr_message _osr; /* describes the osr */ |
89 osr_result _osr_result; /* result of OSR request */ | |
89 }; | 90 }; |
90 | 91 |
91 class BytecodeInterpreter : StackObj { | 92 class BytecodeInterpreter : StackObj { |
92 friend class SharedRuntime; | 93 friend class SharedRuntime; |
93 friend class AbstractInterpreterGenerator; | 94 friend class AbstractInterpreterGenerator; |
112 call_method, // request for new frame from interpreter, manager responds with method_entry | 113 call_method, // request for new frame from interpreter, manager responds with method_entry |
113 return_from_method, // request from interpreter to unwind, manager responds with method_continue | 114 return_from_method, // request from interpreter to unwind, manager responds with method_continue |
114 more_monitors, // need a new monitor | 115 more_monitors, // need a new monitor |
115 throwing_exception, // unwind stack and rethrow | 116 throwing_exception, // unwind stack and rethrow |
116 popping_frame, // unwind call and retry call | 117 popping_frame, // unwind call and retry call |
117 do_osr, // request this invocation be OSR's | 118 do_osr // request this invocation be OSR's |
118 early_return // early return as commanded by jvmti | |
119 }; | 119 }; |
120 | 120 |
121 private: | 121 private: |
122 JavaThread* _thread; // the vm's java thread pointer | 122 JavaThread* _thread; // the vm's java thread pointer |
123 address _bcp; // instruction pointer | 123 address _bcp; // instruction pointer |
214 inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } | 214 inline void set_osr_buf(address buf) { _result._osr._osr_buf = buf; } |
215 inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } | 215 inline void set_osr_entry(address entry) { _result._osr._osr_entry = entry; } |
216 inline int bcp_advance() { return _result._to_call._bcp_advance; } | 216 inline int bcp_advance() { return _result._to_call._bcp_advance; } |
217 inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } | 217 inline void set_bcp_advance(int count) { _result._to_call._bcp_advance = count; } |
218 | 218 |
219 inline void set_return_kind(Bytecodes::Code kind) { _result._return_kind = kind; } | |
220 | |
219 inline interpreterState prev() { return _prev_link; } | 221 inline interpreterState prev() { return _prev_link; } |
220 | 222 |
221 inline intptr_t* stack() { return _stack; } | 223 inline intptr_t* stack() { return _stack; } |
222 inline void set_stack(intptr_t* new_stack) { _stack = new_stack; } | 224 inline void set_stack(intptr_t* new_stack) { _stack = new_stack; } |
223 | 225 |