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

Side by Side Diff: src/lithium-allocator.cc

Issue 6824078: Move most of the incremental marking write barrier to generated code. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 7 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 | « src/isolate.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 HBasicBlock* cur_block = block->predecessors()->at(j); 1024 HBasicBlock* cur_block = block->predecessors()->at(j);
1025 // The gap move must be added without any special processing as in 1025 // The gap move must be added without any special processing as in
1026 // the AddConstraintsGapMove. 1026 // the AddConstraintsGapMove.
1027 chunk_->AddGapMove(cur_block->last_instruction_index() - 1, 1027 chunk_->AddGapMove(cur_block->last_instruction_index() - 1,
1028 operand, 1028 operand,
1029 phi_operand); 1029 phi_operand);
1030 1030
1031 // We are going to insert a move before the branch instruction. 1031 // We are going to insert a move before the branch instruction.
1032 // Some branch instructions (e.g. loops' back edges) 1032 // Some branch instructions (e.g. loops' back edges)
1033 // can potentially cause a GC so they have a pointer map. 1033 // can potentially cause a GC so they have a pointer map.
1034 // By insterting a move we essentially create a copy of a 1034 // By inserting a move we essentially create a copy of a
1035 // value which is invisible to PopulatePointerMaps(), because we store 1035 // value which is invisible to PopulatePointerMaps(), because we store
1036 // it into a location different from the operand of a live range 1036 // it into a location different from the operand of a live range
1037 // covering a branch instruction. 1037 // covering a branch instruction.
1038 // Thus we need to manually record a pointer. 1038 // Thus we need to manually record a pointer.
1039 if (phi->representation().IsTagged()) { 1039 if (phi->representation().IsTagged()) {
1040 LInstruction* branch = 1040 LInstruction* branch =
1041 InstructionAt(cur_block->last_instruction_index()); 1041 InstructionAt(cur_block->last_instruction_index());
1042 if (branch->HasPointerMap()) { 1042 if (branch->HasPointerMap()) {
1043 branch->pointer_map()->RecordPointer(phi_operand); 1043 branch->pointer_map()->RecordPointer(phi_operand);
1044 } 1044 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 LGap* gap = NULL; 1123 LGap* gap = NULL;
1124 if (block->predecessors()->length() == 1) { 1124 if (block->predecessors()->length() == 1) {
1125 gap = GapAt(block->first_instruction_index()); 1125 gap = GapAt(block->first_instruction_index());
1126 } else { 1126 } else {
1127 ASSERT(pred->end()->SecondSuccessor() == NULL); 1127 ASSERT(pred->end()->SecondSuccessor() == NULL);
1128 gap = GetLastGap(pred); 1128 gap = GetLastGap(pred);
1129 1129
1130 // We are going to insert a move before the branch instruction. 1130 // We are going to insert a move before the branch instruction.
1131 // Some branch instructions (e.g. loops' back edges) 1131 // Some branch instructions (e.g. loops' back edges)
1132 // can potentially cause a GC so they have a pointer map. 1132 // can potentially cause a GC so they have a pointer map.
1133 // By insterting a move we essentially create a copy of a 1133 // By inserting a move we essentially create a copy of a
1134 // value which is invisible to PopulatePointerMaps(), because we store 1134 // value which is invisible to PopulatePointerMaps(), because we store
1135 // it into a location different from the operand of a live range 1135 // it into a location different from the operand of a live range
1136 // covering a branch instruction. 1136 // covering a branch instruction.
1137 // Thus we need to manually record a pointer. 1137 // Thus we need to manually record a pointer.
1138 if (HasTaggedValue(range->id())) { 1138 if (HasTaggedValue(range->id())) {
1139 LInstruction* branch = InstructionAt(pred->last_instruction_index()); 1139 LInstruction* branch = InstructionAt(pred->last_instruction_index());
1140 if (branch->HasPointerMap()) { 1140 if (branch->HasPointerMap()) {
1141 branch->pointer_map()->RecordPointer(cur_op); 1141 branch->pointer_map()->RecordPointer(cur_op);
1142 } 1142 }
1143 } 1143 }
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 LiveRange* current = live_ranges()->at(i); 2110 LiveRange* current = live_ranges()->at(i);
2111 if (current != NULL) current->Verify(); 2111 if (current != NULL) current->Verify();
2112 } 2112 }
2113 } 2113 }
2114 2114
2115 2115
2116 #endif 2116 #endif
2117 2117
2118 2118
2119 } } // namespace v8::internal 2119 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698