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

Side by Side Diff: src/builtins/builtins-promise.cc

Issue 2580533002: [stubs] Remove CSA::INTEGER_PARAMETERS in favor of CSA::INTPTR_PARAMETERS. (Closed)
Patch Set: Addressing comments 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 unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-internal.cc ('k') | src/builtins/builtins-regexp.cc » ('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 4
5 #include "src/builtins/builtins-utils.h" 5 #include "src/builtins/builtins-utils.h"
6 #include "src/builtins/builtins.h" 6 #include "src/builtins/builtins.h"
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stub-assembler.h" 8 #include "src/code-stub-assembler.h"
9 #include "src/promise-utils.h" 9 #include "src/promise-utils.h"
10 10
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 { 446 {
447 Label if_singlecallback(a), if_multiplecallbacks(a); 447 Label if_singlecallback(a), if_multiplecallbacks(a);
448 a->BranchIfJSObject(existing_deferred, &if_singlecallback, 448 a->BranchIfJSObject(existing_deferred, &if_singlecallback,
449 &if_multiplecallbacks); 449 &if_multiplecallbacks);
450 450
451 a->Bind(&if_singlecallback); 451 a->Bind(&if_singlecallback);
452 { 452 {
453 // Create new FixedArrays to store callbacks, and migrate 453 // Create new FixedArrays to store callbacks, and migrate
454 // existing callbacks. 454 // existing callbacks.
455 Node* const deferreds = 455 Node* const deferreds =
456 a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); 456 a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
457 a->StoreFixedArrayElement(deferreds, 0, existing_deferred); 457 a->StoreFixedArrayElement(deferreds, 0, existing_deferred);
458 a->StoreFixedArrayElement(deferreds, 1, deferred); 458 a->StoreFixedArrayElement(deferreds, 1, deferred);
459 459
460 Node* const fulfill_reactions = 460 Node* const fulfill_reactions =
461 a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); 461 a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
462 a->StoreFixedArrayElement( 462 a->StoreFixedArrayElement(
463 fulfill_reactions, 0, 463 fulfill_reactions, 0,
464 a->LoadObjectField(promise, JSPromise::kFulfillReactionsOffset)); 464 a->LoadObjectField(promise, JSPromise::kFulfillReactionsOffset));
465 a->StoreFixedArrayElement(fulfill_reactions, 1, var_on_resolve.value()); 465 a->StoreFixedArrayElement(fulfill_reactions, 1, var_on_resolve.value());
466 466
467 Node* const reject_reactions = 467 Node* const reject_reactions =
468 a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); 468 a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
469 a->StoreFixedArrayElement( 469 a->StoreFixedArrayElement(
470 reject_reactions, 0, 470 reject_reactions, 0,
471 a->LoadObjectField(promise, JSPromise::kRejectReactionsOffset)); 471 a->LoadObjectField(promise, JSPromise::kRejectReactionsOffset));
472 a->StoreFixedArrayElement(reject_reactions, 1, var_on_reject.value()); 472 a->StoreFixedArrayElement(reject_reactions, 1, var_on_reject.value());
473 473
474 // Store new FixedArrays in promise. 474 // Store new FixedArrays in promise.
475 a->StoreObjectField(promise, JSPromise::kDeferredOffset, deferreds); 475 a->StoreObjectField(promise, JSPromise::kDeferredOffset, deferreds);
476 a->StoreObjectField(promise, JSPromise::kFulfillReactionsOffset, 476 a->StoreObjectField(promise, JSPromise::kFulfillReactionsOffset,
477 fulfill_reactions); 477 fulfill_reactions);
478 a->StoreObjectField(promise, JSPromise::kRejectReactionsOffset, 478 a->StoreObjectField(promise, JSPromise::kRejectReactionsOffset,
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 863
864 Label out(&a); 864 Label out(&a);
865 InternalResolvePromise(&a, context, promise, result, &out); 865 InternalResolvePromise(&a, context, promise, result, &out);
866 866
867 a.Bind(&out); 867 a.Bind(&out);
868 a.Return(a.UndefinedConstant()); 868 a.Return(a.UndefinedConstant());
869 } 869 }
870 870
871 } // namespace internal 871 } // namespace internal
872 } // namespace v8 872 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-internal.cc ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698