| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } else if (IsCompacting()) { | 411 } else if (IsCompacting()) { |
| 412 RecordWriteStub::Patch(stub, RecordWriteStub::INCREMENTAL_COMPACTION); | 412 RecordWriteStub::Patch(stub, RecordWriteStub::INCREMENTAL_COMPACTION); |
| 413 } else { | 413 } else { |
| 414 RecordWriteStub::Patch(stub, RecordWriteStub::INCREMENTAL); | 414 RecordWriteStub::Patch(stub, RecordWriteStub::INCREMENTAL); |
| 415 } | 415 } |
| 416 } | 416 } |
| 417 | 417 |
| 418 | 418 |
| 419 static void PatchIncrementalMarkingRecordWriteStubs( | 419 static void PatchIncrementalMarkingRecordWriteStubs( |
| 420 Heap* heap, RecordWriteStub::Mode mode) { | 420 Heap* heap, RecordWriteStub::Mode mode) { |
| 421 NumberDictionary* stubs = heap->code_stubs(); | 421 UnseededNumberDictionary* stubs = heap->code_stubs(); |
| 422 | 422 |
| 423 int capacity = stubs->Capacity(); | 423 int capacity = stubs->Capacity(); |
| 424 for (int i = 0; i < capacity; i++) { | 424 for (int i = 0; i < capacity; i++) { |
| 425 Object* k = stubs->KeyAt(i); | 425 Object* k = stubs->KeyAt(i); |
| 426 if (stubs->IsKey(k)) { | 426 if (stubs->IsKey(k)) { |
| 427 uint32_t key = NumberToUint32(k); | 427 uint32_t key = NumberToUint32(k); |
| 428 | 428 |
| 429 if (CodeStub::MajorKeyFromKey(key) == | 429 if (CodeStub::MajorKeyFromKey(key) == |
| 430 CodeStub::RecordWrite) { | 430 CodeStub::RecordWrite) { |
| 431 Object* e = stubs->ValueAt(i); | 431 Object* e = stubs->ValueAt(i); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 917 bytes_scanned_ = 0; | 917 bytes_scanned_ = 0; |
| 918 } | 918 } |
| 919 | 919 |
| 920 | 920 |
| 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 923 } | 923 } |
| 924 | 924 |
| 925 } } // namespace v8::internal | 925 } } // namespace v8::internal |
| OLD | NEW |