Commit ea97a8fb authored by Peter Marshall's avatar Peter Marshall Committed by Commit Bot

[cleanup] Use the typed LoadObjectField in internal-gen CSA

Bug: v8:7310
Change-Id: I73f59cb4119e7f27828f09ac33fc247fc4983742
Reviewed-on: https://chromium-review.googlesource.com/937723Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51586}
parent b3ed3cc5
...@@ -848,8 +848,7 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) { ...@@ -848,8 +848,7 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
CSA_ASSERT(this, IntPtrGreaterThan(num_tasks, IntPtrConstant(0))); CSA_ASSERT(this, IntPtrGreaterThan(num_tasks, IntPtrConstant(0)));
SetPendingMicrotaskCount(IntPtrConstant(0)); SetPendingMicrotaskCount(IntPtrConstant(0));
SetMicrotaskQueue( SetMicrotaskQueue(EmptyFixedArrayConstant());
TNode<FixedArray>::UncheckedCast(EmptyFixedArrayConstant()));
Goto(&loop); Goto(&loop);
BIND(&loop); BIND(&loop);
...@@ -886,16 +885,16 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) { ...@@ -886,16 +885,16 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
BIND(&is_callable); BIND(&is_callable);
{ {
// Enter the context of the {microtask}. // Enter the context of the {microtask}.
TNode<Context> microtask_context = TNode<Context>::UncheckedCast( TNode<Context> microtask_context =
LoadObjectField(microtask, CallableTask::kContextOffset)); LoadObjectField<Context>(microtask, CallableTask::kContextOffset);
TNode<Context> native_context = TNode<Context> native_context =
TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context)); TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context));
CSA_ASSERT(this, IsNativeContext(native_context)); CSA_ASSERT(this, IsNativeContext(native_context));
EnterMicrotaskContext(microtask_context); EnterMicrotaskContext(microtask_context);
SetCurrentContext(native_context); SetCurrentContext(native_context);
TNode<JSReceiver> callable = TNode<JSReceiver>::UncheckedCast( TNode<JSReceiver> callable = LoadObjectField<JSReceiver>(
LoadObjectField(microtask, CallableTask::kCallableOffset)); microtask, CallableTask::kCallableOffset);
Node* const result = CallJS( Node* const result = CallJS(
CodeFactory::Call(isolate(), ConvertReceiverMode::kNullOrUndefined), CodeFactory::Call(isolate(), ConvertReceiverMode::kNullOrUndefined),
microtask_context, callable, UndefinedConstant()); microtask_context, callable, UndefinedConstant());
...@@ -930,9 +929,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) { ...@@ -930,9 +929,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
BIND(&is_promise_resolve_thenable_job); BIND(&is_promise_resolve_thenable_job);
{ {
// Enter the context of the {microtask}. // Enter the context of the {microtask}.
TNode<Context> microtask_context = TNode<Context> microtask_context = LoadObjectField<Context>(
TNode<Context>::UncheckedCast(LoadObjectField( microtask, PromiseResolveThenableJobTask::kContextOffset);
microtask, PromiseResolveThenableJobTask::kContextOffset));
TNode<Context> native_context = TNode<Context> native_context =
TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context)); TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context));
CSA_ASSERT(this, IsNativeContext(native_context)); CSA_ASSERT(this, IsNativeContext(native_context));
...@@ -958,8 +956,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) { ...@@ -958,8 +956,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
BIND(&is_promise_fulfill_reaction_job); BIND(&is_promise_fulfill_reaction_job);
{ {
// Enter the context of the {microtask}. // Enter the context of the {microtask}.
TNode<Context> microtask_context = TNode<Context>::UncheckedCast( TNode<Context> microtask_context = LoadObjectField<Context>(
LoadObjectField(microtask, PromiseReactionJobTask::kContextOffset)); microtask, PromiseReactionJobTask::kContextOffset);
TNode<Context> native_context = TNode<Context> native_context =
TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context)); TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context));
CSA_ASSERT(this, IsNativeContext(native_context)); CSA_ASSERT(this, IsNativeContext(native_context));
...@@ -992,8 +990,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) { ...@@ -992,8 +990,8 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
BIND(&is_promise_reject_reaction_job); BIND(&is_promise_reject_reaction_job);
{ {
// Enter the context of the {microtask}. // Enter the context of the {microtask}.
TNode<Context> microtask_context = TNode<Context>::UncheckedCast( TNode<Context> microtask_context = LoadObjectField<Context>(
LoadObjectField(microtask, PromiseReactionJobTask::kContextOffset)); microtask, PromiseReactionJobTask::kContextOffset);
TNode<Context> native_context = TNode<Context> native_context =
TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context)); TNode<Context>::UncheckedCast(LoadNativeContext(microtask_context));
CSA_ASSERT(this, IsNativeContext(native_context)); CSA_ASSERT(this, IsNativeContext(native_context));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment