| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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/api.h" | 7 #include "src/api.h" |
| 8 #include "src/global-handles.h" | 8 #include "src/global-handles.h" |
| 9 | 9 |
| 10 #include "src/vm-state-inl.h" | 10 #include "src/vm-state-inl.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 | 566 |
| 567 | 567 |
| 568 void GlobalHandles::MakePhantom(Object** location, void* parameter, | 568 void GlobalHandles::MakePhantom(Object** location, void* parameter, |
| 569 int number_of_internal_fields, | 569 int number_of_internal_fields, |
| 570 GenericCallback phantom_callback) { | 570 GenericCallback phantom_callback) { |
| 571 Node::FromLocation(location) | 571 Node::FromLocation(location) |
| 572 ->MakePhantom(parameter, number_of_internal_fields, phantom_callback); | 572 ->MakePhantom(parameter, number_of_internal_fields, phantom_callback); |
| 573 } | 573 } |
| 574 | 574 |
| 575 | 575 |
| 576 void GlobalHandles::CollectPhantomCallbackData() { | 576 void GlobalHandles::CollectAllPhantomCallbackData() { |
| 577 for (NodeIterator it(this); !it.done(); it.Advance()) { | 577 for (NodeIterator it(this); !it.done(); it.Advance()) { |
| 578 Node* node = it.node(); | 578 Node* node = it.node(); |
| 579 node->CollectPhantomCallbackData(isolate(), &pending_phantom_callbacks_); | 579 node->CollectPhantomCallbackData(isolate(), &pending_phantom_callbacks_); |
| 580 } | 580 } |
| 581 } | 581 } |
| 582 | 582 |
| 583 | 583 |
| 584 void GlobalHandles::CollectYoungPhantomCallbackData() { |
| 585 for (int i = 0; i < new_space_nodes_.length(); ++i) { |
| 586 Node* node = new_space_nodes_[i]; |
| 587 DCHECK(node->is_in_new_space_list()); |
| 588 node->CollectPhantomCallbackData(isolate(), &pending_phantom_callbacks_); |
| 589 } |
| 590 } |
| 591 |
| 592 |
| 584 void* GlobalHandles::ClearWeakness(Object** location) { | 593 void* GlobalHandles::ClearWeakness(Object** location) { |
| 585 return Node::FromLocation(location)->ClearWeakness(); | 594 return Node::FromLocation(location)->ClearWeakness(); |
| 586 } | 595 } |
| 587 | 596 |
| 588 | 597 |
| 589 void GlobalHandles::MarkIndependent(Object** location) { | 598 void GlobalHandles::MarkIndependent(Object** location) { |
| 590 Node::FromLocation(location)->MarkIndependent(); | 599 Node::FromLocation(location)->MarkIndependent(); |
| 591 } | 600 } |
| 592 | 601 |
| 593 | 602 |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); | 1242 DCHECK_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); |
| 1234 blocks_[block][offset] = object; | 1243 blocks_[block][offset] = object; |
| 1235 if (isolate->heap()->InNewSpace(object)) { | 1244 if (isolate->heap()->InNewSpace(object)) { |
| 1236 new_space_indices_.Add(size_); | 1245 new_space_indices_.Add(size_); |
| 1237 } | 1246 } |
| 1238 *index = size_++; | 1247 *index = size_++; |
| 1239 } | 1248 } |
| 1240 | 1249 |
| 1241 | 1250 |
| 1242 } } // namespace v8::internal | 1251 } } // namespace v8::internal |
| OLD | NEW |