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 8236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8247 StoreObjectFieldNoWriteBarrier(fun, JSFunction::kContextOffset, context); | 8247 StoreObjectFieldNoWriteBarrier(fun, JSFunction::kContextOffset, context); |
8248 StoreObjectFieldNoWriteBarrier(fun, JSFunction::kCodeEntryOffset, code_entry, | 8248 StoreObjectFieldNoWriteBarrier(fun, JSFunction::kCodeEntryOffset, code_entry, |
8249 MachineType::PointerRepresentation()); | 8249 MachineType::PointerRepresentation()); |
8250 StoreObjectFieldRoot(fun, JSFunction::kNextFunctionLinkOffset, | 8250 StoreObjectFieldRoot(fun, JSFunction::kNextFunctionLinkOffset, |
8251 Heap::kUndefinedValueRootIndex); | 8251 Heap::kUndefinedValueRootIndex); |
8252 | 8252 |
8253 return fun; | 8253 return fun; |
8254 } | 8254 } |
8255 | 8255 |
8256 Node* CodeStubAssembler::AllocatePromiseReactionJobInfo( | 8256 Node* CodeStubAssembler::AllocatePromiseReactionJobInfo( |
8257 Node* promise, Node* value, Node* tasks, Node* deferred_promise, | 8257 Node* value, Node* tasks, Node* deferred_promise, Node* deferred_on_resolve, |
8258 Node* deferred_on_resolve, Node* deferred_on_reject, Node* context) { | 8258 Node* deferred_on_reject, Node* context) { |
8259 Node* const result = Allocate(PromiseReactionJobInfo::kSize); | 8259 Node* const result = Allocate(PromiseReactionJobInfo::kSize); |
8260 StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex); | 8260 StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex); |
8261 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset, | 8261 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset, |
8262 value); | 8262 value); |
8263 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kPromiseOffset, | |
8264 promise); | |
8265 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, | 8263 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, |
8266 tasks); | 8264 tasks); |
8267 StoreObjectFieldNoWriteBarrier( | 8265 StoreObjectFieldNoWriteBarrier( |
8268 result, PromiseReactionJobInfo::kDeferredPromiseOffset, deferred_promise); | 8266 result, PromiseReactionJobInfo::kDeferredPromiseOffset, deferred_promise); |
8269 StoreObjectFieldNoWriteBarrier( | 8267 StoreObjectFieldNoWriteBarrier( |
8270 result, PromiseReactionJobInfo::kDeferredOnResolveOffset, | 8268 result, PromiseReactionJobInfo::kDeferredOnResolveOffset, |
8271 deferred_on_resolve); | 8269 deferred_on_resolve); |
8272 StoreObjectFieldNoWriteBarrier( | 8270 StoreObjectFieldNoWriteBarrier( |
8273 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, | 8271 result, PromiseReactionJobInfo::kDeferredOnRejectOffset, |
8274 deferred_on_reject); | 8272 deferred_on_reject); |
8275 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, | 8273 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kDebugIdOffset, |
8276 SmiConstant(kDebugPromiseNoID)); | 8274 SmiConstant(kDebugPromiseNoID)); |
8277 StoreObjectFieldNoWriteBarrier(result, | 8275 StoreObjectFieldNoWriteBarrier(result, |
8278 PromiseReactionJobInfo::kDebugNameOffset, | 8276 PromiseReactionJobInfo::kDebugNameOffset, |
8279 SmiConstant(kDebugNotActive)); | 8277 SmiConstant(kDebugNotActive)); |
8280 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8278 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8281 context); | 8279 context); |
8282 return result; | 8280 return result; |
8283 } | 8281 } |
8284 | 8282 |
8285 } // namespace internal | 8283 } // namespace internal |
8286 } // namespace v8 | 8284 } // namespace v8 |
OLD | NEW |