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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/x64/lithium-codegen-x64.cc » ('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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4839 matching lines...) Expand 10 before | Expand all | Expand 10 after
4850 4850
4851 4851
4852 inline void Code::set_is_turbofanned(bool value) { 4852 inline void Code::set_is_turbofanned(bool value) {
4853 DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB); 4853 DCHECK(kind() == OPTIMIZED_FUNCTION || kind() == STUB);
4854 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); 4854 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
4855 int updated = IsTurbofannedField::update(previous, value); 4855 int updated = IsTurbofannedField::update(previous, value);
4856 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); 4856 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
4857 } 4857 }
4858 4858
4859 4859
4860 inline bool Code::can_have_weak_objects() {
4861 DCHECK(kind() == OPTIMIZED_FUNCTION);
4862 return CanHaveWeakObjectsField::decode(
4863 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
4864 }
4865
4866
4867 inline void Code::set_can_have_weak_objects(bool value) {
4868 DCHECK(kind() == OPTIMIZED_FUNCTION);
4869 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
4870 int updated = CanHaveWeakObjectsField::update(previous, value);
4871 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
4872 }
4873
4874
4860 bool Code::optimizable() { 4875 bool Code::optimizable() {
4861 DCHECK_EQ(FUNCTION, kind()); 4876 DCHECK_EQ(FUNCTION, kind());
4862 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; 4877 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
4863 } 4878 }
4864 4879
4865 4880
4866 void Code::set_optimizable(bool value) { 4881 void Code::set_optimizable(bool value) {
4867 DCHECK_EQ(FUNCTION, kind()); 4882 DCHECK_EQ(FUNCTION, kind());
4868 WRITE_BYTE_FIELD(this, kOptimizableOffset, value ? 1 : 0); 4883 WRITE_BYTE_FIELD(this, kOptimizableOffset, value ? 1 : 0);
4869 } 4884 }
(...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after
7502 #undef READ_SHORT_FIELD 7517 #undef READ_SHORT_FIELD
7503 #undef WRITE_SHORT_FIELD 7518 #undef WRITE_SHORT_FIELD
7504 #undef READ_BYTE_FIELD 7519 #undef READ_BYTE_FIELD
7505 #undef WRITE_BYTE_FIELD 7520 #undef WRITE_BYTE_FIELD
7506 #undef NOBARRIER_READ_BYTE_FIELD 7521 #undef NOBARRIER_READ_BYTE_FIELD
7507 #undef NOBARRIER_WRITE_BYTE_FIELD 7522 #undef NOBARRIER_WRITE_BYTE_FIELD
7508 7523
7509 } } // namespace v8::internal 7524 } } // namespace v8::internal
7510 7525
7511 #endif // V8_OBJECTS_INL_H_ 7526 #endif // V8_OBJECTS_INL_H_
OLDNEW
« 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