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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(i, LAZY); |
77 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, | 77 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, |
78 RelocInfo::NONE); | 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::NONE); | 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()); |
87 | 87 |
88 #ifdef DEBUG | 88 #ifdef DEBUG |
89 prev_call_address = call_address; | 89 prev_call_address = call_address; |
90 #endif | 90 #endif |
91 } | 91 } |
92 | 92 |
93 // Add the deoptimizing code to the list. | 93 // Add the deoptimizing code to the list. |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 } | 1118 } |
1119 | 1119 |
1120 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), | 1120 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
1121 count() * table_entry_size_); | 1121 count() * table_entry_size_); |
1122 } | 1122 } |
1123 | 1123 |
1124 #undef __ | 1124 #undef __ |
1125 | 1125 |
1126 | 1126 |
1127 } } // namespace v8::internal | 1127 } } // namespace v8::internal |
OLD | NEW |