Commit 93c8a253 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

Regex replaced "TNode<_> const" to "const TNode<_>"

Bug: v8:9810
Change-Id: I2893c3066616b8fb5b3bebde4797adb0dac109c4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1889878
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64659}
parent 71958d2a
...@@ -113,8 +113,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewRestParameter( ...@@ -113,8 +113,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewRestParameter(
TNode<BInt> rest_count = TNode<BInt> rest_count =
IntPtrOrSmiSub(info.argument_count, info.formal_parameter_count); IntPtrOrSmiSub(info.argument_count, info.formal_parameter_count);
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const array_map = const TNode<Map> array_map =
LoadJSArrayElementsMap(PACKED_ELEMENTS, native_context); LoadJSArrayElementsMap(PACKED_ELEMENTS, native_context);
GotoIf(IntPtrOrSmiLessThanOrEqual(rest_count, zero), &no_rest_parameters); GotoIf(IntPtrOrSmiLessThanOrEqual(rest_count, zero), &no_rest_parameters);
...@@ -160,7 +160,7 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewStrictArguments( ...@@ -160,7 +160,7 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewStrictArguments(
info.argument_count, &runtime, info.argument_count, &runtime,
JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize, mode); JSStrictArgumentsObject::kSize + FixedArray::kHeaderSize, mode);
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> map = CAST( TNode<Map> map = CAST(
LoadContextElement(native_context, Context::STRICT_ARGUMENTS_MAP_INDEX)); LoadContextElement(native_context, Context::STRICT_ARGUMENTS_MAP_INDEX));
GotoIf(BIntEqual(info.argument_count, zero), &empty); GotoIf(BIntEqual(info.argument_count, zero), &empty);
...@@ -220,8 +220,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments( ...@@ -220,8 +220,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(
elements_allocated, &runtime, elements_allocated, &runtime,
JSSloppyArgumentsObject::kSize + FixedArray::kHeaderSize * 2, mode); JSSloppyArgumentsObject::kSize + FixedArray::kHeaderSize * 2, mode);
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const map = CAST(LoadContextElement( const TNode<Map> map = CAST(LoadContextElement(
native_context, Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX)); native_context, Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX));
ArgumentsAllocationResult alloc_result = ArgumentsAllocationResult alloc_result =
AllocateArgumentsObject(map, info.argument_count, parameter_map_size, AllocateArgumentsObject(map, info.argument_count, parameter_map_size,
...@@ -308,7 +308,7 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments( ...@@ -308,7 +308,7 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(
GotoIfFixedArraySizeDoesntFitInNewSpace( GotoIfFixedArraySizeDoesntFitInNewSpace(
info.argument_count, &runtime, info.argument_count, &runtime,
JSSloppyArgumentsObject::kSize + FixedArray::kHeaderSize, mode); JSSloppyArgumentsObject::kSize + FixedArray::kHeaderSize, mode);
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> map = CAST(LoadContextElement( TNode<Map> map = CAST(LoadContextElement(
native_context, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); native_context, Context::SLOPPY_ARGUMENTS_MAP_INDEX));
result = ConstructParametersObjectFromArgs( result = ConstructParametersObjectFromArgs(
...@@ -322,8 +322,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments( ...@@ -322,8 +322,8 @@ TNode<JSObject> ArgumentsBuiltinsAssembler::EmitFastNewSloppyArguments(
BIND(&empty); BIND(&empty);
{ {
Comment("Empty JSSloppyArgumentsObject"); Comment("Empty JSSloppyArgumentsObject");
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const map = CAST(LoadContextElement( const TNode<Map> map = CAST(LoadContextElement(
native_context, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); native_context, Context::SLOPPY_ARGUMENTS_MAP_INDEX));
ArgumentsAllocationResult alloc_result = ArgumentsAllocationResult alloc_result =
AllocateArgumentsObject(map, zero, {}, JSSloppyArgumentsObject::kSize); AllocateArgumentsObject(map, zero, {}, JSSloppyArgumentsObject::kSize);
......
...@@ -1618,7 +1618,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler { ...@@ -1618,7 +1618,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler {
// b. Let exists be ? HasProperty(source, P). // b. Let exists be ? HasProperty(source, P).
CSA_ASSERT(this, CSA_ASSERT(this,
SmiGreaterThanOrEqual(CAST(source_index), SmiConstant(0))); SmiGreaterThanOrEqual(CAST(source_index), SmiConstant(0)));
TNode<Oddball> const exists = const TNode<Oddball> exists =
HasProperty(context, source, source_index, kHasProperty); HasProperty(context, source, source_index, kHasProperty);
// c. If exists is true, then // c. If exists is true, then
...@@ -1660,7 +1660,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler { ...@@ -1660,7 +1660,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler {
CSA_ASSERT(this, IsJSArray(element)); CSA_ASSERT(this, IsJSArray(element));
// 1. Let elementLen be ? ToLength(? Get(element, "length")). // 1. Let elementLen be ? ToLength(? Get(element, "length")).
TNode<Object> const element_length = const TNode<Object> element_length =
LoadObjectField(element, JSArray::kLengthOffset); LoadObjectField(element, JSArray::kLengthOffset);
// 2. Set targetIndex to ? FlattenIntoArray(target, element, // 2. Set targetIndex to ? FlattenIntoArray(target, element,
...@@ -1677,7 +1677,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler { ...@@ -1677,7 +1677,7 @@ class ArrayFlattenAssembler : public CodeStubAssembler {
CSA_ASSERT(this, IsJSProxy(element)); CSA_ASSERT(this, IsJSProxy(element));
// 1. Let elementLen be ? ToLength(? Get(element, "length")). // 1. Let elementLen be ? ToLength(? Get(element, "length")).
TNode<Number> const element_length = ToLength_Inline( const TNode<Number> element_length = ToLength_Inline(
context, GetProperty(context, element, LengthStringConstant())); context, GetProperty(context, element, LengthStringConstant()));
// 2. Set targetIndex to ? FlattenIntoArray(target, element, // 2. Set targetIndex to ? FlattenIntoArray(target, element,
...@@ -1758,18 +1758,18 @@ TF_BUILTIN(FlatMapIntoArray, ArrayFlattenAssembler) { ...@@ -1758,18 +1758,18 @@ TF_BUILTIN(FlatMapIntoArray, ArrayFlattenAssembler) {
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flat
TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) { TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) {
TNode<IntPtrT> const argc = const TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount)); ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
CodeStubArguments args(this, argc); CodeStubArguments args(this, argc);
TNode<Context> const context = CAST(Parameter(Descriptor::kContext)); const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<Object> const receiver = args.GetReceiver(); const TNode<Object> receiver = args.GetReceiver();
TNode<Object> const depth = args.GetOptionalArgumentValue(0); const TNode<Object> depth = args.GetOptionalArgumentValue(0);
// 1. Let O be ? ToObject(this value). // 1. Let O be ? ToObject(this value).
TNode<JSReceiver> const o = ToObject_Inline(context, receiver); const TNode<JSReceiver> o = ToObject_Inline(context, receiver);
// 2. Let sourceLen be ? ToLength(? Get(O, "length")). // 2. Let sourceLen be ? ToLength(? Get(O, "length")).
TNode<Number> const source_length = const TNode<Number> source_length =
ToLength_Inline(context, GetProperty(context, o, LengthStringConstant())); ToLength_Inline(context, GetProperty(context, o, LengthStringConstant()));
// 3. Let depthNum be 1. // 3. Let depthNum be 1.
...@@ -1786,9 +1786,9 @@ TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) { ...@@ -1786,9 +1786,9 @@ TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) {
BIND(&done); BIND(&done);
// 5. Let A be ? ArraySpeciesCreate(O, 0). // 5. Let A be ? ArraySpeciesCreate(O, 0).
TNode<JSReceiver> const constructor = const TNode<JSReceiver> constructor =
CAST(CallRuntime(Runtime::kArraySpeciesConstructor, context, o)); CAST(CallRuntime(Runtime::kArraySpeciesConstructor, context, o));
TNode<JSReceiver> const a = Construct(context, constructor, SmiConstant(0)); const TNode<JSReceiver> a = Construct(context, constructor, SmiConstant(0));
// 6. Perform ? FlattenIntoArray(A, O, sourceLen, 0, depthNum). // 6. Perform ? FlattenIntoArray(A, O, sourceLen, 0, depthNum).
CallBuiltin(Builtins::kFlattenIntoArray, context, a, o, source_length, CallBuiltin(Builtins::kFlattenIntoArray, context, a, o, source_length,
...@@ -1800,18 +1800,18 @@ TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) { ...@@ -1800,18 +1800,18 @@ TF_BUILTIN(ArrayPrototypeFlat, CodeStubAssembler) {
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap // https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
TF_BUILTIN(ArrayPrototypeFlatMap, CodeStubAssembler) { TF_BUILTIN(ArrayPrototypeFlatMap, CodeStubAssembler) {
TNode<IntPtrT> const argc = const TNode<IntPtrT> argc =
ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount)); ChangeInt32ToIntPtr(Parameter(Descriptor::kJSActualArgumentsCount));
CodeStubArguments args(this, argc); CodeStubArguments args(this, argc);
TNode<Context> const context = CAST(Parameter(Descriptor::kContext)); const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<Object> const receiver = args.GetReceiver(); const TNode<Object> receiver = args.GetReceiver();
TNode<Object> const mapper_function = args.GetOptionalArgumentValue(0); const TNode<Object> mapper_function = args.GetOptionalArgumentValue(0);
// 1. Let O be ? ToObject(this value). // 1. Let O be ? ToObject(this value).
TNode<JSReceiver> const o = ToObject_Inline(context, receiver); const TNode<JSReceiver> o = ToObject_Inline(context, receiver);
// 2. Let sourceLen be ? ToLength(? Get(O, "length")). // 2. Let sourceLen be ? ToLength(? Get(O, "length")).
TNode<Number> const source_length = const TNode<Number> source_length =
ToLength_Inline(context, GetProperty(context, o, LengthStringConstant())); ToLength_Inline(context, GetProperty(context, o, LengthStringConstant()));
// 3. If IsCallable(mapperFunction) is false, throw a TypeError exception. // 3. If IsCallable(mapperFunction) is false, throw a TypeError exception.
...@@ -1820,12 +1820,12 @@ TF_BUILTIN(ArrayPrototypeFlatMap, CodeStubAssembler) { ...@@ -1820,12 +1820,12 @@ TF_BUILTIN(ArrayPrototypeFlatMap, CodeStubAssembler) {
GotoIfNot(IsCallable(CAST(mapper_function)), &if_not_callable); GotoIfNot(IsCallable(CAST(mapper_function)), &if_not_callable);
// 4. If thisArg is present, let T be thisArg; else let T be undefined. // 4. If thisArg is present, let T be thisArg; else let T be undefined.
TNode<Object> const t = args.GetOptionalArgumentValue(1); const TNode<Object> t = args.GetOptionalArgumentValue(1);
// 5. Let A be ? ArraySpeciesCreate(O, 0). // 5. Let A be ? ArraySpeciesCreate(O, 0).
TNode<JSReceiver> const constructor = const TNode<JSReceiver> constructor =
CAST(CallRuntime(Runtime::kArraySpeciesConstructor, context, o)); CAST(CallRuntime(Runtime::kArraySpeciesConstructor, context, o));
TNode<JSReceiver> const a = Construct(context, constructor, SmiConstant(0)); const TNode<JSReceiver> a = Construct(context, constructor, SmiConstant(0));
// 6. Perform ? FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T). // 6. Perform ? FlattenIntoArray(A, O, sourceLen, 0, 1, mapperFunction, T).
CallBuiltin(Builtins::kFlatMapIntoArray, context, a, o, source_length, CallBuiltin(Builtins::kFlatMapIntoArray, context, a, o, source_length,
......
...@@ -30,7 +30,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld( ...@@ -30,7 +30,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld(
TNode<IntPtrT> on_resolve_context_index, TNode<IntPtrT> on_resolve_context_index,
TNode<IntPtrT> on_reject_context_index, TNode<IntPtrT> on_reject_context_index,
TNode<Oddball> is_predicted_as_caught) { TNode<Oddball> is_predicted_as_caught) {
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
static const int kWrappedPromiseOffset = static const int kWrappedPromiseOffset =
FixedArray::SizeFor(Context::MIN_CONTEXT_EXTENDED_SLOTS); FixedArray::SizeFor(Context::MIN_CONTEXT_EXTENDED_SLOTS);
...@@ -51,7 +51,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld( ...@@ -51,7 +51,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld(
StoreObjectFieldNoWriteBarrier( StoreObjectFieldNoWriteBarrier(
closure_context, Context::kLengthOffset, closure_context, Context::kLengthOffset,
SmiConstant(Context::MIN_CONTEXT_EXTENDED_SLOTS)); SmiConstant(Context::MIN_CONTEXT_EXTENDED_SLOTS));
TNode<Object> const empty_scope_info = const TNode<Object> empty_scope_info =
LoadContextElement(native_context, Context::SCOPE_INFO_INDEX); LoadContextElement(native_context, Context::SCOPE_INFO_INDEX);
StoreContextElementNoWriteBarrier( StoreContextElementNoWriteBarrier(
closure_context, Context::SCOPE_INFO_INDEX, empty_scope_info); closure_context, Context::SCOPE_INFO_INDEX, empty_scope_info);
...@@ -62,10 +62,10 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld( ...@@ -62,10 +62,10 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOld(
} }
// Let promiseCapability be ! NewPromiseCapability(%Promise%). // Let promiseCapability be ! NewPromiseCapability(%Promise%).
TNode<JSFunction> const promise_fun = const TNode<JSFunction> promise_fun =
CAST(LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX)); CAST(LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX));
CSA_ASSERT(this, IsFunctionWithPrototypeSlotMap(LoadMap(promise_fun))); CSA_ASSERT(this, IsFunctionWithPrototypeSlotMap(LoadMap(promise_fun)));
TNode<Map> const promise_map = CAST( const TNode<Map> promise_map = CAST(
LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset)); LoadObjectField(promise_fun, JSFunction::kPrototypeOrInitialMapOffset));
// Assert that the JSPromise map has an instance size is // Assert that the JSPromise map has an instance size is
// JSPromise::kSizeWithEmbedderFields. // JSPromise::kSizeWithEmbedderFields.
...@@ -122,7 +122,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOptimized( ...@@ -122,7 +122,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOptimized(
TNode<IntPtrT> on_resolve_context_index, TNode<IntPtrT> on_resolve_context_index,
TNode<IntPtrT> on_reject_context_index, TNode<IntPtrT> on_reject_context_index,
TNode<Oddball> is_predicted_as_caught) { TNode<Oddball> is_predicted_as_caught) {
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
static const int kResolveClosureOffset = static const int kResolveClosureOffset =
FixedArray::SizeFor(Context::MIN_CONTEXT_EXTENDED_SLOTS); FixedArray::SizeFor(Context::MIN_CONTEXT_EXTENDED_SLOTS);
...@@ -145,7 +145,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOptimized( ...@@ -145,7 +145,7 @@ TNode<Object> AsyncBuiltinsAssembler::AwaitOptimized(
StoreObjectFieldNoWriteBarrier( StoreObjectFieldNoWriteBarrier(
closure_context, Context::kLengthOffset, closure_context, Context::kLengthOffset,
SmiConstant(Context::MIN_CONTEXT_EXTENDED_SLOTS)); SmiConstant(Context::MIN_CONTEXT_EXTENDED_SLOTS));
TNode<Object> const empty_scope_info = const TNode<Object> empty_scope_info =
LoadContextElement(native_context, Context::SCOPE_INFO_INDEX); LoadContextElement(native_context, Context::SCOPE_INFO_INDEX);
StoreContextElementNoWriteBarrier( StoreContextElementNoWriteBarrier(
closure_context, Context::SCOPE_INFO_INDEX, empty_scope_info); closure_context, Context::SCOPE_INFO_INDEX, empty_scope_info);
...@@ -201,14 +201,14 @@ TNode<Object> AsyncBuiltinsAssembler::Await( ...@@ -201,14 +201,14 @@ TNode<Object> AsyncBuiltinsAssembler::Await(
// logic. // logic.
GotoIf(TaggedIsSmi(value), &if_old); GotoIf(TaggedIsSmi(value), &if_old);
TNode<HeapObject> value_object = CAST(value); TNode<HeapObject> value_object = CAST(value);
TNode<Map> const value_map = LoadMap(value_object); const TNode<Map> value_map = LoadMap(value_object);
GotoIfNot(IsJSPromiseMap(value_map), &if_old); GotoIfNot(IsJSPromiseMap(value_map), &if_old);
// We can skip the "constructor" lookup on {value} if it's [[Prototype]] // We can skip the "constructor" lookup on {value} if it's [[Prototype]]
// is the (initial) Promise.prototype and the @@species protector is // is the (initial) Promise.prototype and the @@species protector is
// intact, as that guards the lookup path for "constructor" on // intact, as that guards the lookup path for "constructor" on
// JSPromise instances which have the (initial) Promise.prototype. // JSPromise instances which have the (initial) Promise.prototype.
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Object> const promise_prototype = const TNode<Object> promise_prototype =
LoadContextElement(native_context, Context::PROMISE_PROTOTYPE_INDEX); LoadContextElement(native_context, Context::PROMISE_PROTOTYPE_INDEX);
GotoIfNot(TaggedEqual(LoadMapPrototype(value_map), promise_prototype), GotoIfNot(TaggedEqual(LoadMapPrototype(value_map), promise_prototype),
&if_slow_constructor); &if_slow_constructor);
...@@ -219,9 +219,9 @@ TNode<Object> AsyncBuiltinsAssembler::Await( ...@@ -219,9 +219,9 @@ TNode<Object> AsyncBuiltinsAssembler::Await(
// have the %Promise% as its "constructor", so we need to check that as well. // have the %Promise% as its "constructor", so we need to check that as well.
BIND(&if_slow_constructor); BIND(&if_slow_constructor);
{ {
TNode<Object> const value_constructor = const TNode<Object> value_constructor =
GetProperty(context, value, isolate()->factory()->constructor_string()); GetProperty(context, value, isolate()->factory()->constructor_string());
TNode<Object> const promise_function = const TNode<Object> promise_function =
LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX);
Branch(TaggedEqual(value_constructor, promise_function), &if_new, &if_old); Branch(TaggedEqual(value_constructor, promise_function), &if_new, &if_old);
} }
...@@ -306,11 +306,11 @@ TF_BUILTIN(AsyncIteratorValueUnwrap, AsyncBuiltinsAssembler) { ...@@ -306,11 +306,11 @@ TF_BUILTIN(AsyncIteratorValueUnwrap, AsyncBuiltinsAssembler) {
TNode<Object> value = CAST(Parameter(Descriptor::kValue)); TNode<Object> value = CAST(Parameter(Descriptor::kValue));
TNode<Context> context = CAST(Parameter(Descriptor::kContext)); TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<Object> const done = const TNode<Object> done =
LoadContextElement(context, ValueUnwrapContext::kDoneSlot); LoadContextElement(context, ValueUnwrapContext::kDoneSlot);
CSA_ASSERT(this, IsBoolean(CAST(done))); CSA_ASSERT(this, IsBoolean(CAST(done)));
TNode<Object> const unwrapped_value = const TNode<Object> unwrapped_value =
CallBuiltin(Builtins::kCreateIterResultObject, context, value, done); CallBuiltin(Builtins::kCreateIterResultObject, context, value, done);
Return(unwrapped_value); Return(unwrapped_value);
......
This diff is collapsed.
...@@ -67,7 +67,7 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) { ...@@ -67,7 +67,7 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) {
// Bump the closure counter encoded the {feedback_cell}s map. // Bump the closure counter encoded the {feedback_cell}s map.
{ {
TNode<Map> const feedback_cell_map = LoadMap(feedback_cell); const TNode<Map> feedback_cell_map = LoadMap(feedback_cell);
Label no_closures(this), one_closure(this), cell_done(this); Label no_closures(this), one_closure(this), cell_done(this);
GotoIf(IsNoClosuresCellMap(feedback_cell_map), &no_closures); GotoIf(IsNoClosuresCellMap(feedback_cell_map), &no_closures);
...@@ -91,7 +91,7 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) { ...@@ -91,7 +91,7 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) {
// SharedFunctionInfo::function_map_index(). // SharedFunctionInfo::function_map_index().
TNode<Uint32T> flags = LoadObjectField<Uint32T>( TNode<Uint32T> flags = LoadObjectField<Uint32T>(
shared_function_info, SharedFunctionInfo::kFlagsOffset); shared_function_info, SharedFunctionInfo::kFlagsOffset);
TNode<IntPtrT> const function_map_index = Signed(IntPtrAdd( const TNode<IntPtrT> function_map_index = Signed(IntPtrAdd(
DecodeWordFromWord32<SharedFunctionInfo::FunctionMapIndexBits>(flags), DecodeWordFromWord32<SharedFunctionInfo::FunctionMapIndexBits>(flags),
IntPtrConstant(Context::FIRST_FUNCTION_MAP_INDEX))); IntPtrConstant(Context::FIRST_FUNCTION_MAP_INDEX)));
CSA_ASSERT(this, UintPtrLessThanOrEqual( CSA_ASSERT(this, UintPtrLessThanOrEqual(
...@@ -100,8 +100,8 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) { ...@@ -100,8 +100,8 @@ TF_BUILTIN(FastNewClosure, ConstructorBuiltinsAssembler) {
// Get the function map in the current native context and set that // Get the function map in the current native context and set that
// as the map of the allocated object. // as the map of the allocated object.
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const function_map = const TNode<Map> function_map =
CAST(LoadContextElement(native_context, function_map_index)); CAST(LoadContextElement(native_context, function_map_index));
// Create a new closure from the given function info in new space // Create a new closure from the given function info in new space
......
...@@ -40,12 +40,12 @@ class IntlBuiltinsAssembler : public CodeStubAssembler { ...@@ -40,12 +40,12 @@ class IntlBuiltinsAssembler : public CodeStubAssembler {
}; };
TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) { TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) {
TNode<String> const string = CAST(Parameter(Descriptor::kString)); const TNode<String> string = CAST(Parameter(Descriptor::kString));
Label call_c(this), return_string(this), runtime(this, Label::kDeferred); Label call_c(this), return_string(this), runtime(this, Label::kDeferred);
// Early exit on empty strings. // Early exit on empty strings.
TNode<Uint32T> const length = LoadStringLengthAsWord32(string); const TNode<Uint32T> length = LoadStringLengthAsWord32(string);
GotoIf(Word32Equal(length, Uint32Constant(0)), &return_string); GotoIf(Word32Equal(length, Uint32Constant(0)), &return_string);
// Unpack strings if possible, and bail to runtime unless we get a one-byte // Unpack strings if possible, and bail to runtime unless we get a one-byte
...@@ -54,14 +54,14 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) { ...@@ -54,14 +54,14 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) {
state(), string, ToDirectStringAssembler::kDontUnpackSlicedStrings); state(), string, ToDirectStringAssembler::kDontUnpackSlicedStrings);
to_direct.TryToDirect(&runtime); to_direct.TryToDirect(&runtime);
TNode<Int32T> const instance_type = to_direct.instance_type(); const TNode<Int32T> instance_type = to_direct.instance_type();
CSA_ASSERT(this, CSA_ASSERT(this,
Word32BinaryNot(IsIndirectStringInstanceType(instance_type))); Word32BinaryNot(IsIndirectStringInstanceType(instance_type)));
GotoIfNot(IsOneByteStringInstanceType(instance_type), &runtime); GotoIfNot(IsOneByteStringInstanceType(instance_type), &runtime);
// For short strings, do the conversion in CSA through the lookup table. // For short strings, do the conversion in CSA through the lookup table.
TNode<String> const dst = AllocateSeqOneByteString(length); const TNode<String> dst = AllocateSeqOneByteString(length);
const int kMaxShortStringLength = 24; // Determined empirically. const int kMaxShortStringLength = 24; // Determined empirically.
GotoIf(Uint32GreaterThan(length, Uint32Constant(kMaxShortStringLength)), GotoIf(Uint32GreaterThan(length, Uint32Constant(kMaxShortStringLength)),
...@@ -71,12 +71,12 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) { ...@@ -71,12 +71,12 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) {
const TNode<IntPtrT> dst_ptr = PointerToSeqStringData(dst); const TNode<IntPtrT> dst_ptr = PointerToSeqStringData(dst);
TVARIABLE(IntPtrT, var_cursor, IntPtrConstant(0)); TVARIABLE(IntPtrT, var_cursor, IntPtrConstant(0));
TNode<IntPtrT> const start_address = const TNode<IntPtrT> start_address =
ReinterpretCast<IntPtrT>(to_direct.PointerToData(&call_c)); ReinterpretCast<IntPtrT>(to_direct.PointerToData(&call_c));
TNode<IntPtrT> const end_address = const TNode<IntPtrT> end_address =
Signed(IntPtrAdd(start_address, ChangeUint32ToWord(length))); Signed(IntPtrAdd(start_address, ChangeUint32ToWord(length)));
TNode<ExternalReference> const to_lower_table_addr = const TNode<ExternalReference> to_lower_table_addr =
ExternalConstant(ExternalReference::intl_to_latin1_lower_table()); ExternalConstant(ExternalReference::intl_to_latin1_lower_table());
TVARIABLE(Word32T, var_did_change, Int32Constant(0)); TVARIABLE(Word32T, var_did_change, Int32Constant(0));
...@@ -110,9 +110,9 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) { ...@@ -110,9 +110,9 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) {
// String ConvertOneByteToLower(String src, String dst); // String ConvertOneByteToLower(String src, String dst);
BIND(&call_c); BIND(&call_c);
{ {
TNode<String> const src = to_direct.string(); const TNode<String> src = to_direct.string();
TNode<ExternalReference> const function_addr = const TNode<ExternalReference> function_addr =
ExternalConstant(ExternalReference::intl_convert_one_byte_to_lower()); ExternalConstant(ExternalReference::intl_convert_one_byte_to_lower());
MachineType type_tagged = MachineType::AnyTagged(); MachineType type_tagged = MachineType::AnyTagged();
...@@ -129,7 +129,7 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) { ...@@ -129,7 +129,7 @@ TF_BUILTIN(StringToLowerCaseIntl, IntlBuiltinsAssembler) {
BIND(&runtime); BIND(&runtime);
{ {
TNode<Object> const result = CallRuntime(Runtime::kStringToLowerCaseIntl, const TNode<Object> result = CallRuntime(Runtime::kStringToLowerCaseIntl,
NoContextConstant(), string); NoContextConstant(), string);
Return(result); Return(result);
} }
......
...@@ -69,7 +69,7 @@ IteratorRecord IteratorBuiltinsAssembler::GetIterator(Node* context, ...@@ -69,7 +69,7 @@ IteratorRecord IteratorBuiltinsAssembler::GetIterator(Node* context,
} }
BIND(&get_next); BIND(&get_next);
TNode<Object> const next = const TNode<Object> next =
GetProperty(context, iterator, factory()->next_string()); GetProperty(context, iterator, factory()->next_string());
GotoIfException(next, if_exception, exception); GotoIfException(next, if_exception, exception);
...@@ -387,7 +387,7 @@ void IteratorBuiltinsAssembler::FastIterableToList( ...@@ -387,7 +387,7 @@ void IteratorBuiltinsAssembler::FastIterableToList(
iterable, context, &string_maybe_fast_call, &check_map); iterable, context, &string_maybe_fast_call, &check_map);
BIND(&string_maybe_fast_call); BIND(&string_maybe_fast_call);
TNode<IntPtrT> const length = LoadStringLengthAsWord(CAST(iterable)); const TNode<IntPtrT> length = LoadStringLengthAsWord(CAST(iterable));
// Use string length as conservative approximation of number of codepoints. // Use string length as conservative approximation of number of codepoints.
GotoIf( GotoIf(
IntPtrGreaterThan(length, IntPtrConstant(JSArray::kMaxFastArrayLength)), IntPtrGreaterThan(length, IntPtrConstant(JSArray::kMaxFastArrayLength)),
......
...@@ -216,9 +216,9 @@ TF_BUILTIN(MathRandom, CodeStubAssembler) { ...@@ -216,9 +216,9 @@ TF_BUILTIN(MathRandom, CodeStubAssembler) {
GotoIf(SmiAbove(smi_index.value(), SmiConstant(0)), &if_cached); GotoIf(SmiAbove(smi_index.value(), SmiConstant(0)), &if_cached);
// Cache exhausted, populate the cache. Return value is the new index. // Cache exhausted, populate the cache. Return value is the new index.
TNode<ExternalReference> const refill_math_random = const TNode<ExternalReference> refill_math_random =
ExternalConstant(ExternalReference::refill_math_random()); ExternalConstant(ExternalReference::refill_math_random());
TNode<ExternalReference> const isolate_ptr = const TNode<ExternalReference> isolate_ptr =
ExternalConstant(ExternalReference::isolate_address(isolate())); ExternalConstant(ExternalReference::isolate_address(isolate()));
MachineType type_tagged = MachineType::AnyTagged(); MachineType type_tagged = MachineType::AnyTagged();
MachineType type_ptr = MachineType::Pointer(); MachineType type_ptr = MachineType::Pointer();
......
...@@ -158,9 +158,9 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( ...@@ -158,9 +158,9 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask(
BIND(&is_callback); BIND(&is_callback);
{ {
TNode<Object> const microtask_callback = const TNode<Object> microtask_callback =
LoadObjectField(microtask, CallbackTask::kCallbackOffset); LoadObjectField(microtask, CallbackTask::kCallbackOffset);
TNode<Object> const microtask_data = const TNode<Object> microtask_data =
LoadObjectField(microtask, CallbackTask::kDataOffset); LoadObjectField(microtask, CallbackTask::kDataOffset);
// If this turns out to become a bottleneck because of the calls // If this turns out to become a bottleneck because of the calls
...@@ -173,7 +173,7 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( ...@@ -173,7 +173,7 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask(
// But from our current measurements it doesn't seem to be a // But from our current measurements it doesn't seem to be a
// serious performance problem, even if the microtask is full // serious performance problem, even if the microtask is full
// of CallHandlerTasks (which is not a realistic use case anyways). // of CallHandlerTasks (which is not a realistic use case anyways).
TNode<Object> const result = const TNode<Object> result =
CallRuntime(Runtime::kRunMicrotaskCallback, current_context, CallRuntime(Runtime::kRunMicrotaskCallback, current_context,
microtask_callback, microtask_data); microtask_callback, microtask_data);
GotoIfException(result, &if_exception, &var_exception); GotoIfException(result, &if_exception, &var_exception);
...@@ -188,14 +188,14 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( ...@@ -188,14 +188,14 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask(
TNode<NativeContext> native_context = LoadNativeContext(microtask_context); TNode<NativeContext> native_context = LoadNativeContext(microtask_context);
PrepareForContext(native_context, &done); PrepareForContext(native_context, &done);
TNode<Object> const promise_to_resolve = LoadObjectField( const TNode<Object> promise_to_resolve = LoadObjectField(
microtask, PromiseResolveThenableJobTask::kPromiseToResolveOffset); microtask, PromiseResolveThenableJobTask::kPromiseToResolveOffset);
TNode<Object> const then = const TNode<Object> then =
LoadObjectField(microtask, PromiseResolveThenableJobTask::kThenOffset); LoadObjectField(microtask, PromiseResolveThenableJobTask::kThenOffset);
TNode<Object> const thenable = LoadObjectField( const TNode<Object> thenable = LoadObjectField(
microtask, PromiseResolveThenableJobTask::kThenableOffset); microtask, PromiseResolveThenableJobTask::kThenableOffset);
TNode<Object> const result = const TNode<Object> result =
CallBuiltin(Builtins::kPromiseResolveThenableJob, native_context, CallBuiltin(Builtins::kPromiseResolveThenableJob, native_context,
promise_to_resolve, thenable, then); promise_to_resolve, thenable, then);
GotoIfException(result, &if_exception, &var_exception); GotoIfException(result, &if_exception, &var_exception);
...@@ -212,18 +212,18 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( ...@@ -212,18 +212,18 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask(
TNode<NativeContext> native_context = LoadNativeContext(microtask_context); TNode<NativeContext> native_context = LoadNativeContext(microtask_context);
PrepareForContext(native_context, &done); PrepareForContext(native_context, &done);
TNode<Object> const argument = const TNode<Object> argument =
LoadObjectField(microtask, PromiseReactionJobTask::kArgumentOffset); LoadObjectField(microtask, PromiseReactionJobTask::kArgumentOffset);
TNode<Object> const handler = const TNode<Object> handler =
LoadObjectField(microtask, PromiseReactionJobTask::kHandlerOffset); LoadObjectField(microtask, PromiseReactionJobTask::kHandlerOffset);
TNode<HeapObject> const promise_or_capability = CAST(LoadObjectField( const TNode<HeapObject> promise_or_capability = CAST(LoadObjectField(
microtask, PromiseReactionJobTask::kPromiseOrCapabilityOffset)); microtask, PromiseReactionJobTask::kPromiseOrCapabilityOffset));
// Run the promise before/debug hook if enabled. // Run the promise before/debug hook if enabled.
RunPromiseHook(Runtime::kPromiseHookBefore, microtask_context, RunPromiseHook(Runtime::kPromiseHookBefore, microtask_context,
promise_or_capability); promise_or_capability);
TNode<Object> const result = const TNode<Object> result =
CallBuiltin(Builtins::kPromiseFulfillReactionJob, microtask_context, CallBuiltin(Builtins::kPromiseFulfillReactionJob, microtask_context,
argument, handler, promise_or_capability); argument, handler, promise_or_capability);
GotoIfException(result, &if_exception, &var_exception); GotoIfException(result, &if_exception, &var_exception);
...@@ -245,18 +245,18 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask( ...@@ -245,18 +245,18 @@ void MicrotaskQueueBuiltinsAssembler::RunSingleMicrotask(
TNode<NativeContext> native_context = LoadNativeContext(microtask_context); TNode<NativeContext> native_context = LoadNativeContext(microtask_context);
PrepareForContext(native_context, &done); PrepareForContext(native_context, &done);
TNode<Object> const argument = const TNode<Object> argument =
LoadObjectField(microtask, PromiseReactionJobTask::kArgumentOffset); LoadObjectField(microtask, PromiseReactionJobTask::kArgumentOffset);
TNode<Object> const handler = const TNode<Object> handler =
LoadObjectField(microtask, PromiseReactionJobTask::kHandlerOffset); LoadObjectField(microtask, PromiseReactionJobTask::kHandlerOffset);
TNode<HeapObject> const promise_or_capability = CAST(LoadObjectField( const TNode<HeapObject> promise_or_capability = CAST(LoadObjectField(
microtask, PromiseReactionJobTask::kPromiseOrCapabilityOffset)); microtask, PromiseReactionJobTask::kPromiseOrCapabilityOffset));
// Run the promise before/debug hook if enabled. // Run the promise before/debug hook if enabled.
RunPromiseHook(Runtime::kPromiseHookBefore, microtask_context, RunPromiseHook(Runtime::kPromiseHookBefore, microtask_context,
promise_or_capability); promise_or_capability);
TNode<Object> const result = const TNode<Object> result =
CallBuiltin(Builtins::kPromiseRejectReactionJob, microtask_context, CallBuiltin(Builtins::kPromiseRejectReactionJob, microtask_context,
argument, handler, promise_or_capability); argument, handler, promise_or_capability);
GotoIfException(result, &if_exception, &var_exception); GotoIfException(result, &if_exception, &var_exception);
......
...@@ -1062,9 +1062,9 @@ TF_BUILTIN(ObjectPrototypeValueOf, CodeStubAssembler) { ...@@ -1062,9 +1062,9 @@ TF_BUILTIN(ObjectPrototypeValueOf, CodeStubAssembler) {
// ES #sec-object.create // ES #sec-object.create
TF_BUILTIN(CreateObjectWithoutProperties, ObjectBuiltinsAssembler) { TF_BUILTIN(CreateObjectWithoutProperties, ObjectBuiltinsAssembler) {
TNode<Object> const prototype = CAST(Parameter(Descriptor::kPrototypeArg)); const TNode<Object> prototype = CAST(Parameter(Descriptor::kPrototypeArg));
TNode<Context> const context = CAST(Parameter(Descriptor::kContext)); const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
Label call_runtime(this, Label::kDeferred), prototype_null(this), Label call_runtime(this, Label::kDeferred), prototype_null(this),
prototype_jsreceiver(this); prototype_jsreceiver(this);
{ {
...@@ -1221,8 +1221,8 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) { ...@@ -1221,8 +1221,8 @@ TF_BUILTIN(ObjectCreate, ObjectBuiltinsAssembler) {
// ES #sec-object.is // ES #sec-object.is
TF_BUILTIN(ObjectIs, ObjectBuiltinsAssembler) { TF_BUILTIN(ObjectIs, ObjectBuiltinsAssembler) {
TNode<Object> const left = CAST(Parameter(Descriptor::kLeft)); const TNode<Object> left = CAST(Parameter(Descriptor::kLeft));
TNode<Object> const right = CAST(Parameter(Descriptor::kRight)); const TNode<Object> right = CAST(Parameter(Descriptor::kRight));
Label return_true(this), return_false(this); Label return_true(this), return_false(this);
BranchIfSameValue(left, right, &return_true, &return_false); BranchIfSameValue(left, right, &return_true, &return_false);
...@@ -1235,15 +1235,15 @@ TF_BUILTIN(ObjectIs, ObjectBuiltinsAssembler) { ...@@ -1235,15 +1235,15 @@ TF_BUILTIN(ObjectIs, ObjectBuiltinsAssembler) {
} }
TF_BUILTIN(CreateIterResultObject, ObjectBuiltinsAssembler) { TF_BUILTIN(CreateIterResultObject, ObjectBuiltinsAssembler) {
TNode<Object> const value = CAST(Parameter(Descriptor::kValue)); const TNode<Object> value = CAST(Parameter(Descriptor::kValue));
TNode<Oddball> const done = CAST(Parameter(Descriptor::kDone)); const TNode<Oddball> done = CAST(Parameter(Descriptor::kDone));
TNode<Context> const context = CAST(Parameter(Descriptor::kContext)); const TNode<Context> context = CAST(Parameter(Descriptor::kContext));
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const map = CAST( const TNode<Map> map = CAST(
LoadContextElement(native_context, Context::ITERATOR_RESULT_MAP_INDEX)); LoadContextElement(native_context, Context::ITERATOR_RESULT_MAP_INDEX));
TNode<JSObject> const result = AllocateJSObjectFromMap(map); const TNode<JSObject> result = AllocateJSObjectFromMap(map);
StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kValueOffset, value); StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kValueOffset, value);
StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kDoneOffset, done); StoreObjectFieldNoWriteBarrier(result, JSIteratorResult::kDoneOffset, done);
......
This diff is collapsed.
...@@ -117,7 +117,7 @@ Node* ProxiesCodeStubAssembler::AllocateJSArrayForCodeStubArguments( ...@@ -117,7 +117,7 @@ Node* ProxiesCodeStubAssembler::AllocateJSArrayForCodeStubArguments(
Node* ProxiesCodeStubAssembler::CreateProxyRevokeFunctionContext( Node* ProxiesCodeStubAssembler::CreateProxyRevokeFunctionContext(
Node* proxy, Node* native_context) { Node* proxy, Node* native_context) {
TNode<Context> const context = AllocateSyntheticFunctionContext( const TNode<Context> context = AllocateSyntheticFunctionContext(
CAST(native_context), kProxyContextLength); CAST(native_context), kProxyContextLength);
StoreContextElementNoWriteBarrier(context, kProxySlot, proxy); StoreContextElementNoWriteBarrier(context, kProxySlot, proxy);
return context; return context;
...@@ -125,7 +125,7 @@ Node* ProxiesCodeStubAssembler::CreateProxyRevokeFunctionContext( ...@@ -125,7 +125,7 @@ Node* ProxiesCodeStubAssembler::CreateProxyRevokeFunctionContext(
TNode<JSFunction> ProxiesCodeStubAssembler::AllocateProxyRevokeFunction( TNode<JSFunction> ProxiesCodeStubAssembler::AllocateProxyRevokeFunction(
TNode<Context> context, TNode<JSProxy> proxy) { TNode<Context> context, TNode<JSProxy> proxy) {
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
const TNode<Context> proxy_context = const TNode<Context> proxy_context =
CAST(CreateProxyRevokeFunctionContext(proxy, native_context)); CAST(CreateProxyRevokeFunctionContext(proxy, native_context));
......
This diff is collapsed.
...@@ -168,13 +168,13 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -168,13 +168,13 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
TNode<Object> RegExpPrototypeMatchBody(TNode<Context> context, TNode<Object> RegExpPrototypeMatchBody(TNode<Context> context,
TNode<Object> regexp, TNode<Object> regexp,
TNode<String> const string, const TNode<String> string,
const bool is_fastpath); const bool is_fastpath);
TNode<JSArray> RegExpPrototypeSplitBody(TNode<Context> context, TNode<JSArray> RegExpPrototypeSplitBody(TNode<Context> context,
TNode<JSRegExp> regexp, TNode<JSRegExp> regexp,
TNode<String> const string, const TNode<String> string,
TNode<Smi> const limit); const TNode<Smi> limit);
}; };
class RegExpMatchAllAssembler : public RegExpBuiltinsAssembler { class RegExpMatchAllAssembler : public RegExpBuiltinsAssembler {
......
This diff is collapsed.
...@@ -91,9 +91,9 @@ class StringBuiltinsAssembler : public CodeStubAssembler { ...@@ -91,9 +91,9 @@ class StringBuiltinsAssembler : public CodeStubAssembler {
using StringAtAccessor = std::function<TNode<Object>( using StringAtAccessor = std::function<TNode<Object>(
TNode<String> receiver, TNode<IntPtrT> length, TNode<IntPtrT> index)>; TNode<String> receiver, TNode<IntPtrT> length, TNode<IntPtrT> index)>;
void StringIndexOf(TNode<String> const subject_string, void StringIndexOf(const TNode<String> subject_string,
TNode<String> const search_string, const TNode<String> search_string,
TNode<Smi> const position, const TNode<Smi> position,
const std::function<void(TNode<Smi>)>& f_return); const std::function<void(TNode<Smi>)>& f_return);
TNode<Smi> IndexOfDollarChar(Node* const context, Node* const string); TNode<Smi> IndexOfDollarChar(Node* const context, Node* const string);
...@@ -186,7 +186,7 @@ class StringTrimAssembler : public StringBuiltinsAssembler { ...@@ -186,7 +186,7 @@ class StringTrimAssembler : public StringBuiltinsAssembler {
: StringBuiltinsAssembler(state) {} : StringBuiltinsAssembler(state) {}
V8_EXPORT_PRIVATE void GotoIfNotWhiteSpaceOrLineTerminator( V8_EXPORT_PRIVATE void GotoIfNotWhiteSpaceOrLineTerminator(
TNode<Word32T> const char_code, Label* const if_not_whitespace); const TNode<Word32T> char_code, Label* const if_not_whitespace);
protected: protected:
void Generate(String::TrimMode mode, const char* method, TNode<IntPtrT> argc, void Generate(String::TrimMode mode, const char* method, TNode<IntPtrT> argc,
...@@ -195,9 +195,9 @@ class StringTrimAssembler : public StringBuiltinsAssembler { ...@@ -195,9 +195,9 @@ class StringTrimAssembler : public StringBuiltinsAssembler {
void ScanForNonWhiteSpaceOrLineTerminator( void ScanForNonWhiteSpaceOrLineTerminator(
Node* const string_data, Node* const string_data_offset, Node* const string_data, Node* const string_data_offset,
Node* const is_stringonebyte, TVariable<IntPtrT>* const var_index, Node* const is_stringonebyte, TVariable<IntPtrT>* const var_index,
TNode<IntPtrT> const end, int increment, Label* const if_none_found); const TNode<IntPtrT> end, int increment, Label* const if_none_found);
void BuildLoop(TVariable<IntPtrT>* const var_index, TNode<IntPtrT> const end, void BuildLoop(TVariable<IntPtrT>* const var_index, const TNode<IntPtrT> end,
int increment, Label* const if_none_found, Label* const out, int increment, Label* const if_none_found, Label* const out,
const std::function<Node*(Node*)>& get_character); const std::function<Node*(Node*)>& get_character);
}; };
......
...@@ -1018,10 +1018,10 @@ TF_BUILTIN(TypedArrayFrom, TypedArrayBuiltinsAssembler) { ...@@ -1018,10 +1018,10 @@ TF_BUILTIN(TypedArrayFrom, TypedArrayBuiltinsAssembler) {
BuildFastLoop<Smi>( BuildFastLoop<Smi>(
SmiConstant(0), final_length.value(), SmiConstant(0), final_length.value(),
[&](TNode<Smi> index) { [&](TNode<Smi> index) {
TNode<Object> const k_value = const TNode<Object> k_value =
GetProperty(context, final_source.value(), index); GetProperty(context, final_source.value(), index);
TNode<Object> const mapped_value = const TNode<Object> mapped_value =
CallJS(CodeFactory::Call(isolate()), context, map_fn, this_arg, CallJS(CodeFactory::Call(isolate()), context, map_fn, this_arg,
k_value, index); k_value, index);
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
void GrowableFixedArray::Push(TNode<Object> const value) { void GrowableFixedArray::Push(const TNode<Object> value) {
TNode<IntPtrT> const length = var_length_.value(); const TNode<IntPtrT> length = var_length_.value();
TNode<IntPtrT> const capacity = var_capacity_.value(); const TNode<IntPtrT> capacity = var_capacity_.value();
Label grow(this), store(this); Label grow(this), store(this);
Branch(IntPtrEqual(capacity, length), &grow, &store); Branch(IntPtrEqual(capacity, length), &grow, &store);
...@@ -26,25 +26,25 @@ void GrowableFixedArray::Push(TNode<Object> const value) { ...@@ -26,25 +26,25 @@ void GrowableFixedArray::Push(TNode<Object> const value) {
BIND(&store); BIND(&store);
{ {
TNode<FixedArray> const array = var_array_.value(); const TNode<FixedArray> array = var_array_.value();
UnsafeStoreFixedArrayElement(array, length, value); UnsafeStoreFixedArrayElement(array, length, value);
var_length_ = IntPtrAdd(length, IntPtrConstant(1)); var_length_ = IntPtrAdd(length, IntPtrConstant(1));
} }
} }
TNode<JSArray> GrowableFixedArray::ToJSArray(TNode<Context> const context) { TNode<JSArray> GrowableFixedArray::ToJSArray(const TNode<Context> context) {
const ElementsKind kind = PACKED_ELEMENTS; const ElementsKind kind = PACKED_ELEMENTS;
TNode<NativeContext> const native_context = LoadNativeContext(context); const TNode<NativeContext> native_context = LoadNativeContext(context);
TNode<Map> const array_map = LoadJSArrayElementsMap(kind, native_context); const TNode<Map> array_map = LoadJSArrayElementsMap(kind, native_context);
// Shrink to fit if necessary. // Shrink to fit if necessary.
{ {
Label next(this); Label next(this);
TNode<IntPtrT> const length = var_length_.value(); const TNode<IntPtrT> length = var_length_.value();
TNode<IntPtrT> const capacity = var_capacity_.value(); const TNode<IntPtrT> capacity = var_capacity_.value();
GotoIf(WordEqual(length, capacity), &next); GotoIf(WordEqual(length, capacity), &next);
...@@ -55,8 +55,8 @@ TNode<JSArray> GrowableFixedArray::ToJSArray(TNode<Context> const context) { ...@@ -55,8 +55,8 @@ TNode<JSArray> GrowableFixedArray::ToJSArray(TNode<Context> const context) {
BIND(&next); BIND(&next);
} }
TNode<Smi> const result_length = SmiTag(length()); const TNode<Smi> result_length = SmiTag(length());
TNode<JSArray> const result = const TNode<JSArray> result =
AllocateJSArray(array_map, var_array_.value(), result_length); AllocateJSArray(array_map, var_array_.value(), result_length);
return result; return result;
} }
...@@ -69,7 +69,7 @@ TNode<IntPtrT> GrowableFixedArray::NewCapacity( ...@@ -69,7 +69,7 @@ TNode<IntPtrT> GrowableFixedArray::NewCapacity(
// Growth rate is analog to JSObject::NewElementsCapacity: // Growth rate is analog to JSObject::NewElementsCapacity:
// new_capacity = (current_capacity + (current_capacity >> 1)) + 16. // new_capacity = (current_capacity + (current_capacity >> 1)) + 16.
TNode<IntPtrT> const new_capacity = const TNode<IntPtrT> new_capacity =
IntPtrAdd(IntPtrAdd(current_capacity, WordShr(current_capacity, 1)), IntPtrAdd(IntPtrAdd(current_capacity, WordShr(current_capacity, 1)),
IntPtrConstant(16)); IntPtrConstant(16));
...@@ -77,12 +77,12 @@ TNode<IntPtrT> GrowableFixedArray::NewCapacity( ...@@ -77,12 +77,12 @@ TNode<IntPtrT> GrowableFixedArray::NewCapacity(
} }
TNode<FixedArray> GrowableFixedArray::ResizeFixedArray( TNode<FixedArray> GrowableFixedArray::ResizeFixedArray(
TNode<IntPtrT> const element_count, TNode<IntPtrT> const new_capacity) { const TNode<IntPtrT> element_count, const TNode<IntPtrT> new_capacity) {
CSA_ASSERT(this, IntPtrGreaterThanOrEqual(element_count, IntPtrConstant(0))); CSA_ASSERT(this, IntPtrGreaterThanOrEqual(element_count, IntPtrConstant(0)));
CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, IntPtrConstant(0))); CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, IntPtrConstant(0)));
CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, element_count)); CSA_ASSERT(this, IntPtrGreaterThanOrEqual(new_capacity, element_count));
TNode<FixedArray> const from_array = var_array_.value(); const TNode<FixedArray> from_array = var_array_.value();
CodeStubAssembler::ExtractFixedArrayFlags flags; CodeStubAssembler::ExtractFixedArrayFlags flags;
flags |= CodeStubAssembler::ExtractFixedArrayFlag::kFixedArrays; flags |= CodeStubAssembler::ExtractFixedArrayFlag::kFixedArrays;
......
...@@ -30,17 +30,17 @@ class GrowableFixedArray : public CodeStubAssembler { ...@@ -30,17 +30,17 @@ class GrowableFixedArray : public CodeStubAssembler {
TVariable<IntPtrT>* var_length() { return &var_length_; } TVariable<IntPtrT>* var_length() { return &var_length_; }
TVariable<IntPtrT>* var_capacity() { return &var_capacity_; } TVariable<IntPtrT>* var_capacity() { return &var_capacity_; }
void Push(TNode<Object> const value); void Push(const TNode<Object> value);
TNode<JSArray> ToJSArray(TNode<Context> const context); TNode<JSArray> ToJSArray(const TNode<Context> context);
private: private:
TNode<IntPtrT> NewCapacity(TNode<IntPtrT> current_capacity); TNode<IntPtrT> NewCapacity(TNode<IntPtrT> current_capacity);
// Creates a new array with {new_capacity} and copies the first // Creates a new array with {new_capacity} and copies the first
// {element_count} elements from the current array. // {element_count} elements from the current array.
TNode<FixedArray> ResizeFixedArray(TNode<IntPtrT> const element_count, TNode<FixedArray> ResizeFixedArray(const TNode<IntPtrT> element_count,
TNode<IntPtrT> const new_capacity); const TNode<IntPtrT> new_capacity);
private: private:
TVariable<FixedArray> var_array_; TVariable<FixedArray> var_array_;
......
This diff is collapsed.
...@@ -197,7 +197,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; ...@@ -197,7 +197,7 @@ enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
#define CSA_ASSERT_JS_ARGC_OP(csa, Op, op, expected) \ #define CSA_ASSERT_JS_ARGC_OP(csa, Op, op, expected) \
(csa)->Assert( \ (csa)->Assert( \
[&]() -> compiler::Node* { \ [&]() -> compiler::Node* { \
TNode<Word32T> const argc = UncheckedCast<Word32T>( \ const TNode<Word32T> argc = UncheckedCast<Word32T>( \
(csa)->Parameter(Descriptor::kJSActualArgumentsCount)); \ (csa)->Parameter(Descriptor::kJSActualArgumentsCount)); \
return (csa)->Op(argc, (csa)->Int32Constant(expected)); \ return (csa)->Op(argc, (csa)->Int32Constant(expected)); \
}, \ }, \
...@@ -3540,7 +3540,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler ...@@ -3540,7 +3540,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
template <class... TArgs> template <class... TArgs>
Node* MakeTypeError(MessageTemplate message, Node* context, TArgs... args) { Node* MakeTypeError(MessageTemplate message, Node* context, TArgs... args) {
STATIC_ASSERT(sizeof...(TArgs) <= 3); STATIC_ASSERT(sizeof...(TArgs) <= 3);
TNode<Object> const make_type_error = LoadContextElement( const TNode<Object> make_type_error = LoadContextElement(
LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX); LoadNativeContext(context), Context::MAKE_TYPE_ERROR_INDEX);
return CallJS(CodeFactory::Call(isolate()), context, make_type_error, return CallJS(CodeFactory::Call(isolate()), context, make_type_error,
UndefinedConstant(), SmiConstant(message), args...); UndefinedConstant(), SmiConstant(message), args...);
......
...@@ -269,13 +269,13 @@ TNode<Object> IntrinsicsGenerator::CreateAsyncFromSyncIterator( ...@@ -269,13 +269,13 @@ TNode<Object> IntrinsicsGenerator::CreateAsyncFromSyncIterator(
__ GotoIf(__ TaggedIsSmi(sync_iterator), &not_receiver); __ GotoIf(__ TaggedIsSmi(sync_iterator), &not_receiver);
__ GotoIfNot(__ IsJSReceiver(__ CAST(sync_iterator)), &not_receiver); __ GotoIfNot(__ IsJSReceiver(__ CAST(sync_iterator)), &not_receiver);
TNode<Object> const next = const TNode<Object> next =
__ GetProperty(context, sync_iterator, factory()->next_string()); __ GetProperty(context, sync_iterator, factory()->next_string());
TNode<NativeContext> const native_context = __ LoadNativeContext(context); const TNode<NativeContext> native_context = __ LoadNativeContext(context);
TNode<Map> const map = __ CAST(__ LoadContextElement( const TNode<Map> map = __ CAST(__ LoadContextElement(
native_context, Context::ASYNC_FROM_SYNC_ITERATOR_MAP_INDEX)); native_context, Context::ASYNC_FROM_SYNC_ITERATOR_MAP_INDEX));
TNode<JSObject> const iterator = __ AllocateJSObjectFromMap(map); const TNode<JSObject> iterator = __ AllocateJSObjectFromMap(map);
__ StoreObjectFieldNoWriteBarrier( __ StoreObjectFieldNoWriteBarrier(
iterator, JSAsyncFromSyncIterator::kSyncIteratorOffset, sync_iterator); iterator, JSAsyncFromSyncIterator::kSyncIteratorOffset, sync_iterator);
...@@ -308,7 +308,7 @@ TNode<Object> IntrinsicsGenerator::GeneratorGetResumeMode( ...@@ -308,7 +308,7 @@ TNode<Object> IntrinsicsGenerator::GeneratorGetResumeMode(
const InterpreterAssembler::RegListNodePair& args, TNode<Context> context) { const InterpreterAssembler::RegListNodePair& args, TNode<Context> context) {
TNode<JSGeneratorObject> generator = TNode<JSGeneratorObject> generator =
__ CAST(__ LoadRegisterFromRegisterList(args, 0)); __ CAST(__ LoadRegisterFromRegisterList(args, 0));
TNode<Object> const value = const TNode<Object> value =
__ LoadObjectField(generator, JSGeneratorObject::kResumeModeOffset); __ LoadObjectField(generator, JSGeneratorObject::kResumeModeOffset);
return value; return value;
...@@ -326,10 +326,10 @@ TNode<Object> IntrinsicsGenerator::GeneratorClose( ...@@ -326,10 +326,10 @@ TNode<Object> IntrinsicsGenerator::GeneratorClose(
TNode<Object> IntrinsicsGenerator::GetImportMetaObject( TNode<Object> IntrinsicsGenerator::GetImportMetaObject(
const InterpreterAssembler::RegListNodePair& args, TNode<Context> context) { const InterpreterAssembler::RegListNodePair& args, TNode<Context> context) {
TNode<Context> const module_context = __ LoadModuleContext(context); const TNode<Context> module_context = __ LoadModuleContext(context);
TNode<HeapObject> const module = const TNode<HeapObject> module =
__ CAST(__ LoadContextElement(module_context, Context::EXTENSION_INDEX)); __ CAST(__ LoadContextElement(module_context, Context::EXTENSION_INDEX));
TNode<Object> const import_meta = const TNode<Object> import_meta =
__ LoadObjectField(module, SourceTextModule::kImportMetaOffset); __ LoadObjectField(module, SourceTextModule::kImportMetaOffset);
InterpreterAssembler::TVariable<Object> return_value(assembler_); InterpreterAssembler::TVariable<Object> return_value(assembler_);
......
...@@ -71,7 +71,7 @@ TEST(CallCFunction) { ...@@ -71,7 +71,7 @@ TEST(CallCFunction) {
CodeStubAssembler m(asm_tester.state()); CodeStubAssembler m(asm_tester.state());
{ {
TNode<ExternalReference> const fun_constant = m.ExternalConstant( const TNode<ExternalReference> fun_constant = m.ExternalConstant(
ExternalReference::Create(reinterpret_cast<Address>(sum10))); ExternalReference::Create(reinterpret_cast<Address>(sum10)));
MachineType type_intptr = MachineType::IntPtr(); MachineType type_intptr = MachineType::IntPtr();
...@@ -105,7 +105,7 @@ TEST(CallCFunctionWithCallerSavedRegisters) { ...@@ -105,7 +105,7 @@ TEST(CallCFunctionWithCallerSavedRegisters) {
CodeStubAssembler m(asm_tester.state()); CodeStubAssembler m(asm_tester.state());
{ {
TNode<ExternalReference> const fun_constant = m.ExternalConstant( const TNode<ExternalReference> fun_constant = m.ExternalConstant(
ExternalReference::Create(reinterpret_cast<Address>(sum3))); ExternalReference::Create(reinterpret_cast<Address>(sum3)));
MachineType type_intptr = MachineType::IntPtr(); MachineType type_intptr = MachineType::IntPtr();
...@@ -2456,7 +2456,7 @@ TEST(AllocateAndInitJSPromise) { ...@@ -2456,7 +2456,7 @@ TEST(AllocateAndInitJSPromise) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<JSPromise> const promise = m.AllocateAndInitJSPromise(m.CAST(context)); const TNode<JSPromise> promise = m.AllocateAndInitJSPromise(m.CAST(context));
m.Return(promise); m.Return(promise);
FunctionTester ft(asm_tester.GenerateCode(), kNumParams); FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
...@@ -2473,7 +2473,7 @@ TEST(AllocateAndSetJSPromise) { ...@@ -2473,7 +2473,7 @@ TEST(AllocateAndSetJSPromise) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<JSPromise> const promise = m.AllocateAndSetJSPromise( const TNode<JSPromise> promise = m.AllocateAndSetJSPromise(
m.CAST(context), v8::Promise::kRejected, m.SmiConstant(1)); m.CAST(context), v8::Promise::kRejected, m.SmiConstant(1));
m.Return(promise); m.Return(promise);
...@@ -2536,7 +2536,7 @@ TEST(PromiseHasHandler) { ...@@ -2536,7 +2536,7 @@ TEST(PromiseHasHandler) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<JSPromise> const promise = const TNode<JSPromise> promise =
m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant()); m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant());
m.Return(m.SelectBooleanConstant(m.PromiseHasHandler(promise))); m.Return(m.SelectBooleanConstant(m.PromiseHasHandler(promise)));
...@@ -2554,10 +2554,10 @@ TEST(CreatePromiseResolvingFunctionsContext) { ...@@ -2554,10 +2554,10 @@ TEST(CreatePromiseResolvingFunctionsContext) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<NativeContext> const native_context = m.LoadNativeContext(context); const TNode<NativeContext> native_context = m.LoadNativeContext(context);
const TNode<JSPromise> promise = const TNode<JSPromise> promise =
m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant()); m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant());
TNode<Context> const promise_context = const TNode<Context> promise_context =
m.CreatePromiseResolvingFunctionsContext( m.CreatePromiseResolvingFunctionsContext(
promise, m.BooleanConstant(false), native_context); promise, m.BooleanConstant(false), native_context);
m.Return(promise_context); m.Return(promise_context);
...@@ -2582,7 +2582,7 @@ TEST(CreatePromiseResolvingFunctions) { ...@@ -2582,7 +2582,7 @@ TEST(CreatePromiseResolvingFunctions) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<NativeContext> const native_context = m.LoadNativeContext(context); const TNode<NativeContext> native_context = m.LoadNativeContext(context);
const TNode<JSPromise> promise = const TNode<JSPromise> promise =
m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant()); m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant());
PromiseResolvingFunctions funcs = m.CreatePromiseResolvingFunctions( PromiseResolvingFunctions funcs = m.CreatePromiseResolvingFunctions(
...@@ -2672,7 +2672,7 @@ TEST(AllocateFunctionWithMapAndContext) { ...@@ -2672,7 +2672,7 @@ TEST(AllocateFunctionWithMapAndContext) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<NativeContext> const native_context = m.LoadNativeContext(context); const TNode<NativeContext> native_context = m.LoadNativeContext(context);
const TNode<JSPromise> promise = const TNode<JSPromise> promise =
m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant()); m.AllocateAndInitJSPromise(m.CAST(context), m.UndefinedConstant());
TNode<Context> promise_context = m.CreatePromiseResolvingFunctionsContext( TNode<Context> promise_context = m.CreatePromiseResolvingFunctionsContext(
...@@ -2680,9 +2680,9 @@ TEST(AllocateFunctionWithMapAndContext) { ...@@ -2680,9 +2680,9 @@ TEST(AllocateFunctionWithMapAndContext) {
TNode<Object> resolve_info = m.LoadContextElement( TNode<Object> resolve_info = m.LoadContextElement(
native_context, native_context,
Context::PROMISE_CAPABILITY_DEFAULT_RESOLVE_SHARED_FUN_INDEX); Context::PROMISE_CAPABILITY_DEFAULT_RESOLVE_SHARED_FUN_INDEX);
TNode<Object> const map = m.LoadContextElement( const TNode<Object> map = m.LoadContextElement(
native_context, Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX); native_context, Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX);
TNode<JSFunction> const resolve = m.AllocateFunctionWithMapAndContext( const TNode<JSFunction> resolve = m.AllocateFunctionWithMapAndContext(
m.CAST(map), m.CAST(resolve_info), promise_context); m.CAST(map), m.CAST(resolve_info), promise_context);
m.Return(resolve); m.Return(resolve);
...@@ -2710,9 +2710,9 @@ TEST(CreatePromiseGetCapabilitiesExecutorContext) { ...@@ -2710,9 +2710,9 @@ TEST(CreatePromiseGetCapabilitiesExecutorContext) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<NativeContext> const native_context = m.LoadNativeContext(context); const TNode<NativeContext> native_context = m.LoadNativeContext(context);
TNode<Map> const map = m.PromiseCapabilityMapConstant(); const TNode<Map> map = m.PromiseCapabilityMapConstant();
Node* const capability = m.AllocateStruct(map); Node* const capability = m.AllocateStruct(map);
m.StoreObjectFieldNoWriteBarrier( m.StoreObjectFieldNoWriteBarrier(
capability, PromiseCapability::kPromiseOffset, m.UndefinedConstant()); capability, PromiseCapability::kPromiseOffset, m.UndefinedConstant());
...@@ -2745,12 +2745,12 @@ TEST(NewPromiseCapability) { ...@@ -2745,12 +2745,12 @@ TEST(NewPromiseCapability) {
PromiseBuiltinsAssembler m(asm_tester.state()); PromiseBuiltinsAssembler m(asm_tester.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
TNode<NativeContext> const native_context = m.LoadNativeContext(context); const TNode<NativeContext> native_context = m.LoadNativeContext(context);
TNode<Object> const promise_constructor = const TNode<Object> promise_constructor =
m.LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX); m.LoadContextElement(native_context, Context::PROMISE_FUNCTION_INDEX);
TNode<Oddball> const debug_event = m.TrueConstant(); const TNode<Oddball> debug_event = m.TrueConstant();
TNode<Object> const capability = const TNode<Object> capability =
m.CallBuiltin(Builtins::kNewPromiseCapability, context, m.CallBuiltin(Builtins::kNewPromiseCapability, context,
promise_constructor, debug_event); promise_constructor, debug_event);
m.Return(capability); m.Return(capability);
...@@ -2792,8 +2792,8 @@ TEST(NewPromiseCapability) { ...@@ -2792,8 +2792,8 @@ TEST(NewPromiseCapability) {
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
Node* const constructor = m.Parameter(1); Node* const constructor = m.Parameter(1);
TNode<Oddball> const debug_event = m.TrueConstant(); const TNode<Oddball> debug_event = m.TrueConstant();
TNode<Object> const capability = m.CallBuiltin( const TNode<Object> capability = m.CallBuiltin(
Builtins::kNewPromiseCapability, context, constructor, debug_event); Builtins::kNewPromiseCapability, context, constructor, debug_event);
m.Return(capability); m.Return(capability);
......
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