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

Unified Diff: src/objects-inl.h

Issue 866723002: Treat pointers in optimized code as strong before all weak dependencies are registered. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix check Created 5 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 613bc60c2f01afcb3e9e5350375303e8720b95af..b12b1b1eefb2fddc577443356686fd329c25efe6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4857,6 +4857,21 @@ inline void Code::set_is_turbofanned(bool value) {
}
+inline bool Code::can_have_weak_objects() {
+ DCHECK(kind() == OPTIMIZED_FUNCTION);
+ return CanHaveWeakObjectsField::decode(
+ READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
+}
+
+
+inline void Code::set_can_have_weak_objects(bool value) {
+ DCHECK(kind() == OPTIMIZED_FUNCTION);
+ int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
+ int updated = CanHaveWeakObjectsField::update(previous, value);
+ WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
+}
+
+
bool Code::optimizable() {
DCHECK_EQ(FUNCTION, kind());
return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
« no previous file with comments | « src/objects.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698