Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/deoptimization.cpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | 12706c5b39bc 1d7922586cf6 |
children | 6278ac5829ce |
comparison
equal
deleted
inserted
replaced
5891:fd8832ae511d | 6275:957c266d8bc5 |
---|---|
104 _caller_adjustment = caller_adjustment; | 104 _caller_adjustment = caller_adjustment; |
105 _caller_actual_parameters = caller_actual_parameters; | 105 _caller_actual_parameters = caller_actual_parameters; |
106 _number_of_frames = number_of_frames; | 106 _number_of_frames = number_of_frames; |
107 _frame_sizes = frame_sizes; | 107 _frame_sizes = frame_sizes; |
108 _frame_pcs = frame_pcs; | 108 _frame_pcs = frame_pcs; |
109 _register_block = NEW_C_HEAP_ARRAY(intptr_t, RegisterMap::reg_count * 2); | 109 _register_block = NEW_C_HEAP_ARRAY(intptr_t, RegisterMap::reg_count * 2, mtCompiler); |
110 _return_type = return_type; | 110 _return_type = return_type; |
111 _initial_info = 0; | 111 _initial_info = 0; |
112 // PD (x86 only) | 112 // PD (x86 only) |
113 _counter_temp = 0; | 113 _counter_temp = 0; |
114 _unpack_kind = 0; | 114 _unpack_kind = 0; |
117 _total_frame_sizes = size_of_frames(); | 117 _total_frame_sizes = size_of_frames(); |
118 } | 118 } |
119 | 119 |
120 | 120 |
121 Deoptimization::UnrollBlock::~UnrollBlock() { | 121 Deoptimization::UnrollBlock::~UnrollBlock() { |
122 FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes); | 122 FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes, mtCompiler); |
123 FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs); | 123 FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs, mtCompiler); |
124 FREE_C_HEAP_ARRAY(intptr_t, _register_block); | 124 FREE_C_HEAP_ARRAY(intptr_t, _register_block, mtCompiler); |
125 } | 125 } |
126 | 126 |
127 | 127 |
128 intptr_t* Deoptimization::UnrollBlock::value_addr_at(int register_number) const { | 128 intptr_t* Deoptimization::UnrollBlock::value_addr_at(int register_number) const { |
129 assert(register_number < RegisterMap::reg_count, "checking register number"); | 129 assert(register_number < RegisterMap::reg_count, "checking register number"); |
383 | 383 |
384 int number_of_frames = array->frames(); | 384 int number_of_frames = array->frames(); |
385 | 385 |
386 // Compute the vframes' sizes. Note that frame_sizes[] entries are ordered from outermost to innermost | 386 // Compute the vframes' sizes. Note that frame_sizes[] entries are ordered from outermost to innermost |
387 // virtual activation, which is the reverse of the elements in the vframes array. | 387 // virtual activation, which is the reverse of the elements in the vframes array. |
388 intptr_t* frame_sizes = NEW_C_HEAP_ARRAY(intptr_t, number_of_frames); | 388 intptr_t* frame_sizes = NEW_C_HEAP_ARRAY(intptr_t, number_of_frames, mtCompiler); |
389 // +1 because we always have an interpreter return address for the final slot. | 389 // +1 because we always have an interpreter return address for the final slot. |
390 address* frame_pcs = NEW_C_HEAP_ARRAY(address, number_of_frames + 1); | 390 address* frame_pcs = NEW_C_HEAP_ARRAY(address, number_of_frames + 1, mtCompiler); |
391 int popframe_extra_args = 0; | 391 int popframe_extra_args = 0; |
392 // Create an interpreter return address for the stub to use as its return | 392 // Create an interpreter return address for the stub to use as its return |
393 // address so the skeletal frames are perfectly walkable | 393 // address so the skeletal frames are perfectly walkable |
394 frame_pcs[number_of_frames] = Interpreter::deopt_entry(vtos, 0); | 394 frame_pcs[number_of_frames] = Interpreter::deopt_entry(vtos, 0); |
395 | 395 |
413 // frame. | 413 // frame. |
414 bool caller_was_method_handle = false; | 414 bool caller_was_method_handle = false; |
415 if (deopt_sender.is_interpreted_frame()) { | 415 if (deopt_sender.is_interpreted_frame()) { |
416 methodHandle method = deopt_sender.interpreter_frame_method(); | 416 methodHandle method = deopt_sender.interpreter_frame_method(); |
417 Bytecode_invoke cur = Bytecode_invoke_check(method, deopt_sender.interpreter_frame_bci()); | 417 Bytecode_invoke cur = Bytecode_invoke_check(method, deopt_sender.interpreter_frame_bci()); |
418 if (cur.is_method_handle_invoke()) { | 418 if (cur.is_invokedynamic() || cur.is_invokehandle()) { |
419 // Method handle invokes may involve fairly arbitrary chains of | 419 // Method handle invokes may involve fairly arbitrary chains of |
420 // calls so it's impossible to know how much actual space the | 420 // calls so it's impossible to know how much actual space the |
421 // caller has for locals. | 421 // caller has for locals. |
422 caller_was_method_handle = true; | 422 caller_was_method_handle = true; |
423 } | 423 } |