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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // For each LLazyBailout instruction insert a call to the corresponding | 66 // For each LLazyBailout instruction insert a call to the corresponding |
67 // deoptimization entry. | 67 // deoptimization entry. |
68 DeoptimizationInputData* deopt_data = | 68 DeoptimizationInputData* deopt_data = |
69 DeoptimizationInputData::cast(code->deoptimization_data()); | 69 DeoptimizationInputData::cast(code->deoptimization_data()); |
70 #ifdef DEBUG | 70 #ifdef DEBUG |
71 Address prev_call_address = NULL; | 71 Address prev_call_address = NULL; |
72 #endif | 72 #endif |
73 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 73 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
74 if (deopt_data->Pc(i)->value() == -1) continue; | 74 if (deopt_data->Pc(i)->value() == -1) continue; |
75 Address call_address = code_start_address + deopt_data->Pc(i)->value(); | 75 Address call_address = code_start_address + deopt_data->Pc(i)->value(); |
76 Address deopt_entry = GetDeoptimizationEntry(i, LAZY); | 76 Address deopt_entry = GetDeoptimizationEntry(isolate, i, LAZY); |
77 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, | 77 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, |
78 RelocInfo::NONE32); | 78 RelocInfo::NONE32); |
79 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; | 79 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; |
80 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); | 80 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); |
81 ASSERT(call_size_in_bytes <= patch_size()); | 81 ASSERT(call_size_in_bytes <= patch_size()); |
82 CodePatcher patcher(call_address, call_size_in_words); | 82 CodePatcher patcher(call_address, call_size_in_words); |
83 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); | 83 patcher.masm()->Call(deopt_entry, RelocInfo::NONE32); |
84 ASSERT(prev_call_address == NULL || | 84 ASSERT(prev_call_address == NULL || |
85 call_address >= prev_call_address + patch_size()); | 85 call_address >= prev_call_address + patch_size()); |
86 ASSERT(call_address + patch_size() <= code->instruction_end()); | 86 ASSERT(call_address + patch_size() <= code->instruction_end()); |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 } | 1282 } |
1283 | 1283 |
1284 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), | 1284 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
1285 count() * table_entry_size_); | 1285 count() * table_entry_size_); |
1286 } | 1286 } |
1287 | 1287 |
1288 #undef __ | 1288 #undef __ |
1289 | 1289 |
1290 | 1290 |
1291 } } // namespace v8::internal | 1291 } } // namespace v8::internal |
OLD | NEW |