| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
| 9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
| 10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 } | 466 } |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 | 470 |
| 471 static void PatchIncrementalMarkingRecordWriteStubs( | 471 static void PatchIncrementalMarkingRecordWriteStubs( |
| 472 Heap* heap, RecordWriteStub::Mode mode) { | 472 Heap* heap, RecordWriteStub::Mode mode) { |
| 473 UnseededNumberDictionary* stubs = heap->code_stubs(); | 473 UnseededNumberDictionary* stubs = heap->code_stubs(); |
| 474 | 474 |
| 475 int capacity = stubs->Capacity(); | 475 int capacity = stubs->Capacity(); |
| 476 Isolate* isolate = heap->isolate(); |
| 476 for (int i = 0; i < capacity; i++) { | 477 for (int i = 0; i < capacity; i++) { |
| 477 Object* k = stubs->KeyAt(i); | 478 Object* k = stubs->KeyAt(i); |
| 478 if (stubs->IsKey(k)) { | 479 if (stubs->IsKey(isolate, k)) { |
| 479 uint32_t key = NumberToUint32(k); | 480 uint32_t key = NumberToUint32(k); |
| 480 | 481 |
| 481 if (CodeStub::MajorKeyFromKey(key) == CodeStub::RecordWrite) { | 482 if (CodeStub::MajorKeyFromKey(key) == CodeStub::RecordWrite) { |
| 482 Object* e = stubs->ValueAt(i); | 483 Object* e = stubs->ValueAt(i); |
| 483 if (e->IsCode()) { | 484 if (e->IsCode()) { |
| 484 RecordWriteStub::Patch(Code::cast(e), mode); | 485 RecordWriteStub::Patch(Code::cast(e), mode); |
| 485 } | 486 } |
| 486 } | 487 } |
| 487 } | 488 } |
| 488 } | 489 } |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1250 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1250 idle_marking_delay_counter_++; | 1251 idle_marking_delay_counter_++; |
| 1251 } | 1252 } |
| 1252 | 1253 |
| 1253 | 1254 |
| 1254 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1255 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1255 idle_marking_delay_counter_ = 0; | 1256 idle_marking_delay_counter_ = 0; |
| 1256 } | 1257 } |
| 1257 } // namespace internal | 1258 } // namespace internal |
| 1258 } // namespace v8 | 1259 } // namespace v8 |
| OLD | NEW |