• Home
  • Raw
  • Download

Lines Matching refs:assembler

338   CodeStubAssembler assembler(state);  in GenerateAssembly()  local
339 Node* left = assembler.Parameter(Descriptor::kLeft); in GenerateAssembly()
340 Node* right = assembler.Parameter(Descriptor::kRight); in GenerateAssembly()
341 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
347 left = assembler.ToString(context, in GenerateAssembly()
348 assembler.JSReceiverToPrimitive(context, left)); in GenerateAssembly()
354 right = assembler.ToString(context, in GenerateAssembly()
355 assembler.JSReceiverToPrimitive(context, right)); in GenerateAssembly()
362 assembler.Return(assembler.StringAdd(context, left, right, flags)); in GenerateAssembly()
366 assembler.TailCallStub(callable, context, left, right); in GenerateAssembly()
447 CodeStubAssembler assembler(state); in GenerateAssembly() local
449 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
450 Node* key = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
451 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
452 Node* map = assembler.Parameter(Descriptor::kMap); in GenerateAssembly()
453 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
454 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
455 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
457 assembler.Comment( in GenerateAssembly()
463 Label miss(&assembler); in GenerateAssembly()
467 assembler.Goto(&miss); in GenerateAssembly()
469 assembler.TransitionElementsKind(receiver, map, from_kind(), to_kind(), in GenerateAssembly()
471 assembler.EmitElementStore(receiver, key, value, is_jsarray(), to_kind(), in GenerateAssembly()
473 assembler.Return(value); in GenerateAssembly()
476 assembler.Bind(&miss); in GenerateAssembly()
478 assembler.Comment("Miss"); in GenerateAssembly()
479 assembler.TailCallRuntime(Runtime::kElementsTransitionAndStoreIC_Miss, in GenerateAssembly()
487 CodeStubAssembler assembler(state); in GenerateAssembly() local
489 Node* result = assembler.AllocateHeapNumber(); in GenerateAssembly()
490 assembler.Return(result); in GenerateAssembly()
495 CodeStubAssembler assembler(state); in GenerateAssembly() local
496 compiler::Node* value = assembler.Parameter(0); in GenerateAssembly()
497 compiler::Node* string = assembler.LoadJSValueValue(value); in GenerateAssembly()
498 compiler::Node* result = assembler.LoadStringLength(string); in GenerateAssembly()
499 assembler.Return(result); in GenerateAssembly()
505 CodeStubAssembler assembler(state); \
506 assembler.Return(Generate( \
507 &assembler, assembler.Parameter(Descriptor::kLeft), \
508 assembler.Parameter(Descriptor::kRight), \
509 assembler.ChangeUint32ToWord(assembler.Parameter(Descriptor::kSlot)), \
510 assembler.Parameter(Descriptor::kVector), \
511 assembler.Parameter(Descriptor::kContext))); \
521 compiler::Node* AddWithFeedbackStub::Generate(CodeStubAssembler* assembler, in BINARY_OP_STUB()
532 Label do_fadd(assembler), if_lhsisnotnumber(assembler, Label::kDeferred), in BINARY_OP_STUB()
533 check_rhsisoddball(assembler, Label::kDeferred), in BINARY_OP_STUB()
534 call_with_oddball_feedback(assembler), call_with_any_feedback(assembler), in BINARY_OP_STUB()
535 call_add_stub(assembler), end(assembler); in BINARY_OP_STUB()
536 Variable var_fadd_lhs(assembler, MachineRepresentation::kFloat64), in BINARY_OP_STUB()
537 var_fadd_rhs(assembler, MachineRepresentation::kFloat64), in BINARY_OP_STUB()
538 var_type_feedback(assembler, MachineRepresentation::kTaggedSigned), in BINARY_OP_STUB()
539 var_result(assembler, MachineRepresentation::kTagged); in BINARY_OP_STUB()
542 Label if_lhsissmi(assembler), if_lhsisnotsmi(assembler); in BINARY_OP_STUB()
543 assembler->Branch(assembler->TaggedIsSmi(lhs), &if_lhsissmi, &if_lhsisnotsmi); in BINARY_OP_STUB()
545 assembler->Bind(&if_lhsissmi); in BINARY_OP_STUB()
548 Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler); in BINARY_OP_STUB()
549 assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi, in BINARY_OP_STUB()
552 assembler->Bind(&if_rhsissmi); in BINARY_OP_STUB()
556 assembler->IntPtrAddWithOverflow(assembler->BitcastTaggedToWord(lhs), in BINARY_OP_STUB()
557 assembler->BitcastTaggedToWord(rhs)); in BINARY_OP_STUB()
558 Node* overflow = assembler->Projection(1, pair); in BINARY_OP_STUB()
561 Label if_overflow(assembler), if_notoverflow(assembler); in BINARY_OP_STUB()
562 assembler->Branch(overflow, &if_overflow, &if_notoverflow); in BINARY_OP_STUB()
564 assembler->Bind(&if_overflow); in BINARY_OP_STUB()
566 var_fadd_lhs.Bind(assembler->SmiToFloat64(lhs)); in BINARY_OP_STUB()
567 var_fadd_rhs.Bind(assembler->SmiToFloat64(rhs)); in BINARY_OP_STUB()
568 assembler->Goto(&do_fadd); in BINARY_OP_STUB()
571 assembler->Bind(&if_notoverflow); in BINARY_OP_STUB()
574 assembler->SmiConstant(BinaryOperationFeedback::kSignedSmall)); in BINARY_OP_STUB()
575 var_result.Bind(assembler->BitcastWordToTaggedSigned( in BINARY_OP_STUB()
576 assembler->Projection(0, pair))); in BINARY_OP_STUB()
577 assembler->Goto(&end); in BINARY_OP_STUB()
581 assembler->Bind(&if_rhsisnotsmi); in BINARY_OP_STUB()
584 Node* rhs_map = assembler->LoadMap(rhs); in BINARY_OP_STUB()
587 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in BINARY_OP_STUB()
590 var_fadd_lhs.Bind(assembler->SmiToFloat64(lhs)); in BINARY_OP_STUB()
591 var_fadd_rhs.Bind(assembler->LoadHeapNumberValue(rhs)); in BINARY_OP_STUB()
592 assembler->Goto(&do_fadd); in BINARY_OP_STUB()
596 assembler->Bind(&if_lhsisnotsmi); in BINARY_OP_STUB()
599 Node* lhs_map = assembler->LoadMap(lhs); in BINARY_OP_STUB()
602 assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map), in BINARY_OP_STUB()
606 Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler); in BINARY_OP_STUB()
607 assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi, in BINARY_OP_STUB()
610 assembler->Bind(&if_rhsissmi); in BINARY_OP_STUB()
612 var_fadd_lhs.Bind(assembler->LoadHeapNumberValue(lhs)); in BINARY_OP_STUB()
613 var_fadd_rhs.Bind(assembler->SmiToFloat64(rhs)); in BINARY_OP_STUB()
614 assembler->Goto(&do_fadd); in BINARY_OP_STUB()
617 assembler->Bind(&if_rhsisnotsmi); in BINARY_OP_STUB()
620 Node* rhs_map = assembler->LoadMap(rhs); in BINARY_OP_STUB()
623 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in BINARY_OP_STUB()
626 var_fadd_lhs.Bind(assembler->LoadHeapNumberValue(lhs)); in BINARY_OP_STUB()
627 var_fadd_rhs.Bind(assembler->LoadHeapNumberValue(rhs)); in BINARY_OP_STUB()
628 assembler->Goto(&do_fadd); in BINARY_OP_STUB()
632 assembler->Bind(&do_fadd); in BINARY_OP_STUB()
635 assembler->SmiConstant(BinaryOperationFeedback::kNumber)); in BINARY_OP_STUB()
637 assembler->Float64Add(var_fadd_lhs.value(), var_fadd_rhs.value()); in BINARY_OP_STUB()
638 Node* result = assembler->AllocateHeapNumberWithValue(value); in BINARY_OP_STUB()
640 assembler->Goto(&end); in BINARY_OP_STUB()
643 assembler->Bind(&if_lhsisnotnumber); in BINARY_OP_STUB()
646 Label if_lhsisoddball(assembler), if_lhsisnotoddball(assembler); in BINARY_OP_STUB()
647 Node* lhs_instance_type = assembler->LoadInstanceType(lhs); in BINARY_OP_STUB()
648 Node* lhs_is_oddball = assembler->Word32Equal( in BINARY_OP_STUB()
649 lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in BINARY_OP_STUB()
650 assembler->Branch(lhs_is_oddball, &if_lhsisoddball, &if_lhsisnotoddball); in BINARY_OP_STUB()
652 assembler->Bind(&if_lhsisoddball); in BINARY_OP_STUB()
654 assembler->GotoIf(assembler->TaggedIsSmi(rhs), in BINARY_OP_STUB()
658 Node* rhs_map = assembler->LoadMap(rhs); in BINARY_OP_STUB()
661 assembler->Branch(assembler->IsHeapNumberMap(rhs_map), in BINARY_OP_STUB()
665 assembler->Bind(&if_lhsisnotoddball); in BINARY_OP_STUB()
668 assembler->GotoIfNot(assembler->IsStringInstanceType(lhs_instance_type), in BINARY_OP_STUB()
672 assembler->GotoIf(assembler->TaggedIsSmi(rhs), &call_with_any_feedback); in BINARY_OP_STUB()
674 Node* rhs_instance_type = assembler->LoadInstanceType(rhs); in BINARY_OP_STUB()
678 assembler->GotoIfNot(assembler->IsStringInstanceType(rhs_instance_type), in BINARY_OP_STUB()
682 assembler->SmiConstant(BinaryOperationFeedback::kString)); in BINARY_OP_STUB()
684 assembler->isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED); in BINARY_OP_STUB()
685 var_result.Bind(assembler->CallStub(callable, context, lhs, rhs)); in BINARY_OP_STUB()
687 assembler->Goto(&end); in BINARY_OP_STUB()
691 assembler->Bind(&check_rhsisoddball); in BINARY_OP_STUB()
695 Node* rhs_instance_type = assembler->LoadInstanceType(rhs); in BINARY_OP_STUB()
696 Node* rhs_is_oddball = assembler->Word32Equal( in BINARY_OP_STUB()
697 rhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in BINARY_OP_STUB()
698 assembler->Branch(rhs_is_oddball, &call_with_oddball_feedback, in BINARY_OP_STUB()
702 assembler->Bind(&call_with_oddball_feedback); in BINARY_OP_STUB()
705 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in BINARY_OP_STUB()
706 assembler->Goto(&call_add_stub); in BINARY_OP_STUB()
709 assembler->Bind(&call_with_any_feedback); in BINARY_OP_STUB()
712 assembler->SmiConstant(BinaryOperationFeedback::kAny)); in BINARY_OP_STUB()
713 assembler->Goto(&call_add_stub); in BINARY_OP_STUB()
716 assembler->Bind(&call_add_stub); in BINARY_OP_STUB()
718 Callable callable = CodeFactory::Add(assembler->isolate()); in BINARY_OP_STUB()
719 var_result.Bind(assembler->CallStub(callable, context, lhs, rhs)); in BINARY_OP_STUB()
720 assembler->Goto(&end); in BINARY_OP_STUB()
723 assembler->Bind(&end); in BINARY_OP_STUB()
724 assembler->UpdateFeedback(var_type_feedback.value(), feedback_vector, in BINARY_OP_STUB()
731 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs, in Generate() argument
739 Label do_fsub(assembler), end(assembler), call_subtract_stub(assembler), in Generate()
740 if_lhsisnotnumber(assembler), check_rhsisoddball(assembler), in Generate()
741 call_with_any_feedback(assembler); in Generate()
742 Variable var_fsub_lhs(assembler, MachineRepresentation::kFloat64), in Generate()
743 var_fsub_rhs(assembler, MachineRepresentation::kFloat64), in Generate()
744 var_type_feedback(assembler, MachineRepresentation::kTaggedSigned), in Generate()
745 var_result(assembler, MachineRepresentation::kTagged); in Generate()
748 Label if_lhsissmi(assembler), if_lhsisnotsmi(assembler); in Generate()
749 assembler->Branch(assembler->TaggedIsSmi(lhs), &if_lhsissmi, &if_lhsisnotsmi); in Generate()
751 assembler->Bind(&if_lhsissmi); in Generate()
754 Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler); in Generate()
755 assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi, in Generate()
758 assembler->Bind(&if_rhsissmi); in Generate()
762 assembler->IntPtrSubWithOverflow(assembler->BitcastTaggedToWord(lhs), in Generate()
763 assembler->BitcastTaggedToWord(rhs)); in Generate()
764 Node* overflow = assembler->Projection(1, pair); in Generate()
767 Label if_overflow(assembler), if_notoverflow(assembler); in Generate()
768 assembler->Branch(overflow, &if_overflow, &if_notoverflow); in Generate()
770 assembler->Bind(&if_overflow); in Generate()
774 var_fsub_lhs.Bind(assembler->SmiToFloat64(lhs)); in Generate()
775 var_fsub_rhs.Bind(assembler->SmiToFloat64(rhs)); in Generate()
776 assembler->Goto(&do_fsub); in Generate()
779 assembler->Bind(&if_notoverflow); in Generate()
782 assembler->SmiConstant(BinaryOperationFeedback::kSignedSmall)); in Generate()
784 assembler->BitcastWordToTaggedSigned(assembler->Projection(0, pair))); in Generate()
785 assembler->Goto(&end); in Generate()
788 assembler->Bind(&if_rhsisnotsmi); in Generate()
791 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
794 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in Generate()
798 var_fsub_lhs.Bind(assembler->SmiToFloat64(lhs)); in Generate()
799 var_fsub_rhs.Bind(assembler->LoadHeapNumberValue(rhs)); in Generate()
800 assembler->Goto(&do_fsub); in Generate()
804 assembler->Bind(&if_lhsisnotsmi); in Generate()
807 Node* lhs_map = assembler->LoadMap(lhs); in Generate()
810 assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map), in Generate()
814 Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler); in Generate()
815 assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi, in Generate()
818 assembler->Bind(&if_rhsissmi); in Generate()
821 var_fsub_lhs.Bind(assembler->LoadHeapNumberValue(lhs)); in Generate()
822 var_fsub_rhs.Bind(assembler->SmiToFloat64(rhs)); in Generate()
823 assembler->Goto(&do_fsub); in Generate()
826 assembler->Bind(&if_rhsisnotsmi); in Generate()
829 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
832 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in Generate()
836 var_fsub_lhs.Bind(assembler->LoadHeapNumberValue(lhs)); in Generate()
837 var_fsub_rhs.Bind(assembler->LoadHeapNumberValue(rhs)); in Generate()
838 assembler->Goto(&do_fsub); in Generate()
842 assembler->Bind(&do_fsub); in Generate()
845 assembler->SmiConstant(BinaryOperationFeedback::kNumber)); in Generate()
848 Node* value = assembler->Float64Sub(lhs_value, rhs_value); in Generate()
849 var_result.Bind(assembler->AllocateHeapNumberWithValue(value)); in Generate()
850 assembler->Goto(&end); in Generate()
853 assembler->Bind(&if_lhsisnotnumber); in Generate()
857 Node* lhs_instance_type = assembler->LoadInstanceType(lhs); in Generate()
858 Node* lhs_is_oddball = assembler->Word32Equal( in Generate()
859 lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
860 assembler->GotoIfNot(lhs_is_oddball, &call_with_any_feedback); in Generate()
862 Label if_rhsissmi(assembler), if_rhsisnotsmi(assembler); in Generate()
863 assembler->Branch(assembler->TaggedIsSmi(rhs), &if_rhsissmi, in Generate()
866 assembler->Bind(&if_rhsissmi); in Generate()
869 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
870 assembler->Goto(&call_subtract_stub); in Generate()
873 assembler->Bind(&if_rhsisnotsmi); in Generate()
876 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
879 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in Generate()
883 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
884 assembler->Goto(&call_subtract_stub); in Generate()
888 assembler->Bind(&check_rhsisoddball); in Generate()
892 Node* rhs_instance_type = assembler->LoadInstanceType(rhs); in Generate()
893 Node* rhs_is_oddball = assembler->Word32Equal( in Generate()
894 rhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
895 assembler->GotoIfNot(rhs_is_oddball, &call_with_any_feedback); in Generate()
898 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
899 assembler->Goto(&call_subtract_stub); in Generate()
902 assembler->Bind(&call_with_any_feedback); in Generate()
905 assembler->SmiConstant(BinaryOperationFeedback::kAny)); in Generate()
906 assembler->Goto(&call_subtract_stub); in Generate()
909 assembler->Bind(&call_subtract_stub); in Generate()
911 Callable callable = CodeFactory::Subtract(assembler->isolate()); in Generate()
912 var_result.Bind(assembler->CallStub(callable, context, lhs, rhs)); in Generate()
913 assembler->Goto(&end); in Generate()
916 assembler->Bind(&end); in Generate()
917 assembler->UpdateFeedback(var_type_feedback.value(), feedback_vector, in Generate()
925 CodeStubAssembler* assembler, compiler::Node* lhs, compiler::Node* rhs, in Generate() argument
933 Label do_fmul(assembler), if_lhsisnotnumber(assembler, Label::kDeferred), in Generate()
934 check_rhsisoddball(assembler, Label::kDeferred), in Generate()
935 call_with_oddball_feedback(assembler), call_with_any_feedback(assembler), in Generate()
936 call_multiply_stub(assembler), end(assembler); in Generate()
937 Variable var_lhs_float64(assembler, MachineRepresentation::kFloat64), in Generate()
938 var_rhs_float64(assembler, MachineRepresentation::kFloat64), in Generate()
939 var_result(assembler, MachineRepresentation::kTagged), in Generate()
940 var_type_feedback(assembler, MachineRepresentation::kTaggedSigned); in Generate()
942 Label lhs_is_smi(assembler), lhs_is_not_smi(assembler); in Generate()
943 assembler->Branch(assembler->TaggedIsSmi(lhs), &lhs_is_smi, &lhs_is_not_smi); in Generate()
945 assembler->Bind(&lhs_is_smi); in Generate()
947 Label rhs_is_smi(assembler), rhs_is_not_smi(assembler); in Generate()
948 assembler->Branch(assembler->TaggedIsSmi(rhs), &rhs_is_smi, in Generate()
951 assembler->Bind(&rhs_is_smi); in Generate()
955 var_result.Bind(assembler->SmiMul(lhs, rhs)); in Generate()
956 var_type_feedback.Bind(assembler->SelectSmiConstant( in Generate()
957 assembler->TaggedIsSmi(var_result.value()), in Generate()
960 assembler->Goto(&end); in Generate()
963 assembler->Bind(&rhs_is_not_smi); in Generate()
965 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
968 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in Generate()
972 var_lhs_float64.Bind(assembler->SmiToFloat64(lhs)); in Generate()
973 var_rhs_float64.Bind(assembler->LoadHeapNumberValue(rhs)); in Generate()
974 assembler->Goto(&do_fmul); in Generate()
978 assembler->Bind(&lhs_is_not_smi); in Generate()
980 Node* lhs_map = assembler->LoadMap(lhs); in Generate()
983 assembler->GotoIfNot(assembler->IsHeapNumberMap(lhs_map), in Generate()
987 Label rhs_is_smi(assembler), rhs_is_not_smi(assembler); in Generate()
988 assembler->Branch(assembler->TaggedIsSmi(rhs), &rhs_is_smi, in Generate()
991 assembler->Bind(&rhs_is_smi); in Generate()
994 var_lhs_float64.Bind(assembler->LoadHeapNumberValue(lhs)); in Generate()
995 var_rhs_float64.Bind(assembler->SmiToFloat64(rhs)); in Generate()
996 assembler->Goto(&do_fmul); in Generate()
999 assembler->Bind(&rhs_is_not_smi); in Generate()
1001 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
1004 assembler->GotoIfNot(assembler->IsHeapNumberMap(rhs_map), in Generate()
1009 var_lhs_float64.Bind(assembler->LoadHeapNumberValue(lhs)); in Generate()
1010 var_rhs_float64.Bind(assembler->LoadHeapNumberValue(rhs)); in Generate()
1011 assembler->Goto(&do_fmul); in Generate()
1015 assembler->Bind(&do_fmul); in Generate()
1018 assembler->SmiConstant(BinaryOperationFeedback::kNumber)); in Generate()
1020 assembler->Float64Mul(var_lhs_float64.value(), var_rhs_float64.value()); in Generate()
1021 Node* result = assembler->AllocateHeapNumberWithValue(value); in Generate()
1023 assembler->Goto(&end); in Generate()
1026 assembler->Bind(&if_lhsisnotnumber); in Generate()
1030 Node* lhs_instance_type = assembler->LoadInstanceType(lhs); in Generate()
1031 Node* lhs_is_oddball = assembler->Word32Equal( in Generate()
1032 lhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1033 assembler->GotoIfNot(lhs_is_oddball, &call_with_any_feedback); in Generate()
1035 assembler->GotoIf(assembler->TaggedIsSmi(rhs), &call_with_oddball_feedback); in Generate()
1038 Node* rhs_map = assembler->LoadMap(rhs); in Generate()
1041 assembler->Branch(assembler->IsHeapNumberMap(rhs_map), in Generate()
1045 assembler->Bind(&check_rhsisoddball); in Generate()
1049 Node* rhs_instance_type = assembler->LoadInstanceType(rhs); in Generate()
1050 Node* rhs_is_oddball = assembler->Word32Equal( in Generate()
1051 rhs_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1052 assembler->Branch(rhs_is_oddball, &call_with_oddball_feedback, in Generate()
1056 assembler->Bind(&call_with_oddball_feedback); in Generate()
1059 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
1060 assembler->Goto(&call_multiply_stub); in Generate()
1063 assembler->Bind(&call_with_any_feedback); in Generate()
1066 assembler->SmiConstant(BinaryOperationFeedback::kAny)); in Generate()
1067 assembler->Goto(&call_multiply_stub); in Generate()
1070 assembler->Bind(&call_multiply_stub); in Generate()
1072 Callable callable = CodeFactory::Multiply(assembler->isolate()); in Generate()
1073 var_result.Bind(assembler->CallStub(callable, context, lhs, rhs)); in Generate()
1074 assembler->Goto(&end); in Generate()
1077 assembler->Bind(&end); in Generate()
1078 assembler->UpdateFeedback(var_type_feedback.value(), feedback_vector, in Generate()
1086 CodeStubAssembler* assembler, compiler::Node* dividend, in Generate() argument
1094 Label do_fdiv(assembler), dividend_is_not_number(assembler, Label::kDeferred), in Generate()
1095 check_divisor_for_oddball(assembler, Label::kDeferred), in Generate()
1096 call_with_oddball_feedback(assembler), call_with_any_feedback(assembler), in Generate()
1097 call_divide_stub(assembler), end(assembler); in Generate()
1098 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64), in Generate()
1099 var_divisor_float64(assembler, MachineRepresentation::kFloat64), in Generate()
1100 var_result(assembler, MachineRepresentation::kTagged), in Generate()
1101 var_type_feedback(assembler, MachineRepresentation::kTaggedSigned); in Generate()
1103 Label dividend_is_smi(assembler), dividend_is_not_smi(assembler); in Generate()
1104 assembler->Branch(assembler->TaggedIsSmi(dividend), &dividend_is_smi, in Generate()
1107 assembler->Bind(&dividend_is_smi); in Generate()
1109 Label divisor_is_smi(assembler), divisor_is_not_smi(assembler); in Generate()
1110 assembler->Branch(assembler->TaggedIsSmi(divisor), &divisor_is_smi, in Generate()
1113 assembler->Bind(&divisor_is_smi); in Generate()
1115 Label bailout(assembler); in Generate()
1118 assembler->GotoIf( in Generate()
1119 assembler->WordEqual(divisor, assembler->SmiConstant(0)), &bailout); in Generate()
1123 Label dividend_is_zero(assembler), dividend_is_not_zero(assembler); in Generate()
1124 assembler->Branch( in Generate()
1125 assembler->WordEqual(dividend, assembler->SmiConstant(0)), in Generate()
1128 assembler->Bind(&dividend_is_zero); in Generate()
1130 assembler->GotoIf( in Generate()
1131 assembler->SmiLessThan(divisor, assembler->SmiConstant(0)), in Generate()
1133 assembler->Goto(&dividend_is_not_zero); in Generate()
1135 assembler->Bind(&dividend_is_not_zero); in Generate()
1137 Node* untagged_divisor = assembler->SmiToWord32(divisor); in Generate()
1138 Node* untagged_dividend = assembler->SmiToWord32(dividend); in Generate()
1142 Label divisor_is_minus_one(assembler), in Generate()
1143 divisor_is_not_minus_one(assembler); in Generate()
1144 assembler->Branch(assembler->Word32Equal(untagged_divisor, in Generate()
1145 assembler->Int32Constant(-1)), in Generate()
1148 assembler->Bind(&divisor_is_minus_one); in Generate()
1150 assembler->GotoIf( in Generate()
1151 assembler->Word32Equal( in Generate()
1153 assembler->Int32Constant(kSmiValueSize == 32 ? kMinInt in Generate()
1156 assembler->Goto(&divisor_is_not_minus_one); in Generate()
1158 assembler->Bind(&divisor_is_not_minus_one); in Generate()
1161 assembler->Int32Div(untagged_dividend, untagged_divisor); in Generate()
1162 Node* truncated = assembler->Int32Mul(untagged_result, untagged_divisor); in Generate()
1164 assembler->GotoIf(assembler->Word32NotEqual(untagged_dividend, truncated), in Generate()
1167 assembler->SmiConstant(BinaryOperationFeedback::kSignedSmall)); in Generate()
1168 var_result.Bind(assembler->SmiFromWord32(untagged_result)); in Generate()
1169 assembler->Goto(&end); in Generate()
1173 assembler->Bind(&bailout); in Generate()
1175 var_dividend_float64.Bind(assembler->SmiToFloat64(dividend)); in Generate()
1176 var_divisor_float64.Bind(assembler->SmiToFloat64(divisor)); in Generate()
1177 assembler->Goto(&do_fdiv); in Generate()
1181 assembler->Bind(&divisor_is_not_smi); in Generate()
1183 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1186 assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map), in Generate()
1191 var_dividend_float64.Bind(assembler->SmiToFloat64(dividend)); in Generate()
1192 var_divisor_float64.Bind(assembler->LoadHeapNumberValue(divisor)); in Generate()
1193 assembler->Goto(&do_fdiv); in Generate()
1196 assembler->Bind(&dividend_is_not_smi); in Generate()
1198 Node* dividend_map = assembler->LoadMap(dividend); in Generate()
1201 assembler->GotoIfNot(assembler->IsHeapNumberMap(dividend_map), in Generate()
1205 Label divisor_is_smi(assembler), divisor_is_not_smi(assembler); in Generate()
1206 assembler->Branch(assembler->TaggedIsSmi(divisor), &divisor_is_smi, in Generate()
1209 assembler->Bind(&divisor_is_smi); in Generate()
1213 var_dividend_float64.Bind(assembler->LoadHeapNumberValue(dividend)); in Generate()
1214 var_divisor_float64.Bind(assembler->SmiToFloat64(divisor)); in Generate()
1215 assembler->Goto(&do_fdiv); in Generate()
1218 assembler->Bind(&divisor_is_not_smi); in Generate()
1220 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1223 assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map), in Generate()
1228 var_dividend_float64.Bind(assembler->LoadHeapNumberValue(dividend)); in Generate()
1229 var_divisor_float64.Bind(assembler->LoadHeapNumberValue(divisor)); in Generate()
1230 assembler->Goto(&do_fdiv); in Generate()
1235 assembler->Bind(&do_fdiv); in Generate()
1238 assembler->SmiConstant(BinaryOperationFeedback::kNumber)); in Generate()
1239 Node* value = assembler->Float64Div(var_dividend_float64.value(), in Generate()
1241 var_result.Bind(assembler->AllocateHeapNumberWithValue(value)); in Generate()
1242 assembler->Goto(&end); in Generate()
1245 assembler->Bind(&dividend_is_not_number); in Generate()
1249 Node* dividend_instance_type = assembler->LoadInstanceType(dividend); in Generate()
1250 Node* dividend_is_oddball = assembler->Word32Equal( in Generate()
1251 dividend_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1252 assembler->GotoIfNot(dividend_is_oddball, &call_with_any_feedback); in Generate()
1254 assembler->GotoIf(assembler->TaggedIsSmi(divisor), in Generate()
1258 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1261 assembler->Branch(assembler->IsHeapNumberMap(divisor_map), in Generate()
1265 assembler->Bind(&check_divisor_for_oddball); in Generate()
1269 Node* divisor_instance_type = assembler->LoadInstanceType(divisor); in Generate()
1270 Node* divisor_is_oddball = assembler->Word32Equal( in Generate()
1271 divisor_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1272 assembler->Branch(divisor_is_oddball, &call_with_oddball_feedback, in Generate()
1276 assembler->Bind(&call_with_oddball_feedback); in Generate()
1279 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
1280 assembler->Goto(&call_divide_stub); in Generate()
1283 assembler->Bind(&call_with_any_feedback); in Generate()
1286 assembler->SmiConstant(BinaryOperationFeedback::kAny)); in Generate()
1287 assembler->Goto(&call_divide_stub); in Generate()
1290 assembler->Bind(&call_divide_stub); in Generate()
1292 Callable callable = CodeFactory::Divide(assembler->isolate()); in Generate()
1293 var_result.Bind(assembler->CallStub(callable, context, dividend, divisor)); in Generate()
1294 assembler->Goto(&end); in Generate()
1297 assembler->Bind(&end); in Generate()
1298 assembler->UpdateFeedback(var_type_feedback.value(), feedback_vector, in Generate()
1305 CodeStubAssembler* assembler, compiler::Node* dividend, in Generate() argument
1313 Label do_fmod(assembler), dividend_is_not_number(assembler, Label::kDeferred), in Generate()
1314 check_divisor_for_oddball(assembler, Label::kDeferred), in Generate()
1315 call_with_oddball_feedback(assembler), call_with_any_feedback(assembler), in Generate()
1316 call_modulus_stub(assembler), end(assembler); in Generate()
1317 Variable var_dividend_float64(assembler, MachineRepresentation::kFloat64), in Generate()
1318 var_divisor_float64(assembler, MachineRepresentation::kFloat64), in Generate()
1319 var_result(assembler, MachineRepresentation::kTagged), in Generate()
1320 var_type_feedback(assembler, MachineRepresentation::kTaggedSigned); in Generate()
1322 Label dividend_is_smi(assembler), dividend_is_not_smi(assembler); in Generate()
1323 assembler->Branch(assembler->TaggedIsSmi(dividend), &dividend_is_smi, in Generate()
1326 assembler->Bind(&dividend_is_smi); in Generate()
1328 Label divisor_is_smi(assembler), divisor_is_not_smi(assembler); in Generate()
1329 assembler->Branch(assembler->TaggedIsSmi(divisor), &divisor_is_smi, in Generate()
1332 assembler->Bind(&divisor_is_smi); in Generate()
1334 var_result.Bind(assembler->SmiMod(dividend, divisor)); in Generate()
1335 var_type_feedback.Bind(assembler->SelectSmiConstant( in Generate()
1336 assembler->TaggedIsSmi(var_result.value()), in Generate()
1339 assembler->Goto(&end); in Generate()
1342 assembler->Bind(&divisor_is_not_smi); in Generate()
1344 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1347 assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map), in Generate()
1352 var_dividend_float64.Bind(assembler->SmiToFloat64(dividend)); in Generate()
1353 var_divisor_float64.Bind(assembler->LoadHeapNumberValue(divisor)); in Generate()
1354 assembler->Goto(&do_fmod); in Generate()
1358 assembler->Bind(&dividend_is_not_smi); in Generate()
1360 Node* dividend_map = assembler->LoadMap(dividend); in Generate()
1363 assembler->GotoIfNot(assembler->IsHeapNumberMap(dividend_map), in Generate()
1367 Label divisor_is_smi(assembler), divisor_is_not_smi(assembler); in Generate()
1368 assembler->Branch(assembler->TaggedIsSmi(divisor), &divisor_is_smi, in Generate()
1371 assembler->Bind(&divisor_is_smi); in Generate()
1375 var_dividend_float64.Bind(assembler->LoadHeapNumberValue(dividend)); in Generate()
1376 var_divisor_float64.Bind(assembler->SmiToFloat64(divisor)); in Generate()
1377 assembler->Goto(&do_fmod); in Generate()
1380 assembler->Bind(&divisor_is_not_smi); in Generate()
1382 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1385 assembler->GotoIfNot(assembler->IsHeapNumberMap(divisor_map), in Generate()
1390 var_dividend_float64.Bind(assembler->LoadHeapNumberValue(dividend)); in Generate()
1391 var_divisor_float64.Bind(assembler->LoadHeapNumberValue(divisor)); in Generate()
1392 assembler->Goto(&do_fmod); in Generate()
1396 assembler->Bind(&do_fmod); in Generate()
1399 assembler->SmiConstant(BinaryOperationFeedback::kNumber)); in Generate()
1400 Node* value = assembler->Float64Mod(var_dividend_float64.value(), in Generate()
1402 var_result.Bind(assembler->AllocateHeapNumberWithValue(value)); in Generate()
1403 assembler->Goto(&end); in Generate()
1406 assembler->Bind(&dividend_is_not_number); in Generate()
1410 Node* dividend_instance_type = assembler->LoadInstanceType(dividend); in Generate()
1411 Node* dividend_is_oddball = assembler->Word32Equal( in Generate()
1412 dividend_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1413 assembler->GotoIfNot(dividend_is_oddball, &call_with_any_feedback); in Generate()
1415 assembler->GotoIf(assembler->TaggedIsSmi(divisor), in Generate()
1419 Node* divisor_map = assembler->LoadMap(divisor); in Generate()
1422 assembler->Branch(assembler->IsHeapNumberMap(divisor_map), in Generate()
1426 assembler->Bind(&check_divisor_for_oddball); in Generate()
1430 Node* divisor_instance_type = assembler->LoadInstanceType(divisor); in Generate()
1431 Node* divisor_is_oddball = assembler->Word32Equal( in Generate()
1432 divisor_instance_type, assembler->Int32Constant(ODDBALL_TYPE)); in Generate()
1433 assembler->Branch(divisor_is_oddball, &call_with_oddball_feedback, in Generate()
1437 assembler->Bind(&call_with_oddball_feedback); in Generate()
1440 assembler->SmiConstant(BinaryOperationFeedback::kNumberOrOddball)); in Generate()
1441 assembler->Goto(&call_modulus_stub); in Generate()
1444 assembler->Bind(&call_with_any_feedback); in Generate()
1447 assembler->SmiConstant(BinaryOperationFeedback::kAny)); in Generate()
1448 assembler->Goto(&call_modulus_stub); in Generate()
1451 assembler->Bind(&call_modulus_stub); in Generate()
1453 Callable callable = CodeFactory::Modulus(assembler->isolate()); in Generate()
1454 var_result.Bind(assembler->CallStub(callable, context, dividend, divisor)); in Generate()
1455 assembler->Goto(&end); in Generate()
1458 assembler->Bind(&end); in Generate()
1459 assembler->UpdateFeedback(var_type_feedback.value(), feedback_vector, in Generate()
1467 CodeStubAssembler assembler(state); in GenerateAssembly() local
1468 Node* argument = assembler.Parameter(Descriptor::kArgument); in GenerateAssembly()
1469 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1470 assembler.Return(assembler.NumberToString(context, argument)); in GenerateAssembly()
1474 compiler::Node* SubStringStub::Generate(CodeStubAssembler* assembler, in Generate() argument
1479 return assembler->SubString(context, string, from, to); in Generate()
1484 CodeStubAssembler assembler(state); in GenerateAssembly() local
1485 assembler.Return(Generate(&assembler, in GenerateAssembly()
1486 assembler.Parameter(Descriptor::kString), in GenerateAssembly()
1487 assembler.Parameter(Descriptor::kFrom), in GenerateAssembly()
1488 assembler.Parameter(Descriptor::kTo), in GenerateAssembly()
1489 assembler.Parameter(Descriptor::kContext))); in GenerateAssembly()
1496 CodeStubAssembler assembler(state); in GenerateAssembly() local
1498 assembler.Comment( in GenerateAssembly()
1505 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
1506 Node* name = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
1507 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
1508 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1509 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1510 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1512 Label miss(&assembler); in GenerateAssembly()
1517 Node* proxy_map = assembler.LoadMap(receiver); in GenerateAssembly()
1518 Node* global = assembler.LoadObjectField(proxy_map, Map::kPrototypeOffset); in GenerateAssembly()
1519 Node* map_cell = assembler.HeapConstant(isolate()->factory()->NewWeakCell( in GenerateAssembly()
1521 Node* expected_map = assembler.LoadWeakCellValueUnchecked(map_cell); in GenerateAssembly()
1522 Node* map = assembler.LoadMap(global); in GenerateAssembly()
1523 assembler.GotoIf(assembler.WordNotEqual(expected_map, map), &miss); in GenerateAssembly()
1526 Node* weak_cell = assembler.HeapConstant(isolate()->factory()->NewWeakCell( in GenerateAssembly()
1528 Node* cell = assembler.LoadWeakCellValue(weak_cell); in GenerateAssembly()
1529 assembler.GotoIf(assembler.TaggedIsSmi(cell), &miss); in GenerateAssembly()
1535 assembler.LoadObjectField(cell, PropertyCell::kValueOffset); in GenerateAssembly()
1541 assembler.GotoIf(assembler.WordNotEqual(cell_contents, value), &miss); in GenerateAssembly()
1543 assembler.GotoIf(assembler.IsTheHole(cell_contents), &miss); in GenerateAssembly()
1551 assembler.GotoIfNot(assembler.TaggedIsSmi(value), &miss); in GenerateAssembly()
1560 assembler.GotoIf(assembler.TaggedIsSmi(value), &miss); in GenerateAssembly()
1561 assembler.GotoIf(assembler.TaggedIsSmi(cell_contents), &miss); in GenerateAssembly()
1562 Node* expected_map = assembler.LoadMap(cell_contents); in GenerateAssembly()
1563 Node* map = assembler.LoadMap(value); in GenerateAssembly()
1564 assembler.GotoIf(assembler.WordNotEqual(expected_map, map), &miss); in GenerateAssembly()
1570 assembler.StoreObjectFieldNoWriteBarrier(cell, PropertyCell::kValueOffset, in GenerateAssembly()
1573 assembler.StoreObjectField(cell, PropertyCell::kValueOffset, value); in GenerateAssembly()
1577 assembler.Return(value); in GenerateAssembly()
1579 assembler.Bind(&miss); in GenerateAssembly()
1581 assembler.Comment("Miss"); in GenerateAssembly()
1582 assembler.TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, in GenerateAssembly()
1591 CodeStubAssembler assembler(state); in GenerateAssembly() local
1593 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
1594 Node* key = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
1595 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1596 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1597 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1599 Label miss(&assembler); in GenerateAssembly()
1601 Node* result = assembler.LoadKeyedSloppyArguments(receiver, key, &miss); in GenerateAssembly()
1602 assembler.Return(result); in GenerateAssembly()
1604 assembler.Bind(&miss); in GenerateAssembly()
1606 assembler.Comment("Miss"); in GenerateAssembly()
1607 assembler.TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, in GenerateAssembly()
1616 CodeStubAssembler assembler(state); in GenerateAssembly() local
1618 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
1619 Node* key = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
1620 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
1621 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1622 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1623 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1625 Label miss(&assembler); in GenerateAssembly()
1627 assembler.StoreKeyedSloppyArguments(receiver, key, value, &miss); in GenerateAssembly()
1628 assembler.Return(value); in GenerateAssembly()
1630 assembler.Bind(&miss); in GenerateAssembly()
1632 assembler.Comment("Miss"); in GenerateAssembly()
1633 assembler.TailCallRuntime(Runtime::kKeyedStoreIC_Miss, context, value, slot, in GenerateAssembly()
1641 CodeStubAssembler assembler(state); in GenerateAssembly() local
1643 assembler.Comment("LoadScriptContextFieldStub: context_index=%d, slot=%d", in GenerateAssembly()
1646 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1648 Node* script_context = assembler.LoadScriptContext(context, context_index()); in GenerateAssembly()
1649 Node* result = assembler.LoadFixedArrayElement(script_context, slot_index()); in GenerateAssembly()
1650 assembler.Return(result); in GenerateAssembly()
1656 CodeStubAssembler assembler(state); in GenerateAssembly() local
1658 assembler.Comment("StoreScriptContextFieldStub: context_index=%d, slot=%d", in GenerateAssembly()
1661 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
1662 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1664 Node* script_context = assembler.LoadScriptContext(context, context_index()); in GenerateAssembly()
1665 assembler.StoreFixedArrayElement( in GenerateAssembly()
1666 script_context, assembler.IntPtrConstant(slot_index()), value); in GenerateAssembly()
1667 assembler.Return(value); in GenerateAssembly()
1673 CodeStubAssembler assembler(state); in GenerateAssembly() local
1675 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
1676 Node* name = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
1677 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
1678 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1679 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1680 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1681 assembler.TailCallRuntime(Runtime::kStorePropertyWithInterceptor, context, in GenerateAssembly()
1689 CodeStubAssembler assembler(state); in GenerateAssembly() local
1691 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
1692 Node* key = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
1693 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1694 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1695 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1697 Label if_keyispositivesmi(&assembler), if_keyisinvalid(&assembler); in GenerateAssembly()
1698 assembler.Branch(assembler.TaggedIsPositiveSmi(key), &if_keyispositivesmi, in GenerateAssembly()
1700 assembler.Bind(&if_keyispositivesmi); in GenerateAssembly()
1701 assembler.TailCallRuntime(Runtime::kLoadElementWithInterceptor, context, in GenerateAssembly()
1704 assembler.Bind(&if_keyisinvalid); in GenerateAssembly()
1705 assembler.TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, key, in GenerateAssembly()
1716 CodeStubAssembler assembler(state); in GenerateAssembly() local
1718 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1719 Node* target = assembler.Parameter(Descriptor::kTarget); in GenerateAssembly()
1720 Node* argc = assembler.Parameter(Descriptor::kActualArgumentsCount); in GenerateAssembly()
1721 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1722 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
1726 slot = assembler.ChangeInt32ToIntPtr(slot); in GenerateAssembly()
1745 assembler.Comment("increment call count"); in GenerateAssembly()
1747 assembler.LoadFixedArrayElement(vector, slot, 1 * kPointerSize); in GenerateAssembly()
1748 Node* new_count = assembler.SmiAdd(call_count, assembler.SmiConstant(1)); in GenerateAssembly()
1750 assembler.StoreFixedArrayElement(vector, slot, new_count, SKIP_WRITE_BARRIER, in GenerateAssembly()
1753 Label call_function(&assembler), extra_checks(&assembler), call(&assembler); in GenerateAssembly()
1756 Node* feedback_element = assembler.LoadFixedArrayElement(vector, slot); in GenerateAssembly()
1757 Node* feedback_value = assembler.LoadWeakCellValueUnchecked(feedback_element); in GenerateAssembly()
1758 Node* is_monomorphic = assembler.WordEqual(target, feedback_value); in GenerateAssembly()
1759 assembler.GotoIfNot(is_monomorphic, &extra_checks); in GenerateAssembly()
1763 Node* is_smi = assembler.TaggedIsSmi(target); in GenerateAssembly()
1764 assembler.Branch(is_smi, &extra_checks, &call_function); in GenerateAssembly()
1766 assembler.Bind(&call_function); in GenerateAssembly()
1771 assembler.TailCallStub(callable, context, target, argc); in GenerateAssembly()
1774 assembler.Bind(&extra_checks); in GenerateAssembly()
1776 Label check_initialized(&assembler), mark_megamorphic(&assembler), in GenerateAssembly()
1777 create_allocation_site(&assembler, Label::kDeferred), in GenerateAssembly()
1778 create_weak_cell(&assembler, Label::kDeferred); in GenerateAssembly()
1780 assembler.Comment("check if megamorphic"); in GenerateAssembly()
1782 Node* is_megamorphic = assembler.WordEqual( in GenerateAssembly()
1784 assembler.HeapConstant(FeedbackVector::MegamorphicSentinel(isolate()))); in GenerateAssembly()
1785 assembler.GotoIf(is_megamorphic, &call); in GenerateAssembly()
1787 assembler.Comment("check if it is an allocation site"); in GenerateAssembly()
1788 assembler.GotoIfNot( in GenerateAssembly()
1789 assembler.IsAllocationSiteMap(assembler.LoadMap(feedback_element)), in GenerateAssembly()
1793 Node* context_slot = assembler.LoadContextElement( in GenerateAssembly()
1794 assembler.LoadNativeContext(context), Context::ARRAY_FUNCTION_INDEX); in GenerateAssembly()
1795 Node* is_array_function = assembler.WordEqual(context_slot, target); in GenerateAssembly()
1796 assembler.GotoIfNot(is_array_function, &mark_megamorphic); in GenerateAssembly()
1800 assembler.TailCallStub(callable, context, target, target, argc, in GenerateAssembly()
1803 assembler.Bind(&check_initialized); in GenerateAssembly()
1805 assembler.Comment("check if uninitialized"); in GenerateAssembly()
1807 Node* is_uninitialized = assembler.WordEqual( in GenerateAssembly()
1809 assembler.HeapConstant( in GenerateAssembly()
1811 assembler.GotoIfNot(is_uninitialized, &mark_megamorphic); in GenerateAssembly()
1813 assembler.Comment("handle unitinitialized"); in GenerateAssembly()
1815 Node* is_smi = assembler.TaggedIsSmi(target); in GenerateAssembly()
1816 assembler.GotoIf(is_smi, &mark_megamorphic); in GenerateAssembly()
1819 Node* is_js_function = assembler.IsJSFunction(target); in GenerateAssembly()
1820 assembler.GotoIfNot(is_js_function, &mark_megamorphic); in GenerateAssembly()
1823 Node* context_slot = assembler.LoadContextElement( in GenerateAssembly()
1824 assembler.LoadNativeContext(context), Context::ARRAY_FUNCTION_INDEX); in GenerateAssembly()
1825 Node* is_array_function = assembler.WordEqual(context_slot, target); in GenerateAssembly()
1826 assembler.GotoIf(is_array_function, &create_allocation_site); in GenerateAssembly()
1829 Node* native_context = assembler.LoadNativeContext( in GenerateAssembly()
1830 assembler.LoadObjectField(target, JSFunction::kContextOffset)); in GenerateAssembly()
1831 Node* is_same_native_context = assembler.WordEqual( in GenerateAssembly()
1832 native_context, assembler.LoadNativeContext(context)); in GenerateAssembly()
1833 assembler.Branch(is_same_native_context, &create_weak_cell, in GenerateAssembly()
1837 assembler.Bind(&create_weak_cell); in GenerateAssembly()
1840 assembler.Comment("create weak cell"); in GenerateAssembly()
1841 assembler.CreateWeakCellInFeedbackVector(vector, assembler.SmiTag(slot), in GenerateAssembly()
1845 assembler.Goto(&call_function); in GenerateAssembly()
1848 assembler.Bind(&create_allocation_site); in GenerateAssembly()
1851 assembler.Comment("create allocation site"); in GenerateAssembly()
1852 assembler.CreateAllocationSiteInFeedbackVector(vector, in GenerateAssembly()
1853 assembler.SmiTag(slot)); in GenerateAssembly()
1858 assembler.Goto(&call_function); in GenerateAssembly()
1861 assembler.Bind(&mark_megamorphic); in GenerateAssembly()
1867 assembler.StoreFixedArrayElement( in GenerateAssembly()
1868 vector, slot, assembler.HeapConstant( in GenerateAssembly()
1871 assembler.Goto(&call); in GenerateAssembly()
1875 assembler.Bind(&call); in GenerateAssembly()
1878 assembler.Comment("call using Call builtin"); in GenerateAssembly()
1881 assembler.TailCallStub(callable_call, context, target, argc); in GenerateAssembly()
1892 CodeStubAssembler assembler(state); in GenerateAssembly() local
1894 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
1895 Node* target = assembler.Parameter(Descriptor::kTarget); in GenerateAssembly()
1896 Node* argc = assembler.Parameter(Descriptor::kActualArgumentsCount); in GenerateAssembly()
1897 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
1898 Node* vector = assembler.LoadFeedbackVectorForStub(); in GenerateAssembly()
1902 assembler.TailCallStub(callable, context, target, argc, slot, vector); in GenerateAssembly()
1949 CodeStubAssembler assembler(state); in GenerateAssembly() local
1951 Label call_runtime(&assembler, Label::kDeferred), in GenerateAssembly()
1952 return_undefined(&assembler), end(&assembler); in GenerateAssembly()
1954 Node* object = assembler.Parameter(0); in GenerateAssembly()
1955 Node* key = assembler.Parameter(1); in GenerateAssembly()
1956 Node* context = assembler.Parameter(2); in GenerateAssembly()
1957 Variable var_result(&assembler, MachineRepresentation::kTagged); in GenerateAssembly()
1960 [&assembler, context, &var_result, &end]( in GenerateAssembly()
1964 Variable var_value(&assembler, MachineRepresentation::kTagged); in GenerateAssembly()
1965 Label if_found(&assembler); in GenerateAssembly()
1966 assembler.TryGetOwnProperty( in GenerateAssembly()
1969 assembler.Bind(&if_found); in GenerateAssembly()
1972 assembler.Goto(&end); in GenerateAssembly()
1977 [&assembler]( in GenerateAssembly()
1982 assembler.Use(next_holder); in GenerateAssembly()
1983 assembler.Goto(if_bailout); in GenerateAssembly()
1986 assembler.TryPrototypeChainLookup(object, key, lookup_property_in_holder, in GenerateAssembly()
1990 assembler.Bind(&return_undefined); in GenerateAssembly()
1992 var_result.Bind(assembler.UndefinedConstant()); in GenerateAssembly()
1993 assembler.Goto(&end); in GenerateAssembly()
1996 assembler.Bind(&call_runtime); in GenerateAssembly()
1999 assembler.CallRuntime(Runtime::kGetProperty, context, object, key)); in GenerateAssembly()
2000 assembler.Goto(&end); in GenerateAssembly()
2003 assembler.Bind(&end); in GenerateAssembly()
2004 assembler.Return(var_result.value()); in GenerateAssembly()
2021 CodeStubAssembler assembler(state); in GenerateAssembly() local
2023 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
2024 Node* name = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
2025 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
2026 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
2027 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
2028 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
2030 assembler.TailCallRuntime(Runtime::kKeyedStoreIC_Slow, context, value, slot, in GenerateAssembly()
2038 CodeStubAssembler assembler(state); in GenerateAssembly() local
2040 assembler.Comment( in GenerateAssembly()
2044 Node* receiver = assembler.Parameter(Descriptor::kReceiver); in GenerateAssembly()
2045 Node* key = assembler.Parameter(Descriptor::kName); in GenerateAssembly()
2046 Node* value = assembler.Parameter(Descriptor::kValue); in GenerateAssembly()
2047 Node* slot = assembler.Parameter(Descriptor::kSlot); in GenerateAssembly()
2048 Node* vector = assembler.Parameter(Descriptor::kVector); in GenerateAssembly()
2049 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
2051 Label miss(&assembler); in GenerateAssembly()
2053 assembler.EmitElementStore(receiver, key, value, is_js_array(), in GenerateAssembly()
2055 assembler.Return(value); in GenerateAssembly()
2057 assembler.Bind(&miss); in GenerateAssembly()
2059 assembler.Comment("Miss"); in GenerateAssembly()
2060 assembler.TailCallRuntime(Runtime::kKeyedStoreIC_Miss, context, value, slot, in GenerateAssembly()
2143 CodeStubAssembler assembler(state); in GenerateAssembly() local
2144 assembler.Return(assembler.CreateAllocationSiteInFeedbackVector( in GenerateAssembly()
2145 assembler.Parameter(Descriptor::kVector), in GenerateAssembly()
2146 assembler.Parameter(Descriptor::kSlot))); in GenerateAssembly()
2151 CodeStubAssembler assembler(state); in GenerateAssembly() local
2152 assembler.Return(assembler.CreateWeakCellInFeedbackVector( in GenerateAssembly()
2153 assembler.Parameter(Descriptor::kVector), in GenerateAssembly()
2154 assembler.Parameter(Descriptor::kSlot), in GenerateAssembly()
2155 assembler.Parameter(Descriptor::kValue))); in GenerateAssembly()
2161 CodeStubAssembler assembler(state); in GenerateAssembly() local
2162 Node* native_context = assembler.LoadObjectField( in GenerateAssembly()
2163 assembler.Parameter(Descriptor::kFunction), JSFunction::kContextOffset); in GenerateAssembly()
2168 ? assembler.Parameter(Descriptor::kAllocationSite) in GenerateAssembly()
2171 assembler.LoadJSArrayElementsMap(elements_kind(), native_context); in GenerateAssembly()
2172 Node* array = assembler.AllocateJSArray( in GenerateAssembly()
2174 assembler.IntPtrConstant(JSArray::kPreallocatedArrayElements), in GenerateAssembly()
2175 assembler.SmiConstant(Smi::kZero), allocation_site); in GenerateAssembly()
2176 assembler.Return(array); in GenerateAssembly()
2182 CodeStubAssembler assembler(state); in GenerateAssembly() local
2184 assembler.LoadObjectField(assembler.Parameter(Descriptor::kFunction), in GenerateAssembly()
2186 Node* array = assembler.AllocateJSArray( in GenerateAssembly()
2188 assembler.IntPtrConstant(JSArray::kPreallocatedArrayElements), in GenerateAssembly()
2189 assembler.SmiConstant(Smi::kZero)); in GenerateAssembly()
2190 assembler.Return(array); in GenerateAssembly()
2196 void SingleArgumentConstructorCommon(CodeStubAssembler* assembler, in SingleArgumentConstructorCommon() argument
2204 Label ok(assembler); in SingleArgumentConstructorCommon()
2205 Label smi_size(assembler); in SingleArgumentConstructorCommon()
2206 Label small_smi_size(assembler); in SingleArgumentConstructorCommon()
2207 Label call_runtime(assembler, Label::kDeferred); in SingleArgumentConstructorCommon()
2209 Node* size = assembler->Parameter(Descriptor::kArraySizeSmiParameter); in SingleArgumentConstructorCommon()
2210 assembler->Branch(assembler->TaggedIsSmi(size), &smi_size, &call_runtime); in SingleArgumentConstructorCommon()
2212 assembler->Bind(&smi_size); in SingleArgumentConstructorCommon()
2215 Label abort(assembler, Label::kDeferred); in SingleArgumentConstructorCommon()
2216 assembler->Branch( in SingleArgumentConstructorCommon()
2217 assembler->SmiEqual(size, assembler->SmiConstant(Smi::kZero)), in SingleArgumentConstructorCommon()
2220 assembler->Bind(&abort); in SingleArgumentConstructorCommon()
2222 assembler->SmiConstant(Smi::FromInt(kAllocatingNonEmptyPackedArray)); in SingleArgumentConstructorCommon()
2223 Node* context = assembler->Parameter(Descriptor::kContext); in SingleArgumentConstructorCommon()
2224 assembler->TailCallRuntime(Runtime::kAbort, context, reason); in SingleArgumentConstructorCommon()
2232 assembler->Branch( in SingleArgumentConstructorCommon()
2233 assembler->SmiAboveOrEqual( in SingleArgumentConstructorCommon()
2234 size, assembler->SmiConstant(Smi::FromInt(max_fast_elements))), in SingleArgumentConstructorCommon()
2238 assembler->Bind(&small_smi_size); in SingleArgumentConstructorCommon()
2240 Node* array = assembler->AllocateJSArray( in SingleArgumentConstructorCommon()
2244 assembler->Return(array); in SingleArgumentConstructorCommon()
2247 assembler->Bind(&call_runtime); in SingleArgumentConstructorCommon()
2249 Node* context = assembler->Parameter(Descriptor::kContext); in SingleArgumentConstructorCommon()
2250 Node* function = assembler->Parameter(Descriptor::kFunction); in SingleArgumentConstructorCommon()
2251 Node* array_size = assembler->Parameter(Descriptor::kArraySizeSmiParameter); in SingleArgumentConstructorCommon()
2252 Node* allocation_site = assembler->Parameter(Descriptor::kAllocationSite); in SingleArgumentConstructorCommon()
2253 assembler->TailCallRuntime(Runtime::kNewArray, context, function, in SingleArgumentConstructorCommon()
2262 CodeStubAssembler assembler(state); in GenerateAssembly() local
2263 Node* function = assembler.Parameter(Descriptor::kFunction); in GenerateAssembly()
2265 assembler.LoadObjectField(function, JSFunction::kContextOffset); in GenerateAssembly()
2267 assembler.LoadJSArrayElementsMap(elements_kind(), native_context); in GenerateAssembly()
2271 Node* allocation_site = assembler.Parameter(Descriptor::kAllocationSite); in GenerateAssembly()
2272 SingleArgumentConstructorCommon<Descriptor>(&assembler, elements_kind(), in GenerateAssembly()
2279 CodeStubAssembler assembler(state); in GenerateAssembly() local
2280 Node* function = assembler.Parameter(Descriptor::kFunction); in GenerateAssembly()
2281 Node* array_map = assembler.LoadObjectField( in GenerateAssembly()
2284 &assembler, elements_kind(), array_map, assembler.UndefinedConstant(), in GenerateAssembly()
2291 CodeStubAssembler assembler(state); in GenerateAssembly() local
2292 CodeStubAssembler::Label runtime(&assembler, in GenerateAssembly()
2295 Node* object = assembler.Parameter(Descriptor::kObject); in GenerateAssembly()
2296 Node* key = assembler.Parameter(Descriptor::kKey); in GenerateAssembly()
2297 Node* context = assembler.Parameter(Descriptor::kContext); in GenerateAssembly()
2300 Node* elements = assembler.LoadElements(object); in GenerateAssembly()
2302 assembler.TryGrowElementsCapacity(object, elements, kind, key, &runtime); in GenerateAssembly()
2303 assembler.Return(new_elements); in GenerateAssembly()
2305 assembler.Bind(&runtime); in GenerateAssembly()
2315 assembler.Return( in GenerateAssembly()
2316 assembler.CallRuntime(Runtime::kGrowArrayElements, context, object, key)); in GenerateAssembly()