OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 8228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8239 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0)); | 8239 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0)); |
8240 } | 8240 } |
8241 | 8241 |
8242 void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) { | 8242 void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) { |
8243 CSA_ASSERT(this, TaggedIsSmi(status)); | 8243 CSA_ASSERT(this, TaggedIsSmi(status)); |
8244 StoreObjectField(promise, JSPromise::kStatusOffset, status); | 8244 StoreObjectField(promise, JSPromise::kStatusOffset, status); |
8245 StoreObjectField(promise, JSPromise::kResultOffset, result); | 8245 StoreObjectField(promise, JSPromise::kResultOffset, result); |
8246 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0)); | 8246 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0)); |
8247 } | 8247 } |
8248 | 8248 |
| 8249 Node* CodeStubAssembler::AllocatePromiseReactionJobInfo(Node* value, |
| 8250 Node* tasks, |
| 8251 Node* deferred, |
| 8252 Node* context) { |
| 8253 Node* const result = Allocate(PromiseReactionJobInfo::kSize); |
| 8254 StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex); |
| 8255 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset, |
| 8256 value); |
| 8257 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, |
| 8258 tasks); |
| 8259 StoreObjectFieldNoWriteBarrier( |
| 8260 result, PromiseReactionJobInfo::kDeferredOffset, deferred); |
| 8261 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugIdOffset, |
| 8262 Heap::kUndefinedValueRootIndex); |
| 8263 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
| 8264 Heap::kUndefinedValueRootIndex); |
| 8265 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
| 8266 context); |
| 8267 return result; |
| 8268 } |
| 8269 |
8249 } // namespace internal | 8270 } // namespace internal |
8250 } // namespace v8 | 8271 } // namespace v8 |
OLD | NEW |