Lines Matching refs:TNode
22 TNode<RawPtrT> StringBuiltinsAssembler::DirectStringData(
23 TNode<String> string, TNode<Word32T> string_instance_type) {
51 TNode<IntPtrT> StringBuiltinsAssembler::CallSearchStringRaw(
52 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
53 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> search_length,
54 const TNode<IntPtrT> start_position) {
55 const TNode<ExternalReference> function_addr = ExternalConstant(
57 const TNode<ExternalReference> isolate_ptr =
63 const TNode<IntPtrT> result = UncheckedCast<IntPtrT>(CallCFunction(
73 TNode<IntPtrT> StringBuiltinsAssembler::SearchOneByteStringInTwoByteString(
74 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
75 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> search_length,
76 const TNode<IntPtrT> start_position) {
80 TNode<IntPtrT> StringBuiltinsAssembler::SearchOneByteStringInOneByteString(
81 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
82 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> search_length,
83 const TNode<IntPtrT> start_position) {
87 TNode<IntPtrT> StringBuiltinsAssembler::SearchTwoByteStringInTwoByteString(
88 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
89 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> search_length,
90 const TNode<IntPtrT> start_position) {
94 TNode<IntPtrT> StringBuiltinsAssembler::SearchTwoByteStringInOneByteString(
95 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
96 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> search_length,
97 const TNode<IntPtrT> start_position) {
101 TNode<IntPtrT> StringBuiltinsAssembler::SearchOneByteInOneByteString(
102 const TNode<RawPtrT> subject_ptr, const TNode<IntPtrT> subject_length,
103 const TNode<RawPtrT> search_ptr, const TNode<IntPtrT> start_position) {
104 const TNode<RawPtrT> subject_start_ptr =
106 const TNode<IntPtrT> search_byte =
108 const TNode<UintPtrT> search_length =
110 const TNode<ExternalReference> memchr =
112 const TNode<RawPtrT> result_address = UncheckedCast<RawPtrT>(
126 void StringBuiltinsAssembler::GenerateStringEqual(TNode<String> left,
127 TNode<String> right) {
133 TNode<IntPtrT> lhs_length = LoadStringLengthAsWord(left);
134 TNode<IntPtrT> rhs_length = LoadStringLengthAsWord(right);
141 TNode<String> lhs = var_left.value();
142 TNode<String> rhs = var_right.value();
144 TNode<Uint16T> lhs_instance_type = LoadInstanceType(lhs);
145 TNode<Uint16T> rhs_instance_type = LoadInstanceType(rhs);
167 TNode<String> lhs, TNode<Word32T> lhs_instance_type, TNode<String> rhs,
168 TNode<Word32T> rhs_instance_type, TNode<IntPtrT> length, Label* if_equal,
177 TNode<Word32T> both_instance_types = Word32Or(
210 TNode<Word32T> masked_instance_types =
244 TNode<String> lhs, TNode<Word32T> lhs_instance_type, MachineType lhs_type,
245 TNode<String> rhs, TNode<Word32T> rhs_instance_type, MachineType rhs_type,
246 TNode<IntPtrT> length, Label* if_equal, Label* if_not_equal) {
251 TNode<RawPtrT> lhs_data = DirectStringData(lhs, lhs_instance_type);
252 TNode<RawPtrT> rhs_data = DirectStringData(rhs, rhs_instance_type);
265 TNode<Word32T> lhs_value = UncheckedCast<Word32T>(
269 TNode<Word32T> rhs_value = UncheckedCast<Word32T>(
283 TNode<String> StringBuiltinsAssembler::StringFromSingleUTF16EncodedCodePoint(
284 TNode<Int32T> codepoint) {
300 TNode<String> value = AllocateSeqTwoByteString(2);
313 TNode<String> StringBuiltinsAssembler::AllocateConsString(TNode<Uint32T> length,
314 TNode<String> left,
315 TNode<String> right) {
318 TNode<Int32T> left_instance_type = LoadInstanceType(left);
319 TNode<Int32T> right_instance_type = LoadInstanceType(right);
325 TNode<Int32T> combined_instance_type =
327 TNode<Map> result_map = CAST(Select<Object>(
331 TNode<HeapObject> result = AllocateInNewSpace(ConsString::kSize);
341 TNode<String> StringBuiltinsAssembler::StringAdd(
342 TNode<ContextOrEmptyContext> context, TNode<String> left,
343 TNode<String> right) {
351 TNode<Uint32T> left_length = LoadStringLengthAsWord32(left);
357 TNode<Uint32T> right_length = LoadStringLengthAsWord32(right);
364 TNode<Uint32T> new_length = Uint32Add(left_length, right_length);
386 TNode<Int32T> left_instance_type = LoadInstanceType(var_left.value());
387 TNode<Int32T> right_instance_type = LoadInstanceType(var_right.value());
390 TNode<Int32T> ored_instance_types =
392 TNode<Word32T> xored_instance_types =
399 TNode<IntPtrT> word_left_length = Signed(ChangeUint32ToWord(left_length));
400 TNode<IntPtrT> word_right_length = Signed(ChangeUint32ToWord(right_length));
457 TNode<String> string, TNode<Int32T> instance_type, Label* can_deref,
459 TNode<Int32T> representation =
465 TNode<String> rhs =
472 TNode<Int32T> instance_type) {
490 TVariable<String>* var_string, TNode<Int32T> instance_type,
504 TVariable<String>* var_left, TNode<Int32T> left_instance_type,
505 TVariable<String>* var_right, TNode<Int32T> right_instance_type,
528 TNode<String> StringBuiltinsAssembler::DerefIndirectString(
529 TNode<String> string, TNode<Int32T> instance_type, Label* cannot_deref) {
541 TNode<ContextOrEmptyContext> context =
555 TNode<String> left, TNode<String> right, Operation op) {
564 TNode<String> lhs = var_left.value();
565 TNode<String> rhs = var_right.value();
570 TNode<Uint16T> lhs_instance_type = LoadInstanceType(lhs);
571 TNode<Uint16T> rhs_instance_type = LoadInstanceType(rhs);
575 TNode<Int32T> both_instance_types = Word32Or(
594 TNode<IntPtrT> lhs_length = LoadStringLengthAsWord(lhs);
595 TNode<IntPtrT> rhs_length = LoadStringLengthAsWord(rhs);
598 TNode<IntPtrT> length = IntPtrMin(lhs_length, rhs_length);
601 TNode<IntPtrT> begin =
605 TNode<IntPtrT> end = IntPtrAdd(begin, length);
620 TNode<Uint8T> lhs_value = Load<Uint8T>(lhs, var_offset.value());
621 TNode<Uint8T> rhs_value = Load<Uint8T>(rhs, var_offset.value());
759 TNode<IntPtrT> length = LoadStringLengthAsWord(receiver);
761 TNode<Int32T> code =
764 TNode<String> result = StringFromSingleUTF16EncodedCodePoint(code);
779 TNode<Uint32T> unsigned_argc =
792 TNode<Object> code = arguments.AtIndex(0);
793 TNode<Word32T> code32 = TruncateTaggedToWord32(context, code);
794 TNode<Int32T> code16 =
796 TNode<String> result = StringFromSingleCharCode(code16);
800 TNode<Word32T> code16;
805 TNode<String> one_byte_result = AllocateSeqOneByteString(unsigned_argc);
813 arguments.ForEach(vars, [&](TNode<Object> arg) {
814 TNode<Word32T> code32 = TruncateTaggedToWord32(context, arg);
822 TNode<IntPtrT> offset = ElementOffsetFromIndex(
836 TNode<String> two_byte_result = AllocateSeqTwoByteString(unsigned_argc);
840 TNode<IntPtrT> zero = IntPtrConstant(0);
846 TNode<IntPtrT> max_index_offset =
858 [&](TNode<Object> arg) {
859 TNode<Word32T> code32 = TruncateTaggedToWord32(context, arg);
860 TNode<Word32T> code16 =
863 TNode<IntPtrT> offset = ElementOffsetFromIndex(
877 const TNode<Context> context, const TNode<Object> object,
878 const TNode<Object> maybe_string, Handle<Symbol> symbol,
895 TNode<HeapObject> heap_object = CAST(object);
930 const TNode<Object> maybe_func = GetProperty(context, object, symbol);
940 const TNode<Smi> StringBuiltinsAssembler::IndexOfDollarChar(
941 const TNode<Context> context, const TNode<String> string) {
942 const TNode<String> dollar_string = HeapConstant(
944 const TNode<Smi> dollar_ix = CAST(CallBuiltin(
949 TNode<String> StringBuiltinsAssembler::GetSubstitution(
950 TNode<Context> context, TNode<String> subject_string,
951 TNode<Smi> match_start_index, TNode<Smi> match_end_index,
952 TNode<String> replace_string) {
967 const TNode<Smi> dollar_index = IndexOfDollarChar(context, replace_string);
974 const TNode<Object> matched =
977 const TNode<String> replacement_string = CAST(
998 const TNode<Smi> smi_zero = SmiConstant(0);
1013 [=](TNode<Object> fn) {
1019 const TNode<String> subject_string = ToString_Inline(context, receiver);
1020 const TNode<String> search_string = ToString_Inline(context, search);
1022 const TNode<IntPtrT> subject_length = LoadStringLengthAsWord(subject_string);
1023 const TNode<IntPtrT> search_length = LoadStringLengthAsWord(search_string);
1035 TNode<String> replace_string = CAST(replace);
1036 const TNode<Uint16T> subject_instance_type =
1058 const TNode<Smi> match_start_index =
1086 const TNode<Smi> match_end_index =
1096 const TNode<String> prefix =
1114 const TNode<Object> replacement =
1117 const TNode<String> replacement_string =
1126 const TNode<String> replace_string = ToString_Inline(context, replace);
1127 const TNode<Object> replacement =
1137 const TNode<Object> suffix =
1140 const TNode<Object> result = CallBuiltin(
1153 TNode<NativeContext> native_context = LoadNativeContext(context);
1172 TNode<HeapObject> heap_maybe_regexp = CAST(maybe_regexp);
1178 TNode<BoolT> is_global = regexp_asm.FlagGetter(context, heap_maybe_regexp,
1187 TNode<Object> flags = GetProperty(context, heap_maybe_regexp,
1193 TNode<String> flags_string = ToString_Inline(context, flags);
1194 TNode<String> global_char_string = StringConstant("g");
1195 TNode<Smi> global_ix =
1217 TNode<String> s = CAST(receiver);
1222 auto if_generic_call = [=](TNode<Object> fn) {
1233 TNode<String> s = ToString_Inline(context, receiver);
1236 TNode<Object> rx = regexp_asm.RegExpCreate(context, native_context,
1240 TNode<Object> match_all_func =
1245 TNode<JSArray> StringBuiltinsAssembler::StringToArray(
1246 TNode<NativeContext> context, TNode<String> subject_string,
1247 TNode<Smi> subject_length, TNode<Number> limit_number) {
1254 TNode<Uint16T> instance_type = LoadInstanceType(subject_string);
1259 TNode<Smi> length_smi =
1263 TNode<IntPtrT> length = SmiToIntPtr(length_smi);
1273 TNode<FixedArray> elements = CAST(AllocateFixedArray(
1276 TNode<RawPtrT> string_data =
1278 TNode<IntPtrT> string_data_offset = to_direct.offset();
1279 TNode<FixedArray> cache = SingleCharacterStringCacheConstant();
1283 [&](TNode<IntPtrT> index) {
1289 TNode<Int32T> char_code =
1292 TNode<UintPtrT> code_index = ChangeUint32ToWord(char_code);
1293 TNode<Object> entry = LoadFixedArrayElement(cache, code_index);
1303 TNode<Map> array_map = LoadJSArrayElementsMap(PACKED_ELEMENTS, context);
1331 const TNode<IntPtrT> argc = ChangeInt32ToIntPtr(
1335 TNode<Object> receiver = args.GetReceiver();
1336 const TNode<Object> separator = args.GetOptionalArgumentValue(kSeparatorArg);
1337 const TNode<Object> limit = args.GetOptionalArgumentValue(kLimitArg);
1340 TNode<Smi> smi_zero = SmiConstant(0);
1355 [&](TNode<Object> fn) {
1361 TNode<String> subject_string = ToString_Inline(context, receiver);
1362 TNode<Number> limit_number = Select<Number>(
1365 const TNode<String> separator_string = ToString_Inline(context, separator);
1379 const TNode<NativeContext> native_context = LoadNativeContext(context);
1380 TNode<Map> array_map = LoadJSArrayElementsMap(kind, native_context);
1382 TNode<Smi> length = SmiConstant(1);
1383 TNode<IntPtrT> capacity = IntPtrConstant(1);
1384 TNode<JSArray> result = AllocateJSArray(kind, array_map, capacity, length);
1386 TNode<FixedArray> fixed_array = CAST(LoadElements(result));
1400 TNode<Smi> subject_length = LoadStringLengthAsSmi(subject_string);
1409 const TNode<Object> result =
1417 const TNode<NativeContext> native_context = LoadNativeContext(context);
1418 TNode<Map> array_map = LoadJSArrayElementsMap(kind, native_context);
1420 TNode<Smi> length = smi_zero;
1421 TNode<IntPtrT> capacity = IntPtrConstant(0);
1422 TNode<JSArray> result_array =
1441 TNode<Int32T> StringBuiltinsAssembler::LoadSurrogatePairAt(
1442 TNode<String> string, TNode<IntPtrT> length, TNode<IntPtrT> index,
1453 TNode<IntPtrT> next_index = IntPtrAdd(index, IntPtrConstant(1));
1463 TNode<Int32T> lead = var_result.value();
1464 TNode<Int32T> trail = var_trail.value();
1488 TNode<Int32T> surrogate_offset =
1505 TNode<Object> object, TNode<Context> context, Label* if_true,
1512 TNode<PropertyCell> protector_cell = StringIteratorProtectorConstant();
1522 TNode<String> from_string, TNode<String> to_string,
1523 TNode<IntPtrT> from_index, TNode<IntPtrT> to_index,
1524 TNode<IntPtrT> character_count, String::Encoding from_encoding,
1528 TNode<RawPtrT> from_string, TNode<String> to_string,
1529 TNode<IntPtrT> from_index, TNode<IntPtrT> to_index,
1530 TNode<IntPtrT> character_count, String::Encoding from_encoding,
1535 TNode<T> from_string, TNode<String> to_string, TNode<IntPtrT> from_index,
1536 TNode<IntPtrT> to_index, TNode<IntPtrT> character_count,
1551 TNode<IntPtrT> from_offset =
1553 TNode<IntPtrT> to_offset =
1555 TNode<IntPtrT> byte_count =
1557 TNode<IntPtrT> limit_offset = IntPtrAdd(from_offset, byte_count);
1577 [&](TNode<IntPtrT> offset) {
1594 TNode<String> StringBuiltinsAssembler::AllocAndCopyStringCharacters(
1595 TNode<T> from, TNode<Int32T> from_instance_type, TNode<IntPtrT> from_index,
1596 TNode<IntPtrT> character_count) {
1606 TNode<String> result = AllocateSeqOneByteString(
1618 TNode<String> result = AllocateSeqTwoByteString(
1632 TNode<String> StringBuiltinsAssembler::SubString(TNode<String> string,
1633 TNode<IntPtrT> from,
1634 TNode<IntPtrT> to) {
1639 const TNode<IntPtrT> substr_length = IntPtrSub(to, from);
1640 const TNode<IntPtrT> string_length = LoadStringLengthAsWord(string);
1658 TNode<String> direct_string = to_direct.TryToDirect(&runtime);
1659 TNode<IntPtrT> offset = IntPtrAdd(from, to_direct.offset());
1660 const TNode<Int32T> instance_type = to_direct.instance_type();
1718 const TNode<RawPtrT> fake_sequential_string =
1739 TNode<Int32T> char_code = StringCharCodeAt(string, Unsigned(from));