Chromium Code Reviews| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 static void PatchIncrementalMarkingRecordWriteStubs(bool enable) { | 162 static void PatchIncrementalMarkingRecordWriteStubs(bool enable) { |
| 163 NumberDictionary* stubs = Heap::code_stubs(); | 163 NumberDictionary* stubs = Heap::code_stubs(); |
| 164 | 164 |
| 165 int capacity = stubs->Capacity(); | 165 int capacity = stubs->Capacity(); |
| 166 for (int i = 0; i < capacity; i++) { | 166 for (int i = 0; i < capacity; i++) { |
| 167 Object* k = stubs->KeyAt(i); | 167 Object* k = stubs->KeyAt(i); |
| 168 if (stubs->IsKey(k)) { | 168 if (stubs->IsKey(k)) { |
| 169 uint32_t key = NumberToUint32(k); | 169 uint32_t key = NumberToUint32(k); |
| 170 | 170 |
| 171 if (CodeStub::MajorKeyFromKey(key) == | 171 if (CodeStub::MajorKeyFromKey(key) == |
| 172 CodeStub::IncrementalMarkingRecordWrite) { | 172 CodeStub::IncrementalMarkingRecordWrite) { |
|
Vyacheslav Egorov (Chromium)
2011/04/06 11:46:40
maybe change keyname as well?
| |
| 173 Object* e = stubs->ValueAt(i); | 173 Object* e = stubs->ValueAt(i); |
| 174 if (e->IsCode()) { | 174 if (e->IsCode()) { |
| 175 IncrementalMarkingRecordWriteStub::Patch(Code::cast(e), enable); | 175 RecordWriteStub::Patch(Code::cast(e), enable); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 static VirtualMemory* marking_stack_memory = NULL; | 182 static VirtualMemory* marking_stack_memory = NULL; |
| 183 | 183 |
| 184 static void EnsureMarkingStackIsCommitted() { | 184 static void EnsureMarkingStackIsCommitted() { |
| 185 if (marking_stack_memory == NULL) { | 185 if (marking_stack_memory == NULL) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 | 375 |
| 376 if ((steps_count_ % kAllocationMarkingFactorSpeedupInterval) == 0) { | 376 if ((steps_count_ % kAllocationMarkingFactorSpeedupInterval) == 0) { |
| 377 allocation_marking_factor_ += kAllocationMarkingFactorSpeedup; | 377 allocation_marking_factor_ += kAllocationMarkingFactorSpeedup; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 | 382 |
| 383 | 383 |
| 384 } } // namespace v8::internal | 384 } } // namespace v8::internal |
| OLD | NEW |