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 3418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3429 WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1)); | 3429 WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1)); |
3430 if (mark_sweeps > 3) { | 3430 if (mark_sweeps > 3) { |
3431 PrintF("detached context %p\n survived %d GCs (leak?)\n", | 3431 PrintF("detached context %p\n survived %d GCs (leak?)\n", |
3432 static_cast<void*>(cell->value()), mark_sweeps); | 3432 static_cast<void*>(cell->value()), mark_sweeps); |
3433 } | 3433 } |
3434 } | 3434 } |
3435 } | 3435 } |
3436 if (new_length == 0) { | 3436 if (new_length == 0) { |
3437 heap()->set_detached_contexts(heap()->empty_fixed_array()); | 3437 heap()->set_detached_contexts(heap()->empty_fixed_array()); |
3438 } else if (new_length < length) { | 3438 } else if (new_length < length) { |
3439 heap()->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>( | 3439 heap()->RightTrimFixedArray(*detached_contexts, length - new_length); |
3440 *detached_contexts, length - new_length); | |
3441 } | 3440 } |
3442 } | 3441 } |
3443 | 3442 |
3444 void Isolate::SetRAILMode(RAILMode rail_mode) { | 3443 void Isolate::SetRAILMode(RAILMode rail_mode) { |
3445 rail_mode_.SetValue(rail_mode); | 3444 rail_mode_.SetValue(rail_mode); |
3446 if (FLAG_trace_rail) { | 3445 if (FLAG_trace_rail) { |
3447 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); | 3446 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); |
3448 } | 3447 } |
3449 } | 3448 } |
3450 | 3449 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3504 // Then check whether this scope intercepts. | 3503 // Then check whether this scope intercepts. |
3505 if ((flag & intercept_mask_)) { | 3504 if ((flag & intercept_mask_)) { |
3506 intercepted_flags_ |= flag; | 3505 intercepted_flags_ |= flag; |
3507 return true; | 3506 return true; |
3508 } | 3507 } |
3509 return false; | 3508 return false; |
3510 } | 3509 } |
3511 | 3510 |
3512 } // namespace internal | 3511 } // namespace internal |
3513 } // namespace v8 | 3512 } // namespace v8 |
OLD | NEW |