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/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 2522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2533 descriptor_lookup_cache_ = NULL; | 2533 descriptor_lookup_cache_ = NULL; |
2534 delete context_slot_cache_; | 2534 delete context_slot_cache_; |
2535 context_slot_cache_ = NULL; | 2535 context_slot_cache_ = NULL; |
2536 | 2536 |
2537 delete load_stub_cache_; | 2537 delete load_stub_cache_; |
2538 load_stub_cache_ = NULL; | 2538 load_stub_cache_ = NULL; |
2539 delete store_stub_cache_; | 2539 delete store_stub_cache_; |
2540 store_stub_cache_ = NULL; | 2540 store_stub_cache_ = NULL; |
2541 delete code_aging_helper_; | 2541 delete code_aging_helper_; |
2542 code_aging_helper_ = NULL; | 2542 code_aging_helper_ = NULL; |
2543 delete stats_table_; | |
2544 stats_table_ = NULL; | 2543 stats_table_ = NULL; |
2545 | 2544 |
2546 delete materialized_object_store_; | 2545 delete materialized_object_store_; |
2547 materialized_object_store_ = NULL; | 2546 materialized_object_store_ = NULL; |
2548 | 2547 |
2549 delete logger_; | 2548 delete logger_; |
2550 logger_ = NULL; | 2549 logger_ = NULL; |
2551 | 2550 |
2552 counters_ = NULL; | 2551 counters_ = NULL; |
2553 | 2552 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2837 | 2836 |
2838 if (!FLAG_inline_new) heap_.DisableInlineAllocation(); | 2837 if (!FLAG_inline_new) heap_.DisableInlineAllocation(); |
2839 | 2838 |
2840 return true; | 2839 return true; |
2841 } | 2840 } |
2842 | 2841 |
2843 | 2842 |
2844 // Initialized lazily to allow early | 2843 // Initialized lazily to allow early |
2845 // v8::V8::SetAddHistogramSampleFunction calls. | 2844 // v8::V8::SetAddHistogramSampleFunction calls. |
2846 StatsTable* Isolate::stats_table() { | 2845 StatsTable* Isolate::stats_table() { |
2847 if (stats_table_ == NULL) { | 2846 if (stats_table_ != nullptr) return stats_table_; |
2848 stats_table_ = new StatsTable; | 2847 InitializeCounters(); |
2849 } | 2848 return stats_table_ = counters_->stats_table(); |
2850 return stats_table_; | |
2851 } | 2849 } |
2852 | 2850 |
2853 | 2851 |
2854 void Isolate::Enter() { | 2852 void Isolate::Enter() { |
2855 Isolate* current_isolate = NULL; | 2853 Isolate* current_isolate = NULL; |
2856 PerIsolateThreadData* current_data = CurrentPerIsolateThreadData(); | 2854 PerIsolateThreadData* current_data = CurrentPerIsolateThreadData(); |
2857 if (current_data != NULL) { | 2855 if (current_data != NULL) { |
2858 current_isolate = current_data->isolate_; | 2856 current_isolate = current_data->isolate_; |
2859 DCHECK(current_isolate != NULL); | 2857 DCHECK(current_isolate != NULL); |
2860 if (current_isolate == this) { | 2858 if (current_isolate == this) { |
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3768 // Then check whether this scope intercepts. | 3766 // Then check whether this scope intercepts. |
3769 if ((flag & intercept_mask_)) { | 3767 if ((flag & intercept_mask_)) { |
3770 intercepted_flags_ |= flag; | 3768 intercepted_flags_ |= flag; |
3771 return true; | 3769 return true; |
3772 } | 3770 } |
3773 return false; | 3771 return false; |
3774 } | 3772 } |
3775 | 3773 |
3776 } // namespace internal | 3774 } // namespace internal |
3777 } // namespace v8 | 3775 } // namespace v8 |
OLD | NEW |