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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #endif | 80 #endif |
81 // For each LLazyBailout instruction insert a call to the corresponding | 81 // For each LLazyBailout instruction insert a call to the corresponding |
82 // deoptimization entry. | 82 // deoptimization entry. |
83 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 83 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
84 if (deopt_data->Pc(i)->value() == -1) continue; | 84 if (deopt_data->Pc(i)->value() == -1) continue; |
85 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 85 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
86 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); | 86 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
87 // We need calls to have a predictable size in the unoptimized code, but | 87 // We need calls to have a predictable size in the unoptimized code, but |
88 // this is optimized code, so we don't have to have a predictable size. | 88 // this is optimized code, so we don't have to have a predictable size. |
89 int call_size_in_bytes = | 89 int call_size_in_bytes = |
90 MacroAssembler::CallSizeNotPredictableCodeSize(deopt_entry, | 90 MacroAssembler::CallSizeNotPredictableCodeSize(isolate, |
| 91 deopt_entry, |
91 RelocInfo::NONE32); | 92 RelocInfo::NONE32); |
92 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; | 93 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; |
93 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); | 94 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); |
94 ASSERT(call_size_in_bytes <= patch_size()); | 95 ASSERT(call_size_in_bytes <= patch_size()); |
95 CodePatcher patcher(call_address, call_size_in_words); | 96 CodePatcher patcher(call_address, call_size_in_words); |
96 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); | 97 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); |
97 ASSERT(prev_call_address == NULL || | 98 ASSERT(prev_call_address == NULL || |
98 call_address >= prev_call_address + patch_size()); | 99 call_address >= prev_call_address + patch_size()); |
99 ASSERT(call_address + patch_size() <= code->instruction_end()); | 100 ASSERT(call_address + patch_size() <= code->instruction_end()); |
100 #ifdef DEBUG | 101 #ifdef DEBUG |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 376 |
376 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 377 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
377 ASSERT(FLAG_enable_ool_constant_pool); | 378 ASSERT(FLAG_enable_ool_constant_pool); |
378 SetFrameSlot(offset, value); | 379 SetFrameSlot(offset, value); |
379 } | 380 } |
380 | 381 |
381 | 382 |
382 #undef __ | 383 #undef __ |
383 | 384 |
384 } } // namespace v8::internal | 385 } } // namespace v8::internal |
OLD | NEW |