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

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

Issue 2573573004: [stubs] Enable graph verification for builtins. (Closed)
Patch Set: 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
Index: src/builtins/builtins-promise.cc
diff --git a/src/builtins/builtins-promise.cc b/src/builtins/builtins-promise.cc
index 8acd509ccbf9a2f1c6c2662065439a04e69615b2..e1766270afc58a0d91012c92a66d70ff8060389d 100644
--- a/src/builtins/builtins-promise.cc
+++ b/src/builtins/builtins-promise.cc
@@ -272,7 +272,8 @@ compiler::Node* PromiseHasHandler(CodeStubAssembler* a,
void PromiseSetHasHandler(CodeStubAssembler* a, compiler::Node* promise) {
typedef compiler::Node Node;
- Node* const flags = a->LoadObjectField(promise, JSPromise::kFlagsOffset);
+ Node* const flags =
+ a->SmiUntag(a->LoadObjectField(promise, JSPromise::kFlagsOffset));
Node* const new_flags =
a->WordOr(flags, a->IntPtrConstant(1 << JSPromise::kHasHandlerBit));
a->StoreObjectField(promise, JSPromise::kFlagsOffset, a->SmiTag(new_flags));
@@ -345,10 +346,10 @@ void AppendPromiseCallback(CodeStubAssembler* a, int offset,
Node* elements = a->LoadObjectField(promise, offset);
Node* length = a->LoadFixedArrayBaseLength(elements);
CodeStubAssembler::ParameterMode mode = a->OptimalParameterMode();
- length = a->UntagParameter(length, mode);
+ length = a->TaggedToParameter(length, mode);
Node* delta = a->IntPtrOrSmiConstant(1, mode);
- Node* new_capacity = a->IntPtrAdd(length, delta);
+ Node* new_capacity = a->IntPtrOrSmiAdd(length, delta, mode);
const ElementsKind kind = FAST_ELEMENTS;
const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER;

Powered by Google App Engine
This is Rietveld 408576698