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

Side by Side Diff: src/deoptimizer.cc

Issue 6542047: Basic implementation of incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 // Iterate over the stack check table and patch every stack check 816 // Iterate over the stack check table and patch every stack check
817 // call to an unconditional call to the replacement code. 817 // call to an unconditional call to the replacement code.
818 ASSERT(unoptimized_code->kind() == Code::FUNCTION); 818 ASSERT(unoptimized_code->kind() == Code::FUNCTION);
819 Address stack_check_cursor = unoptimized_code->instruction_start() + 819 Address stack_check_cursor = unoptimized_code->instruction_start() +
820 unoptimized_code->stack_check_table_offset(); 820 unoptimized_code->stack_check_table_offset();
821 uint32_t table_length = Memory::uint32_at(stack_check_cursor); 821 uint32_t table_length = Memory::uint32_at(stack_check_cursor);
822 stack_check_cursor += kIntSize; 822 stack_check_cursor += kIntSize;
823 for (uint32_t i = 0; i < table_length; ++i) { 823 for (uint32_t i = 0; i < table_length; ++i) {
824 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize); 824 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
825 Address pc_after = unoptimized_code->instruction_start() + pc_offset; 825 Address pc_after = unoptimized_code->instruction_start() + pc_offset;
826 PatchStackCheckCodeAt(pc_after, check_code, replacement_code); 826 PatchStackCheckCodeAt(unoptimized_code,
827 pc_after,
828 check_code,
829 replacement_code);
827 stack_check_cursor += 2 * kIntSize; 830 stack_check_cursor += 2 * kIntSize;
828 } 831 }
829 } 832 }
830 833
831 834
832 void Deoptimizer::RevertStackCheckCode(Code* unoptimized_code, 835 void Deoptimizer::RevertStackCheckCode(Code* unoptimized_code,
833 Code* check_code, 836 Code* check_code,
834 Code* replacement_code) { 837 Code* replacement_code) {
835 // Iterate over the stack check table and revert the patched 838 // Iterate over the stack check table and revert the patched
836 // stack check calls. 839 // stack check calls.
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 Deoptimizer::HandleWeakDeoptimizedCode); 1180 Deoptimizer::HandleWeakDeoptimizedCode);
1178 } 1181 }
1179 1182
1180 1183
1181 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() { 1184 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() {
1182 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location())); 1185 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location()));
1183 } 1186 }
1184 1187
1185 1188
1186 } } // namespace v8::internal 1189 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698