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

Unified Diff: src/code-stub-assembler.cc

Issue 2573703002: Add PromiseReactionJobInfo to CSA (Closed)
Patch Set: fix test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stub-assembler.h ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index e67f81f8e1ad28afb5ac25e2ac682167e964a484..17862fac45519286bcb2d30c51addb69ed3bcd6d 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -8246,5 +8246,26 @@ void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) {
StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0));
}
+Node* CodeStubAssembler::AllocatePromiseReactionJobInfo(Node* value,
+ Node* tasks,
+ Node* deferred,
+ Node* context) {
+ Node* const result = Allocate(PromiseReactionJobInfo::kSize);
+ StoreMapNoWriteBarrier(result, Heap::kPromiseReactionJobInfoMapRootIndex);
+ StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kValueOffset,
+ value);
+ StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kTasksOffset,
+ tasks);
+ StoreObjectFieldNoWriteBarrier(
+ result, PromiseReactionJobInfo::kDeferredOffset, deferred);
+ StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugIdOffset,
+ Heap::kUndefinedValueRootIndex);
+ StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset,
+ Heap::kUndefinedValueRootIndex);
+ StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset,
+ context);
+ return result;
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/code-stub-assembler.h ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698