Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Side by Side Diff: include/v8.h

Issue 2486173002: [api] Remove marking persistents as partially dependent (Closed)
Patch Set: Addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 567
568 /** 568 /**
569 * Marks the reference to this object independent. Garbage collector is free 569 * Marks the reference to this object independent. Garbage collector is free
570 * to ignore any object groups containing this object. Weak callback for an 570 * to ignore any object groups containing this object. Weak callback for an
571 * independent handle should not assume that it will be preceded by a global 571 * independent handle should not assume that it will be preceded by a global
572 * GC prologue callback or followed by a global GC epilogue callback. 572 * GC prologue callback or followed by a global GC epilogue callback.
573 */ 573 */
574 V8_INLINE void MarkIndependent(); 574 V8_INLINE void MarkIndependent();
575 575
576 /** 576 /**
577 * Marks the reference to this object partially dependent. Partially dependent
578 * handles only depend on other partially dependent handles and these
579 * dependencies are provided through object groups. It provides a way to build
580 * smaller object groups for young objects that represent only a subset of all
581 * external dependencies. This mark is automatically cleared after each
582 * garbage collection.
583 */
584 V8_INLINE V8_DEPRECATED(
585 "deprecated optimization, do not use partially dependent groups",
586 void MarkPartiallyDependent());
587
588 /**
589 * Marks the reference to this object as active. The scavenge garbage 577 * Marks the reference to this object as active. The scavenge garbage
590 * collection should not reclaim the objects marked as active. 578 * collection should not reclaim the objects marked as active.
591 * This bit is cleared after the each garbage collection pass. 579 * This bit is cleared after the each garbage collection pass.
592 */ 580 */
593 V8_INLINE void MarkActive(); 581 V8_INLINE void MarkActive();
594 582
595 V8_INLINE bool IsIndependent() const; 583 V8_INLINE bool IsIndependent() const;
596 584
597 /** Checks if the handle holds the only reference to an object. */ 585 /** Checks if the handle holds the only reference to an object. */
598 V8_INLINE bool IsNearDeath() const; 586 V8_INLINE bool IsNearDeath() const;
(...skipping 7720 matching lines...) Expand 10 before | Expand all | Expand 10 after
8319 static const int kFalseValueRootIndex = 8; 8307 static const int kFalseValueRootIndex = 8;
8320 static const int kEmptyStringRootIndex = 9; 8308 static const int kEmptyStringRootIndex = 9;
8321 8309
8322 static const int kNodeClassIdOffset = 1 * kApiPointerSize; 8310 static const int kNodeClassIdOffset = 1 * kApiPointerSize;
8323 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; 8311 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
8324 static const int kNodeStateMask = 0x7; 8312 static const int kNodeStateMask = 0x7;
8325 static const int kNodeStateIsWeakValue = 2; 8313 static const int kNodeStateIsWeakValue = 2;
8326 static const int kNodeStateIsPendingValue = 3; 8314 static const int kNodeStateIsPendingValue = 3;
8327 static const int kNodeStateIsNearDeathValue = 4; 8315 static const int kNodeStateIsNearDeathValue = 4;
8328 static const int kNodeIsIndependentShift = 3; 8316 static const int kNodeIsIndependentShift = 3;
8329 static const int kNodeIsPartiallyDependentShift = 4;
8330 static const int kNodeIsActiveShift = 4; 8317 static const int kNodeIsActiveShift = 4;
8331 8318
8332 static const int kJSObjectType = 0xbc; 8319 static const int kJSObjectType = 0xbc;
8333 static const int kJSApiObjectType = 0xbb; 8320 static const int kJSApiObjectType = 0xbb;
8334 static const int kFirstNonstringType = 0x80; 8321 static const int kFirstNonstringType = 0x80;
8335 static const int kOddballType = 0x83; 8322 static const int kOddballType = 0x83;
8336 static const int kForeignType = 0x87; 8323 static const int kForeignType = 0x87;
8337 8324
8338 static const int kUndefinedOddballKind = 5; 8325 static const int kUndefinedOddballKind = 5;
8339 static const int kNullOddballKind = 3; 8326 static const int kNullOddballKind = 3;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
8615 8602
8616 template <class T> 8603 template <class T>
8617 void PersistentBase<T>::MarkIndependent() { 8604 void PersistentBase<T>::MarkIndependent() {
8618 typedef internal::Internals I; 8605 typedef internal::Internals I;
8619 if (this->IsEmpty()) return; 8606 if (this->IsEmpty()) return;
8620 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_), 8607 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
8621 true, 8608 true,
8622 I::kNodeIsIndependentShift); 8609 I::kNodeIsIndependentShift);
8623 } 8610 }
8624 8611
8625
8626 template <class T>
8627 void PersistentBase<T>::MarkPartiallyDependent() {
8628 typedef internal::Internals I;
8629 if (this->IsEmpty()) return;
8630 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_),
8631 true,
8632 I::kNodeIsPartiallyDependentShift);
8633 }
8634
8635
8636 template <class T> 8612 template <class T>
8637 void PersistentBase<T>::MarkActive() { 8613 void PersistentBase<T>::MarkActive() {
8638 typedef internal::Internals I; 8614 typedef internal::Internals I;
8639 if (this->IsEmpty()) return; 8615 if (this->IsEmpty()) return;
8640 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_), true, 8616 I::UpdateNodeFlag(reinterpret_cast<internal::Object**>(this->val_), true,
8641 I::kNodeIsActiveShift); 8617 I::kNodeIsActiveShift);
8642 } 8618 }
8643 8619
8644 8620
8645 template <class T> 8621 template <class T>
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
9692 */ 9668 */
9693 9669
9694 9670
9695 } // namespace v8 9671 } // namespace v8
9696 9672
9697 9673
9698 #undef TYPE_CHECK 9674 #undef TYPE_CHECK
9699 9675
9700 9676
9701 #endif // INCLUDE_V8_H_ 9677 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698