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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2590563003: [promises] Remove deferred object (Closed)
Patch Set: rebase Created 3 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/code-stub-assembler.h ('k') | src/factory.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 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 8322 matching lines...) Expand 10 before | Expand all | Expand 10 after
8333 } 8333 }
8334 8334
8335 void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) { 8335 void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) {
8336 CSA_ASSERT(this, TaggedIsSmi(status)); 8336 CSA_ASSERT(this, TaggedIsSmi(status));
8337 StoreObjectField(promise, JSPromise::kStatusOffset, status); 8337 StoreObjectField(promise, JSPromise::kStatusOffset, status);
8338 StoreObjectField(promise, JSPromise::kResultOffset, result); 8338 StoreObjectField(promise, JSPromise::kResultOffset, result);
8339 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0)); 8339 StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0));
8340 } 8340 }
8341 8341
8342 Node* CodeStubAssembler::AllocatePromiseReactionJobInfo( 8342 Node* CodeStubAssembler::AllocatePromiseReactionJobInfo(
8343 Node* value, Node* promise, Node* tasks, Node* deferred, Node* context) { 8343 Node* promise, Node* value, Node* tasks, Node* deferred_promise,
8344 Node* deferred_on_resolve, Node* deferred_on_reject, Node* context) {
8344 Node* const result = Allocate(PromiseReactionJobInfo::kSize); 8345 Node* const result = Allocate(PromiseReactionJobInfo::kSize);
8345 StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex); 8346 StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex);
8347 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset,
8348 value);
8346 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kPromiseOffset, 8349 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kPromiseOffset,
8347 promise); 8350 promise);
8348 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset,
8349 value);
8350 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset, 8351 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset,
8351 tasks); 8352 tasks);
8352 StoreObjectFieldNoWriteBarrier( 8353 StoreObjectFieldNoWriteBarrier(
8353 result, PromiseReactionJobInfo::kDeferredOffset, deferred); 8354 result, PromiseReactionJobInfo::kDeferredPromiseOffset, deferred_promise);
8355 StoreObjectFieldNoWriteBarrier(
8356 result, PromiseReactionJobInfo::kDeferredOnResolveOffset,
8357 deferred_on_resolve);
8358 StoreObjectFieldNoWriteBarrier(
8359 result, PromiseReactionJobInfo::kDeferredOnRejectOffset,
8360 deferred_on_reject);
8354 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugIdOffset, 8361 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugIdOffset,
8355 Heap::kUndefinedValueRootIndex); 8362 Heap::kUndefinedValueRootIndex);
8356 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, 8363 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset,
8357 Heap::kUndefinedValueRootIndex); 8364 Heap::kUndefinedValueRootIndex);
8358 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, 8365 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset,
8359 context); 8366 context);
8360 return result; 8367 return result;
8361 } 8368 }
8362 8369
8363 } // namespace internal 8370 } // namespace internal
8364 } // namespace v8 8371 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698