OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 | 48 |
49 // Invalidate the relocation information, as it will become invalid by the | 49 // Invalidate the relocation information, as it will become invalid by the |
50 // code patching below, and is not needed any more. | 50 // code patching below, and is not needed any more. |
51 code->InvalidateRelocation(); | 51 code->InvalidateRelocation(); |
52 | 52 |
53 // For each return after a safepoint insert a absolute call to the | 53 // For each return after a safepoint insert a absolute call to the |
54 // corresponding deoptimization entry. | 54 // corresponding deoptimization entry. |
55 unsigned last_pc_offset = 0; | 55 unsigned last_pc_offset = 0; |
56 SafepointTable table(function->code()); | 56 SafepointTable table(function->code()); |
57 for (unsigned i = 0; i < table.length(); i++) { | 57 for (unsigned i = 0; i < table.length(); i++) { |
58 unsigned pc_offset = table.GetPcOffset(i); | 58 unsigned pc_offset = table.GetPcOffset(i); |
Søren Thygesen Gjesse
2011/01/12 10:57:34
You need to make this change in deoptimizer-arm.cc
Vitaly Repeshko
2011/01/12 14:14:35
Thanks for the reminder. I actually indented to do
| |
59 int deoptimization_index = table.GetDeoptimizationIndex(i); | 59 SafepointEntry safepoint_entry = table.GetEntry(i); |
60 int gap_code_size = table.GetGapCodeSize(i); | 60 int deoptimization_index = safepoint_entry.deoptimization_index(); |
61 int gap_code_size = safepoint_entry.gap_code_size(); | |
61 #ifdef DEBUG | 62 #ifdef DEBUG |
62 // Destroy the code which is not supposed to run again. | 63 // Destroy the code which is not supposed to run again. |
63 unsigned instructions = pc_offset - last_pc_offset; | 64 unsigned instructions = pc_offset - last_pc_offset; |
64 CodePatcher destroyer(code->instruction_start() + last_pc_offset, | 65 CodePatcher destroyer(code->instruction_start() + last_pc_offset, |
65 instructions); | 66 instructions); |
66 for (unsigned i = 0; i < instructions; i++) { | 67 for (unsigned i = 0; i < instructions; i++) { |
67 destroyer.masm()->int3(); | 68 destroyer.masm()->int3(); |
68 } | 69 } |
69 #endif | 70 #endif |
70 last_pc_offset = pc_offset; | 71 last_pc_offset = pc_offset; |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
610 __ jmp(&done); | 611 __ jmp(&done); |
611 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 612 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
612 } | 613 } |
613 __ bind(&done); | 614 __ bind(&done); |
614 } | 615 } |
615 | 616 |
616 #undef __ | 617 #undef __ |
617 | 618 |
618 | 619 |
619 } } // namespace v8::internal | 620 } } // namespace v8::internal |
OLD | NEW |