OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Address prev_call_address = NULL; | 73 Address prev_call_address = NULL; |
74 #endif | 74 #endif |
75 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 75 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
76 if (deopt_data->Pc(i)->value() == -1) continue; | 76 if (deopt_data->Pc(i)->value() == -1) continue; |
77 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 77 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
78 Address deopt_entry = GetDeoptimizationEntry(i, LAZY); | 78 Address deopt_entry = GetDeoptimizationEntry(i, LAZY); |
79 // We need calls to have a predictable size in the unoptimized code, but | 79 // We need calls to have a predictable size in the unoptimized code, but |
80 // this is optimized code, so we don't have to have a predictable size. | 80 // this is optimized code, so we don't have to have a predictable size. |
81 int call_size_in_bytes = | 81 int call_size_in_bytes = |
82 MacroAssembler::CallSizeNotPredictableCodeSize(deopt_entry, | 82 MacroAssembler::CallSizeNotPredictableCodeSize(deopt_entry, |
83 RelocInfo::NONE); | 83 RelocInfo::NONE32); |
84 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; | 84 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; |
85 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); | 85 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); |
86 ASSERT(call_size_in_bytes <= patch_size()); | 86 ASSERT(call_size_in_bytes <= patch_size()); |
87 CodePatcher patcher(call_address, call_size_in_words); | 87 CodePatcher patcher(call_address, call_size_in_words); |
88 patcher.masm()->Call(deopt_entry, RelocInfo::NONE); | 88 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); |
89 ASSERT(prev_call_address == NULL || | 89 ASSERT(prev_call_address == NULL || |
90 call_address >= prev_call_address + patch_size()); | 90 call_address >= prev_call_address + patch_size()); |
91 ASSERT(call_address + patch_size() <= code->instruction_end()); | 91 ASSERT(call_address + patch_size() <= code->instruction_end()); |
92 #ifdef DEBUG | 92 #ifdef DEBUG |
93 prev_call_address = call_address; | 93 prev_call_address = call_address; |
94 #endif | 94 #endif |
95 } | 95 } |
96 | 96 |
97 // Add the deoptimizing code to the list. | 97 // Add the deoptimizing code to the list. |
98 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); | 98 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 __ push(ip); | 1181 __ push(ip); |
1182 __ b(&done); | 1182 __ b(&done); |
1183 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 1183 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
1184 } | 1184 } |
1185 __ bind(&done); | 1185 __ bind(&done); |
1186 } | 1186 } |
1187 | 1187 |
1188 #undef __ | 1188 #undef __ |
1189 | 1189 |
1190 } } // namespace v8::internal | 1190 } } // namespace v8::internal |
OLD | NEW |