[cleanup] Remove Sloppy-ness from builtins

Bug: v8:10155
Change-Id: Ia2eee32bface83bedeb52eb2b214809b5c657702
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2056471
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66272}
This commit is contained in:
Santiago Aboy Solanes 2020-02-14 11:11:19 +00:00 committed by Commit Bot
parent 60d165d8fa
commit 5306c2e4e6
8 changed files with 28 additions and 32 deletions

View File

@ -38,7 +38,7 @@ void Builtins::Generate_ConstructFunctionForwardVarargs(MacroAssembler* masm) {
TF_BUILTIN(ConstructWithArrayLike, CallOrConstructBuiltinsAssembler) {
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> arguments_list = CAST(Parameter(Descriptor::kArgumentsList));
TNode<Context> context = CAST(Parameter(Descriptor::kContext));
CallOrConstructWithArrayLike(target, new_target, arguments_list, context);
@ -46,7 +46,7 @@ TF_BUILTIN(ConstructWithArrayLike, CallOrConstructBuiltinsAssembler) {
TF_BUILTIN(ConstructWithSpread, CallOrConstructBuiltinsAssembler) {
TNode<Object> target = CAST(Parameter(Descriptor::kTarget));
SloppyTNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> new_target = CAST(Parameter(Descriptor::kNewTarget));
TNode<Object> spread = CAST(Parameter(Descriptor::kSpread));
TNode<Int32T> args_count =
UncheckedCast<Int32T>(Parameter(Descriptor::kActualArgumentsCount));
@ -160,8 +160,8 @@ TF_BUILTIN(FastNewObject, ConstructorBuiltinsAssembler) {
}
TNode<JSObject> ConstructorBuiltinsAssembler::EmitFastNewObject(
SloppyTNode<Context> context, SloppyTNode<JSFunction> target,
SloppyTNode<JSReceiver> new_target) {
TNode<Context> context, TNode<JSFunction> target,
TNode<JSReceiver> new_target) {
TVARIABLE(JSObject, var_obj);
Label call_runtime(this), end(this);
@ -177,8 +177,8 @@ TNode<JSObject> ConstructorBuiltinsAssembler::EmitFastNewObject(
}
TNode<JSObject> ConstructorBuiltinsAssembler::EmitFastNewObject(
SloppyTNode<Context> context, SloppyTNode<JSFunction> target,
SloppyTNode<JSReceiver> new_target, Label* call_runtime) {
TNode<Context> context, TNode<JSFunction> target,
TNode<JSReceiver> new_target, Label* call_runtime) {
// Verify that the new target is a JSFunction.
Label end(this);
TNode<JSFunction> new_target_func =

View File

@ -38,13 +38,13 @@ class ConstructorBuiltinsAssembler : public CodeStubAssembler {
Label* call_runtime);
TNode<JSObject> EmitCreateEmptyObjectLiteral(TNode<Context> context);
TNode<JSObject> EmitFastNewObject(SloppyTNode<Context> context,
SloppyTNode<JSFunction> target,
SloppyTNode<JSReceiver> new_target);
TNode<JSObject> EmitFastNewObject(TNode<Context> context,
TNode<JSFunction> target,
TNode<JSReceiver> new_target);
TNode<JSObject> EmitFastNewObject(SloppyTNode<Context> context,
SloppyTNode<JSFunction> target,
SloppyTNode<JSReceiver> new_target,
TNode<JSObject> EmitFastNewObject(TNode<Context> context,
TNode<JSFunction> target,
TNode<JSReceiver> new_target,
Label* call_runtime);
};

View File

@ -266,11 +266,11 @@ class RecordWriteCodeStubAssembler : public CodeStubAssembler {
}
}
TNode<BoolT> ShouldSkipFPRegs(SloppyTNode<Smi> mode) {
TNode<BoolT> ShouldSkipFPRegs(TNode<Smi> mode) {
return TaggedEqual(mode, SmiConstant(kDontSaveFPRegs));
}
TNode<BoolT> ShouldEmitRememberSet(SloppyTNode<Smi> remembered_set) {
TNode<BoolT> ShouldEmitRememberSet(TNode<Smi> remembered_set) {
return TaggedEqual(remembered_set, SmiConstant(EMIT_REMEMBERED_SET));
}

View File

@ -24,8 +24,8 @@ TNode<Object> IteratorBuiltinsAssembler::GetIteratorMethod(
}
IteratorRecord IteratorBuiltinsAssembler::GetIterator(
SloppyTNode<Context> context, SloppyTNode<Object> object,
Label* if_exception, TVariable<Object>* exception) {
TNode<Context> context, TNode<Object> object, Label* if_exception,
TVariable<Object>* exception) {
TNode<Object> method = GetIteratorMethod(context, object);
return GetIterator(context, object, method, if_exception, exception);
}

View File

@ -24,8 +24,7 @@ class IteratorBuiltinsAssembler : public CodeStubAssembler {
// https://tc39.github.io/ecma262/#sec-getiterator --- never used for
// @@asyncIterator.
IteratorRecord GetIterator(SloppyTNode<Context> context,
SloppyTNode<Object> object,
IteratorRecord GetIterator(TNode<Context> context, TNode<Object> object,
Label* if_exception = nullptr,
TVariable<Object>* exception = nullptr);
IteratorRecord GetIterator(TNode<Context> context, TNode<Object> object,

View File

@ -45,7 +45,7 @@ class MicrotaskQueueBuiltinsAssembler : public CodeStubAssembler {
void RewindEnteredContext(TNode<IntPtrT> saved_entered_context_count);
void RunPromiseHook(Runtime::FunctionId id, TNode<Context> context,
SloppyTNode<HeapObject> promise_or_capability);
TNode<HeapObject> promise_or_capability);
};
TNode<RawPtrT> MicrotaskQueueBuiltinsAssembler::GetMicrotaskQueue(
@ -415,7 +415,7 @@ void MicrotaskQueueBuiltinsAssembler::RewindEnteredContext(
void MicrotaskQueueBuiltinsAssembler::RunPromiseHook(
Runtime::FunctionId id, TNode<Context> context,
SloppyTNode<HeapObject> promise_or_capability) {
TNode<HeapObject> promise_or_capability) {
Label hook(this, Label::kDeferred), done_hook(this);
Branch(IsPromiseHookEnabledOrDebugIsActiveOrHasAsyncEventDelegate(), &hook,
&done_hook);

View File

@ -164,9 +164,9 @@ void RegExpBuiltinsAssembler::FastStoreLastIndex(TNode<JSRegExp> regexp,
StoreObjectField(regexp, field_offset, value);
}
void RegExpBuiltinsAssembler::SlowStoreLastIndex(SloppyTNode<Context> context,
SloppyTNode<Object> regexp,
SloppyTNode<Object> value) {
void RegExpBuiltinsAssembler::SlowStoreLastIndex(TNode<Context> context,
TNode<Object> regexp,
TNode<Object> value) {
TNode<String> name = HeapConstant(isolate()->factory()->lastIndex_string());
SetPropertyStrict(context, regexp, name, value);
}
@ -1237,8 +1237,8 @@ TNode<BoolT> RegExpBuiltinsAssembler::FlagGetter(TNode<Context> context,
}
TNode<Number> RegExpBuiltinsAssembler::AdvanceStringIndex(
SloppyTNode<String> string, SloppyTNode<Number> index,
SloppyTNode<BoolT> is_unicode, bool is_fastpath) {
TNode<String> string, TNode<Number> index, TNode<BoolT> is_unicode,
bool is_fastpath) {
CSA_ASSERT(this, IsString(string));
CSA_ASSERT(this, IsNumberNormalized(index));
if (is_fastpath) CSA_ASSERT(this, TaggedIsPositiveSmi(index));

View File

@ -37,9 +37,8 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
TNode<Object> SlowLoadLastIndex(TNode<Context> context, TNode<Object> regexp);
void FastStoreLastIndex(TNode<JSRegExp> regexp, TNode<Smi> value);
void SlowStoreLastIndex(SloppyTNode<Context> context,
SloppyTNode<Object> regexp,
SloppyTNode<Object> value);
void SlowStoreLastIndex(TNode<Context> context, TNode<Object> regexp,
TNode<Object> value);
// Loads {var_string_start} and {var_string_end} with the corresponding
// offsets into the given {string_data}.
@ -140,10 +139,8 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
const TNode<Object> maybe_pattern,
const TNode<Object> maybe_flags);
TNode<Number> AdvanceStringIndex(SloppyTNode<String> string,
SloppyTNode<Number> index,
SloppyTNode<BoolT> is_unicode,
bool is_fastpath);
TNode<Number> AdvanceStringIndex(TNode<String> string, TNode<Number> index,
TNode<BoolT> is_unicode, bool is_fastpath);
TNode<Smi> AdvanceStringIndexFast(TNode<String> string, TNode<Smi> index,
TNode<BoolT> is_unicode) {