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

Unified Diff: src/builtins/builtins-promise.cc

Issue 2591193002: [promises] Simplify PromiseSetHasHandler (Closed)
Patch Set: WordOr -> SmiOr 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-promise.cc
diff --git a/src/builtins/builtins-promise.cc b/src/builtins/builtins-promise.cc
index 46f6043bd3c85350d81ea25da6940d0219a4b0ef..c0411d90f56aad1a87b5749e95660aba36b7c3b7 100644
--- a/src/builtins/builtins-promise.cc
+++ b/src/builtins/builtins-promise.cc
@@ -94,11 +94,10 @@ Node* PromiseBuiltinsAssembler::PromiseHasHandler(Node* promise) {
}
void PromiseBuiltinsAssembler::PromiseSetHasHandler(Node* promise) {
- Node* const flags =
- SmiUntag(LoadObjectField(promise, JSPromise::kFlagsOffset));
+ Node* const flags = LoadObjectField(promise, JSPromise::kFlagsOffset);
Node* const new_flags =
- WordOr(flags, IntPtrConstant(1 << JSPromise::kHasHandlerBit));
- StoreObjectField(promise, JSPromise::kFlagsOffset, SmiTag(new_flags));
+ SmiOr(flags, SmiConstant(1 << JSPromise::kHasHandlerBit));
+ StoreObjectFieldNoWriteBarrier(promise, JSPromise::kFlagsOffset, new_flags);
}
Node* PromiseBuiltinsAssembler::SpeciesConstructor(Node* context, Node* object,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698