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

Side by Side Diff: src/objects-inl.h

Issue 2497523002: [promises] Move promise constructor to TFS (Closed)
Patch Set: fix nits Created 4 years 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/runtime/runtime.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 // 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 5114 matching lines...) Expand 10 before | Expand all | Expand 10 after
5125 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset)); 5125 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
5126 } 5126 }
5127 5127
5128 inline void Code::set_is_construct_stub(bool value) { 5128 inline void Code::set_is_construct_stub(bool value) {
5129 DCHECK(kind() == BUILTIN); 5129 DCHECK(kind() == BUILTIN);
5130 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset); 5130 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
5131 int updated = IsConstructStubField::update(previous, value); 5131 int updated = IsConstructStubField::update(previous, value);
5132 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated); 5132 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
5133 } 5133 }
5134 5134
5135 inline bool Code::is_promise_rejection() {
5136 DCHECK(kind() == BUILTIN);
5137 return IsPromiseRejectionField::decode(
5138 READ_UINT32_FIELD(this, kKindSpecificFlags1Offset));
5139 }
5140
5141 inline void Code::set_is_promise_rejection(bool value) {
5142 DCHECK(kind() == BUILTIN);
5143 int previous = READ_UINT32_FIELD(this, kKindSpecificFlags1Offset);
5144 int updated = IsPromiseRejectionField::update(previous, value);
5145 WRITE_UINT32_FIELD(this, kKindSpecificFlags1Offset, updated);
5146 }
5147
5135 bool Code::has_deoptimization_support() { 5148 bool Code::has_deoptimization_support() {
5136 DCHECK_EQ(FUNCTION, kind()); 5149 DCHECK_EQ(FUNCTION, kind());
5137 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); 5150 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags);
5138 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags); 5151 return FullCodeFlagsHasDeoptimizationSupportField::decode(flags);
5139 } 5152 }
5140 5153
5141 5154
5142 void Code::set_has_deoptimization_support(bool value) { 5155 void Code::set_has_deoptimization_support(bool value) {
5143 DCHECK_EQ(FUNCTION, kind()); 5156 DCHECK_EQ(FUNCTION, kind());
5144 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags); 5157 unsigned flags = READ_UINT32_FIELD(this, kFullCodeFlags);
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
8450 #undef WRITE_INT64_FIELD 8463 #undef WRITE_INT64_FIELD
8451 #undef READ_BYTE_FIELD 8464 #undef READ_BYTE_FIELD
8452 #undef WRITE_BYTE_FIELD 8465 #undef WRITE_BYTE_FIELD
8453 #undef NOBARRIER_READ_BYTE_FIELD 8466 #undef NOBARRIER_READ_BYTE_FIELD
8454 #undef NOBARRIER_WRITE_BYTE_FIELD 8467 #undef NOBARRIER_WRITE_BYTE_FIELD
8455 8468
8456 } // namespace internal 8469 } // namespace internal
8457 } // namespace v8 8470 } // namespace v8
8458 8471
8459 #endif // V8_OBJECTS_INL_H_ 8472 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698