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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); | 567 DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty()); |
568 isolate_->heap()->IterateSmiRoots(this); | 568 isolate_->heap()->IterateSmiRoots(this); |
569 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); | 569 isolate_->heap()->IterateStrongRoots(this, VISIT_ONLY_STRONG); |
570 isolate_->heap()->RepairFreeListsAfterDeserialization(); | 570 isolate_->heap()->RepairFreeListsAfterDeserialization(); |
571 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); | 571 isolate_->heap()->IterateWeakRoots(this, VISIT_ALL); |
572 | 572 |
573 isolate_->heap()->set_native_contexts_list( | 573 isolate_->heap()->set_native_contexts_list( |
574 isolate_->heap()->undefined_value()); | 574 isolate_->heap()->undefined_value()); |
575 isolate_->heap()->set_array_buffers_list( | 575 isolate_->heap()->set_array_buffers_list( |
576 isolate_->heap()->undefined_value()); | 576 isolate_->heap()->undefined_value()); |
| 577 isolate->heap()->set_new_array_buffer_views_list( |
| 578 isolate_->heap()->undefined_value()); |
577 | 579 |
578 // The allocation site list is build during root iteration, but if no sites | 580 // The allocation site list is build during root iteration, but if no sites |
579 // were encountered then it needs to be initialized to undefined. | 581 // were encountered then it needs to be initialized to undefined. |
580 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { | 582 if (isolate_->heap()->allocation_sites_list() == Smi::FromInt(0)) { |
581 isolate_->heap()->set_allocation_sites_list( | 583 isolate_->heap()->set_allocation_sites_list( |
582 isolate_->heap()->undefined_value()); | 584 isolate_->heap()->undefined_value()); |
583 } | 585 } |
584 | 586 |
585 // Update data pointers to the external strings containing natives sources. | 587 // Update data pointers to the external strings containing natives sources. |
586 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { | 588 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { |
(...skipping 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2561 DisallowHeapAllocation no_gc; | 2563 DisallowHeapAllocation no_gc; |
2562 SerializedCodeData* scd = new SerializedCodeData(cached_data); | 2564 SerializedCodeData* scd = new SerializedCodeData(cached_data); |
2563 SanityCheckResult r = scd->SanityCheck(isolate, source); | 2565 SanityCheckResult r = scd->SanityCheck(isolate, source); |
2564 if (r == CHECK_SUCCESS) return scd; | 2566 if (r == CHECK_SUCCESS) return scd; |
2565 cached_data->Reject(); | 2567 cached_data->Reject(); |
2566 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 2568 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
2567 delete scd; | 2569 delete scd; |
2568 return NULL; | 2570 return NULL; |
2569 } | 2571 } |
2570 } } // namespace v8::internal | 2572 } } // namespace v8::internal |
OLD | NEW |