Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: src/ia32/deoptimizer-ia32.cc

Issue 6480068: Fix wrong assert in ia32 deoptimizer.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address); 73 RelocInfoWriter reloc_info_writer(reloc_end_address, code_start_address);
74 74
75 // For each return after a safepoint insert a call to the corresponding 75 // For each return after a safepoint insert a call to the corresponding
76 // deoptimization entry. Since the call is a relative encoding, write new 76 // deoptimization entry. Since the call is a relative encoding, write new
77 // reloc info. We do not need any of the existing reloc info because the 77 // reloc info. We do not need any of the existing reloc info because the
78 // existing code will not be used again (we zap it in debug builds). 78 // existing code will not be used again (we zap it in debug builds).
79 SafepointTable table(code); 79 SafepointTable table(code);
80 Address prev_address = code_start_address; 80 Address prev_address = code_start_address;
81 for (unsigned i = 0; i < table.length(); ++i) { 81 for (unsigned i = 0; i < table.length(); ++i) {
82 Address curr_address = code_start_address + table.GetPcOffset(i); 82 Address curr_address = code_start_address + table.GetPcOffset(i);
83 ASSERT_GE(curr_address - prev_address, patch_size()); 83 ASSERT_GE(curr_address, prev_address);
84 ZapCodeRange(prev_address, curr_address); 84 ZapCodeRange(prev_address, curr_address);
85 85
86 SafepointEntry safepoint_entry = table.GetEntry(i); 86 SafepointEntry safepoint_entry = table.GetEntry(i);
87 int deoptimization_index = safepoint_entry.deoptimization_index(); 87 int deoptimization_index = safepoint_entry.deoptimization_index();
88 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) { 88 if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
89 // The gap code is needed to get to the state expected at the bailout. 89 // The gap code is needed to get to the state expected at the bailout.
90 curr_address += safepoint_entry.gap_code_size(); 90 curr_address += safepoint_entry.gap_code_size();
91 91
92 CodePatcher patcher(curr_address, patch_size()); 92 CodePatcher patcher(curr_address, patch_size());
93 Address deopt_entry = GetDeoptimizationEntry(deoptimization_index, LAZY); 93 Address deopt_entry = GetDeoptimizationEntry(deoptimization_index, LAZY);
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 653 }
654 __ bind(&done); 654 __ bind(&done);
655 } 655 }
656 656
657 #undef __ 657 #undef __
658 658
659 659
660 } } // namespace v8::internal 660 } } // namespace v8::internal
661 661
662 #endif // V8_TARGET_ARCH_IA32 662 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698