Mercurial > hg > truffle
comparison src/share/vm/code/scopeDesc.hpp @ 900:9987d9d5eb0e
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
Summary: developed a reexecute logic for the interpreter to reexecute the bytecode when deopt happens
Reviewed-by: kvn, never, jrose, twisti
author | cfang |
---|---|
date | Fri, 31 Jul 2009 17:12:33 -0700 |
parents | a61af66fc99e |
children | 72088be4b386 |
comparison
equal
deleted
inserted
replaced
899:55cb84cd1247 | 900:9987d9d5eb0e |
---|---|
37 PcDesc* pc_desc = code->pc_desc_at(pc); | 37 PcDesc* pc_desc = code->pc_desc_at(pc); |
38 assert(pc_desc != NULL, "Must be able to find matching PcDesc"); | 38 assert(pc_desc != NULL, "Must be able to find matching PcDesc"); |
39 DebugInfoReadStream buffer(code, pc_desc->scope_decode_offset()); | 39 DebugInfoReadStream buffer(code, pc_desc->scope_decode_offset()); |
40 int ignore_sender = buffer.read_int(); | 40 int ignore_sender = buffer.read_int(); |
41 _method = methodOop(buffer.read_oop()); | 41 _method = methodOop(buffer.read_oop()); |
42 _bci = buffer.read_bci(); | 42 bool dummy_reexecute; //only methodOop and bci are needed! |
43 _bci = buffer.read_bci_and_reexecute(dummy_reexecute); | |
43 } | 44 } |
44 | 45 |
45 methodOop method() { return _method; } | 46 methodOop method() { return _method; } |
46 int bci() { return _bci; } | 47 int bci() { return _bci; } |
47 }; | 48 }; |
58 // "obj_decode_offset" argument. (We don't use a default argument to | 59 // "obj_decode_offset" argument. (We don't use a default argument to |
59 // avoid a .hpp-.hpp dependency.) | 60 // avoid a .hpp-.hpp dependency.) |
60 ScopeDesc(const nmethod* code, int decode_offset); | 61 ScopeDesc(const nmethod* code, int decode_offset); |
61 | 62 |
62 // JVM state | 63 // JVM state |
63 methodHandle method() const { return _method; } | 64 methodHandle method() const { return _method; } |
64 int bci() const { return _bci; } | 65 int bci() const { return _bci; } |
66 bool should_reexecute() const { return _reexecute; } | |
65 | 67 |
66 GrowableArray<ScopeValue*>* locals(); | 68 GrowableArray<ScopeValue*>* locals(); |
67 GrowableArray<ScopeValue*>* expressions(); | 69 GrowableArray<ScopeValue*>* expressions(); |
68 GrowableArray<MonitorValue*>* monitors(); | 70 GrowableArray<MonitorValue*>* monitors(); |
69 GrowableArray<ScopeValue*>* objects(); | 71 GrowableArray<ScopeValue*>* objects(); |
84 ScopeDesc(const ScopeDesc* parent); | 86 ScopeDesc(const ScopeDesc* parent); |
85 | 87 |
86 // JVM state | 88 // JVM state |
87 methodHandle _method; | 89 methodHandle _method; |
88 int _bci; | 90 int _bci; |
91 bool _reexecute; | |
89 | 92 |
90 // Decoding offsets | 93 // Decoding offsets |
91 int _decode_offset; | 94 int _decode_offset; |
92 int _sender_decode_offset; | 95 int _sender_decode_offset; |
93 int _locals_decode_offset; | 96 int _locals_decode_offset; |