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

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

Issue 2604273003: [csa] Refactor promises API (Closed)
Patch Set: comments Created 3 years, 12 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 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 bc6a5dc84ae12de3446a6fe8b0cb474c9d61c45c..9215a19b5dddfb93bab42abd828859063a5f2580 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -8315,30 +8315,6 @@ Node* CodeStubAssembler::AllocateFunctionWithMapAndContext(Node* map,
return fun;
}
-Node* CodeStubAssembler::AllocateJSPromise(Node* context) {
- Node* const native_context = LoadNativeContext(context);
- Node* const promise_fun =
- LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX);
- Node* const initial_map =
- LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset);
- Node* const instance = AllocateJSObjectFromMap(initial_map);
-
- return instance;
-}
-
-void CodeStubAssembler::PromiseInit(Node* promise) {
- StoreObjectField(promise, JSPromise::kStatusOffset,
- SmiConstant(v8::Promise::kPending));
- StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0));
-}
-
-void CodeStubAssembler::PromiseSet(Node* promise, Node* status, Node* result) {
- CSA_ASSERT(this, TaggedIsSmi(status));
- StoreObjectField(promise, JSPromise::kStatusOffset, status);
- StoreObjectField(promise, JSPromise::kResultOffset, result);
- StoreObjectField(promise, JSPromise::kFlagsOffset, SmiConstant(0));
-}
-
Node* CodeStubAssembler::AllocatePromiseReactionJobInfo(
Node* promise, Node* value, Node* tasks, Node* deferred_promise,
Node* deferred_on_resolve, Node* deferred_on_reject, Node* context) {
« 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