| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 181 |
| 182 HValue* return_value = BuildCodeStub(); | 182 HValue* return_value = BuildCodeStub(); |
| 183 | 183 |
| 184 // We might have extra expressions to pop from the stack in addition to the | 184 // We might have extra expressions to pop from the stack in addition to the |
| 185 // arguments above. | 185 // arguments above. |
| 186 HInstruction* stack_pop_count = stack_parameter_count; | 186 HInstruction* stack_pop_count = stack_parameter_count; |
| 187 if (descriptor_->function_mode_ == JS_FUNCTION_STUB_MODE) { | 187 if (descriptor_->function_mode_ == JS_FUNCTION_STUB_MODE) { |
| 188 if (!stack_parameter_count->IsConstant() && | 188 if (!stack_parameter_count->IsConstant() && |
| 189 descriptor_->hint_stack_parameter_count_ < 0) { | 189 descriptor_->hint_stack_parameter_count_ < 0) { |
| 190 HInstruction* constant_one = graph()->GetConstant1(); | 190 HInstruction* constant_one = graph()->GetConstant1(); |
| 191 stack_pop_count = Add<HAdd>(stack_parameter_count, constant_one); | 191 stack_pop_count = AddUncasted<HAdd>(stack_parameter_count, constant_one); |
| 192 stack_pop_count->ClearFlag(HValue::kCanOverflow); | 192 stack_pop_count->ClearFlag(HValue::kCanOverflow); |
| 193 // TODO(mvstanton): verify that stack_parameter_count+1 really fits in a | 193 // TODO(mvstanton): verify that stack_parameter_count+1 really fits in a |
| 194 // smi. | 194 // smi. |
| 195 } else { | 195 } else { |
| 196 int count = descriptor_->hint_stack_parameter_count_; | 196 int count = descriptor_->hint_stack_parameter_count_; |
| 197 stack_pop_count = Add<HConstant>(count); | 197 stack_pop_count = Add<HConstant>(count); |
| 198 } | 198 } |
| 199 } | 199 } |
| 200 | 200 |
| 201 if (current_block() != NULL) { | 201 if (current_block() != NULL) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 Handle<Code> HydrogenCodeStub::GenerateLightweightMissCode(Isolate* isolate) { | 244 Handle<Code> HydrogenCodeStub::GenerateLightweightMissCode(Isolate* isolate) { |
| 245 Factory* factory = isolate->factory(); | 245 Factory* factory = isolate->factory(); |
| 246 | 246 |
| 247 // Generate the new code. | 247 // Generate the new code. |
| 248 MacroAssembler masm(isolate, NULL, 256); | 248 MacroAssembler masm(isolate, NULL, 256); |
| 249 | 249 |
| 250 { | 250 { |
| 251 // Update the static counter each time a new code stub is generated. | 251 // Update the static counter each time a new code stub is generated. |
| 252 isolate->counters()->code_stubs()->Increment(); | 252 isolate->counters()->code_stubs()->Increment(); |
| 253 | 253 |
| 254 // Nested stubs are not allowed for leaves. | |
| 255 AllowStubCallsScope allow_scope(&masm, false); | |
| 256 | |
| 257 // Generate the code for the stub. | 254 // Generate the code for the stub. |
| 258 masm.set_generating_stub(true); | 255 masm.set_generating_stub(true); |
| 259 NoCurrentFrameScope scope(&masm); | 256 NoCurrentFrameScope scope(&masm); |
| 260 GenerateLightweightMiss(&masm); | 257 GenerateLightweightMiss(&masm); |
| 261 } | 258 } |
| 262 | 259 |
| 263 // Create the code object. | 260 // Create the code object. |
| 264 CodeDesc desc; | 261 CodeDesc desc; |
| 265 masm.GetCode(&desc); | 262 masm.GetCode(&desc); |
| 266 | 263 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 296 } | 293 } |
| 297 ElapsedTimer timer; | 294 ElapsedTimer timer; |
| 298 if (FLAG_profile_hydrogen_code_stub_compilation) { | 295 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 299 timer.Start(); | 296 timer.Start(); |
| 300 } | 297 } |
| 301 CodeStubGraphBuilder<Stub> builder(isolate, stub); | 298 CodeStubGraphBuilder<Stub> builder(isolate, stub); |
| 302 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 299 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 303 Handle<Code> code = chunk->Codegen(); | 300 Handle<Code> code = chunk->Codegen(); |
| 304 if (FLAG_profile_hydrogen_code_stub_compilation) { | 301 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 305 double ms = timer.Elapsed().InMillisecondsF(); | 302 double ms = timer.Elapsed().InMillisecondsF(); |
| 306 PrintF("[Lazy compilation of %s took %0.3f ms]\n", *stub->GetName(), ms); | 303 PrintF("[Lazy compilation of %s took %0.3f ms]\n", |
| 304 stub->GetName().get(), ms); |
| 307 } | 305 } |
| 308 return code; | 306 return code; |
| 309 } | 307 } |
| 310 | 308 |
| 311 | 309 |
| 312 template <> | 310 template <> |
| 313 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() { | 311 HValue* CodeStubGraphBuilder<ToNumberStub>::BuildCodeStub() { |
| 314 HValue* value = GetParameter(0); | 312 HValue* value = GetParameter(0); |
| 315 | 313 |
| 316 // Check if the parameter is already a SMI or heap number. | 314 // Check if the parameter is already a SMI or heap number. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 isolate()->heap()->GetPretenureMode(), JS_OBJECT_TYPE); | 463 isolate()->heap()->GetPretenureMode(), JS_OBJECT_TYPE); |
| 466 | 464 |
| 467 for (int i = 0; i < object_size; i += kPointerSize) { | 465 for (int i = 0; i < object_size; i += kPointerSize) { |
| 468 HObjectAccess access = HObjectAccess::ForJSObjectOffset(i); | 466 HObjectAccess access = HObjectAccess::ForJSObjectOffset(i); |
| 469 Add<HStoreNamedField>(object, access, | 467 Add<HStoreNamedField>(object, access, |
| 470 Add<HLoadNamedField>(boilerplate, access)); | 468 Add<HLoadNamedField>(boilerplate, access)); |
| 471 } | 469 } |
| 472 | 470 |
| 473 ASSERT(FLAG_allocation_site_pretenuring || (size == object_size)); | 471 ASSERT(FLAG_allocation_site_pretenuring || (size == object_size)); |
| 474 if (FLAG_allocation_site_pretenuring) { | 472 if (FLAG_allocation_site_pretenuring) { |
| 475 BuildCreateAllocationMemento(object, object_size, allocation_site); | 473 BuildCreateAllocationMemento( |
| 474 object, Add<HConstant>(object_size), allocation_site); |
| 476 } | 475 } |
| 477 | 476 |
| 478 environment()->Push(object); | 477 environment()->Push(object); |
| 479 checker.ElseDeopt("Uninitialized boilerplate in fast clone"); | 478 checker.ElseDeopt("Uninitialized boilerplate in fast clone"); |
| 480 checker.End(); | 479 checker.End(); |
| 481 | 480 |
| 482 return environment()->Pop(); | 481 return environment()->Pop(); |
| 483 } | 482 } |
| 484 | 483 |
| 485 | 484 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 return DoGenerateCode(isolate, this); | 608 return DoGenerateCode(isolate, this); |
| 610 } | 609 } |
| 611 | 610 |
| 612 | 611 |
| 613 template<> | 612 template<> |
| 614 HValue* CodeStubGraphBuilder<KeyedArrayCallStub>::BuildCodeStub() { | 613 HValue* CodeStubGraphBuilder<KeyedArrayCallStub>::BuildCodeStub() { |
| 615 int argc = casted_stub()->argc() + 1; | 614 int argc = casted_stub()->argc() + 1; |
| 616 info()->set_parameter_count(argc); | 615 info()->set_parameter_count(argc); |
| 617 | 616 |
| 618 HValue* receiver = Add<HParameter>(1); | 617 HValue* receiver = Add<HParameter>(1); |
| 618 BuildCheckHeapObject(receiver); |
| 619 | 619 |
| 620 // Load the expected initial array map from the context. | 620 // Load the expected initial array map from the context. |
| 621 JSArrayBuilder array_builder(this, casted_stub()->elements_kind()); | 621 JSArrayBuilder array_builder(this, casted_stub()->elements_kind()); |
| 622 HValue* map = array_builder.EmitMapCode(); | 622 HValue* map = array_builder.EmitMapCode(); |
| 623 | 623 |
| 624 HValue* checked_receiver = Add<HCheckMapValue>(receiver, map); | 624 HValue* checked_receiver = Add<HCheckMapValue>(receiver, map); |
| 625 | 625 |
| 626 HValue* function = BuildUncheckedMonomorphicElementAccess( | 626 HValue* function = BuildUncheckedMonomorphicElementAccess( |
| 627 checked_receiver, GetParameter(0), | 627 checked_receiver, GetParameter(0), |
| 628 NULL, true, casted_stub()->elements_kind(), | 628 NULL, true, casted_stub()->elements_kind(), |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 HInstruction* elements = Add<HArgumentsElements>(false); | 735 HInstruction* elements = Add<HArgumentsElements>(false); |
| 736 HInstruction* argument = Add<HAccessArgumentsAt>( | 736 HInstruction* argument = Add<HAccessArgumentsAt>( |
| 737 elements, constant_one, constant_zero); | 737 elements, constant_one, constant_zero); |
| 738 | 738 |
| 739 return BuildAllocateArrayFromLength(array_builder, argument); | 739 return BuildAllocateArrayFromLength(array_builder, argument); |
| 740 } | 740 } |
| 741 | 741 |
| 742 | 742 |
| 743 HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor( | 743 HValue* CodeStubGraphBuilderBase::BuildArrayNArgumentsConstructor( |
| 744 JSArrayBuilder* array_builder, ElementsKind kind) { | 744 JSArrayBuilder* array_builder, ElementsKind kind) { |
| 745 // Insert a bounds check because the number of arguments might exceed |
| 746 // the kInitialMaxFastElementArray limit. This cannot happen for code |
| 747 // that was parsed, but calling via Array.apply(thisArg, [...]) might |
| 748 // trigger it. |
| 749 HValue* length = GetArgumentsLength(); |
| 750 HConstant* max_alloc_length = |
| 751 Add<HConstant>(JSObject::kInitialMaxFastElementArray); |
| 752 HValue* checked_length = Add<HBoundsCheck>(length, max_alloc_length); |
| 753 |
| 745 // We need to fill with the hole if it's a smi array in the multi-argument | 754 // We need to fill with the hole if it's a smi array in the multi-argument |
| 746 // case because we might have to bail out while copying arguments into | 755 // case because we might have to bail out while copying arguments into |
| 747 // the array because they aren't compatible with a smi array. | 756 // the array because they aren't compatible with a smi array. |
| 748 // If it's a double array, no problem, and if it's fast then no | 757 // If it's a double array, no problem, and if it's fast then no |
| 749 // problem either because doubles are boxed. | 758 // problem either because doubles are boxed. |
| 750 // | 759 // |
| 751 // TODO(mvstanton): consider an instruction to memset fill the array | 760 // TODO(mvstanton): consider an instruction to memset fill the array |
| 752 // with zero in this case instead. | 761 // with zero in this case instead. |
| 753 HValue* length = GetArgumentsLength(); | |
| 754 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind) | 762 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind) |
| 755 ? JSArrayBuilder::FILL_WITH_HOLE | 763 ? JSArrayBuilder::FILL_WITH_HOLE |
| 756 : JSArrayBuilder::DONT_FILL_WITH_HOLE; | 764 : JSArrayBuilder::DONT_FILL_WITH_HOLE; |
| 757 HValue* new_object = array_builder->AllocateArray(length, | 765 HValue* new_object = array_builder->AllocateArray(checked_length, |
| 758 length, | 766 checked_length, |
| 759 fill_mode); | 767 fill_mode); |
| 760 HValue* elements = array_builder->GetElementsLocation(); | 768 HValue* elements = array_builder->GetElementsLocation(); |
| 761 ASSERT(elements != NULL); | 769 ASSERT(elements != NULL); |
| 762 | 770 |
| 763 // Now populate the elements correctly. | 771 // Now populate the elements correctly. |
| 764 LoopBuilder builder(this, | 772 LoopBuilder builder(this, |
| 765 context(), | 773 context(), |
| 766 LoopBuilder::kPostIncrement); | 774 LoopBuilder::kPostIncrement); |
| 767 HValue* start = graph()->GetConstant0(); | 775 HValue* start = graph()->GetConstant0(); |
| 768 HValue* key = builder.BeginBody(start, length, Token::LT); | 776 HValue* key = builder.BeginBody(start, checked_length, Token::LT); |
| 769 HInstruction* argument_elements = Add<HArgumentsElements>(false); | 777 HInstruction* argument_elements = Add<HArgumentsElements>(false); |
| 770 HInstruction* argument = Add<HAccessArgumentsAt>( | 778 HInstruction* argument = Add<HAccessArgumentsAt>( |
| 771 argument_elements, length, key); | 779 argument_elements, checked_length, key); |
| 772 | 780 |
| 773 Add<HStoreKeyed>(elements, key, argument, kind); | 781 Add<HStoreKeyed>(elements, key, argument, kind); |
| 774 builder.EndBody(); | 782 builder.EndBody(); |
| 775 return new_object; | 783 return new_object; |
| 776 } | 784 } |
| 777 | 785 |
| 778 | 786 |
| 779 template <> | 787 template <> |
| 780 HValue* CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { | 788 HValue* CodeStubGraphBuilder<ArrayNoArgumentConstructorStub>::BuildCodeStub() { |
| 781 ElementsKind kind = casted_stub()->elements_kind(); | 789 ElementsKind kind = casted_stub()->elements_kind(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 : graph()->GetConstantUndefined(); | 890 : graph()->GetConstantUndefined(); |
| 883 } | 891 } |
| 884 | 892 |
| 885 | 893 |
| 886 Handle<Code> CompareNilICStub::GenerateCode(Isolate* isolate) { | 894 Handle<Code> CompareNilICStub::GenerateCode(Isolate* isolate) { |
| 887 return DoGenerateCode(isolate, this); | 895 return DoGenerateCode(isolate, this); |
| 888 } | 896 } |
| 889 | 897 |
| 890 | 898 |
| 891 template <> | 899 template <> |
| 892 HValue* CodeStubGraphBuilder<BinaryOpStub>::BuildCodeInitializedStub() { | 900 HValue* CodeStubGraphBuilder<BinaryOpICStub>::BuildCodeInitializedStub() { |
| 893 BinaryOpStub* stub = casted_stub(); | 901 BinaryOpIC::State state = casted_stub()->state(); |
| 894 HValue* left = GetParameter(0); | |
| 895 HValue* right = GetParameter(1); | |
| 896 | 902 |
| 897 Handle<Type> left_type = stub->GetLeftType(isolate()); | 903 HValue* left = GetParameter(BinaryOpICStub::kLeft); |
| 898 Handle<Type> right_type = stub->GetRightType(isolate()); | 904 HValue* right = GetParameter(BinaryOpICStub::kRight); |
| 899 Handle<Type> result_type = stub->GetResultType(isolate()); | 905 |
| 906 Handle<Type> left_type = state.GetLeftType(isolate()); |
| 907 Handle<Type> right_type = state.GetRightType(isolate()); |
| 908 Handle<Type> result_type = state.GetResultType(isolate()); |
| 900 | 909 |
| 901 ASSERT(!left_type->Is(Type::None()) && !right_type->Is(Type::None()) && | 910 ASSERT(!left_type->Is(Type::None()) && !right_type->Is(Type::None()) && |
| 902 (stub->HasSideEffects(isolate()) || !result_type->Is(Type::None()))); | 911 (state.HasSideEffects() || !result_type->Is(Type::None()))); |
| 903 | 912 |
| 904 HValue* result = NULL; | 913 HValue* result = NULL; |
| 905 if (stub->operation() == Token::ADD && | 914 if (state.op() == Token::ADD && |
| 906 (left_type->Maybe(Type::String()) || right_type->Maybe(Type::String())) && | 915 (left_type->Maybe(Type::String()) || right_type->Maybe(Type::String())) && |
| 907 !left_type->Is(Type::String()) && !right_type->Is(Type::String())) { | 916 !left_type->Is(Type::String()) && !right_type->Is(Type::String())) { |
| 908 // For the generic add stub a fast case for string addition is performance | 917 // For the generic add stub a fast case for string addition is performance |
| 909 // critical. | 918 // critical. |
| 910 if (left_type->Maybe(Type::String())) { | 919 if (left_type->Maybe(Type::String())) { |
| 911 IfBuilder if_leftisstring(this); | 920 IfBuilder if_leftisstring(this); |
| 912 if_leftisstring.If<HIsStringAndBranch>(left); | 921 if_leftisstring.If<HIsStringAndBranch>(left); |
| 913 if_leftisstring.Then(); | 922 if_leftisstring.Then(); |
| 914 { | 923 { |
| 915 Push(BuildBinaryOperation( | 924 Push(BuildBinaryOperation( |
| 916 stub->operation(), left, right, | 925 state.op(), left, right, |
| 917 handle(Type::String(), isolate()), right_type, | 926 handle(Type::String(), isolate()), right_type, |
| 918 result_type, stub->fixed_right_arg())); | 927 result_type, state.fixed_right_arg())); |
| 919 } | 928 } |
| 920 if_leftisstring.Else(); | 929 if_leftisstring.Else(); |
| 921 { | 930 { |
| 922 Push(BuildBinaryOperation( | 931 Push(BuildBinaryOperation( |
| 923 stub->operation(), left, right, | 932 state.op(), left, right, |
| 924 left_type, right_type, result_type, | 933 left_type, right_type, result_type, |
| 925 stub->fixed_right_arg())); | 934 state.fixed_right_arg())); |
| 926 } | 935 } |
| 927 if_leftisstring.End(); | 936 if_leftisstring.End(); |
| 928 result = Pop(); | 937 result = Pop(); |
| 929 } else { | 938 } else { |
| 930 IfBuilder if_rightisstring(this); | 939 IfBuilder if_rightisstring(this); |
| 931 if_rightisstring.If<HIsStringAndBranch>(right); | 940 if_rightisstring.If<HIsStringAndBranch>(right); |
| 932 if_rightisstring.Then(); | 941 if_rightisstring.Then(); |
| 933 { | 942 { |
| 934 Push(BuildBinaryOperation( | 943 Push(BuildBinaryOperation( |
| 935 stub->operation(), left, right, | 944 state.op(), left, right, |
| 936 left_type, handle(Type::String(), isolate()), | 945 left_type, handle(Type::String(), isolate()), |
| 937 result_type, stub->fixed_right_arg())); | 946 result_type, state.fixed_right_arg())); |
| 938 } | 947 } |
| 939 if_rightisstring.Else(); | 948 if_rightisstring.Else(); |
| 940 { | 949 { |
| 941 Push(BuildBinaryOperation( | 950 Push(BuildBinaryOperation( |
| 942 stub->operation(), left, right, | 951 state.op(), left, right, |
| 943 left_type, right_type, result_type, | 952 left_type, right_type, result_type, |
| 944 stub->fixed_right_arg())); | 953 state.fixed_right_arg())); |
| 945 } | 954 } |
| 946 if_rightisstring.End(); | 955 if_rightisstring.End(); |
| 947 result = Pop(); | 956 result = Pop(); |
| 948 } | 957 } |
| 949 } else { | 958 } else { |
| 950 result = BuildBinaryOperation( | 959 result = BuildBinaryOperation( |
| 951 stub->operation(), left, right, | 960 state.op(), left, right, |
| 952 left_type, right_type, result_type, | 961 left_type, right_type, result_type, |
| 953 stub->fixed_right_arg()); | 962 state.fixed_right_arg()); |
| 954 } | 963 } |
| 955 | 964 |
| 956 // If we encounter a generic argument, the number conversion is | 965 // If we encounter a generic argument, the number conversion is |
| 957 // observable, thus we cannot afford to bail out after the fact. | 966 // observable, thus we cannot afford to bail out after the fact. |
| 958 if (!stub->HasSideEffects(isolate())) { | 967 if (!state.HasSideEffects()) { |
| 959 if (result_type->Is(Type::Smi())) { | 968 if (result_type->Is(Type::Smi())) { |
| 960 if (stub->operation() == Token::SHR) { | 969 if (state.op() == Token::SHR) { |
| 961 // TODO(olivf) Replace this by a SmiTagU Instruction. | 970 // TODO(olivf) Replace this by a SmiTagU Instruction. |
| 962 // 0x40000000: this number would convert to negative when interpreting | 971 // 0x40000000: this number would convert to negative when interpreting |
| 963 // the register as signed value; | 972 // the register as signed value; |
| 964 IfBuilder if_of(this); | 973 IfBuilder if_of(this); |
| 965 if_of.IfNot<HCompareNumericAndBranch>(result, | 974 if_of.IfNot<HCompareNumericAndBranch>(result, |
| 966 Add<HConstant>(static_cast<int>(SmiValuesAre32Bits() | 975 Add<HConstant>(static_cast<int>(SmiValuesAre32Bits() |
| 967 ? 0x80000000 : 0x40000000)), Token::EQ_STRICT); | 976 ? 0x80000000 : 0x40000000)), Token::EQ_STRICT); |
| 968 if_of.Then(); | 977 if_of.Then(); |
| 969 if_of.ElseDeopt("UInt->Smi oveflow"); | 978 if_of.ElseDeopt("UInt->Smi oveflow"); |
| 970 if_of.End(); | 979 if_of.End(); |
| 971 } | 980 } |
| 972 } | 981 } |
| 973 result = EnforceNumberType(result, result_type); | 982 result = EnforceNumberType(result, result_type); |
| 974 } | 983 } |
| 975 | 984 |
| 976 // Reuse the double box of one of the operands if we are allowed to (i.e. | 985 // Reuse the double box of one of the operands if we are allowed to (i.e. |
| 977 // chained binops). | 986 // chained binops). |
| 978 if (stub->CanReuseDoubleBox()) { | 987 if (state.CanReuseDoubleBox()) { |
| 979 HValue* operand = (stub->mode() == OVERWRITE_LEFT) ? left : right; | 988 HValue* operand = (state.mode() == OVERWRITE_LEFT) ? left : right; |
| 980 IfBuilder if_heap_number(this); | 989 IfBuilder if_heap_number(this); |
| 981 if_heap_number.IfNot<HIsSmiAndBranch>(operand); | 990 if_heap_number.IfNot<HIsSmiAndBranch>(operand); |
| 982 if_heap_number.Then(); | 991 if_heap_number.Then(); |
| 983 Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result); | 992 Add<HStoreNamedField>(operand, HObjectAccess::ForHeapNumberValue(), result); |
| 984 Push(operand); | 993 Push(operand); |
| 985 if_heap_number.Else(); | 994 if_heap_number.Else(); |
| 986 Push(result); | 995 Push(result); |
| 987 if_heap_number.End(); | 996 if_heap_number.End(); |
| 988 result = Pop(); | 997 result = Pop(); |
| 989 } | 998 } |
| 990 | 999 |
| 991 return result; | 1000 return result; |
| 992 } | 1001 } |
| 993 | 1002 |
| 994 | 1003 |
| 995 Handle<Code> BinaryOpStub::GenerateCode(Isolate* isolate) { | 1004 Handle<Code> BinaryOpICStub::GenerateCode(Isolate* isolate) { |
| 996 return DoGenerateCode(isolate, this); | 1005 return DoGenerateCode(isolate, this); |
| 997 } | 1006 } |
| 998 | 1007 |
| 999 | 1008 |
| 1000 template <> | 1009 template <> |
| 1001 HValue* CodeStubGraphBuilder<NewStringAddStub>::BuildCodeInitializedStub() { | 1010 HValue* CodeStubGraphBuilder<NewStringAddStub>::BuildCodeInitializedStub() { |
| 1002 NewStringAddStub* stub = casted_stub(); | 1011 NewStringAddStub* stub = casted_stub(); |
| 1003 StringAddFlags flags = stub->flags(); | 1012 StringAddFlags flags = stub->flags(); |
| 1004 PretenureFlag pretenure_flag = stub->pretenure_flag(); | 1013 PretenureFlag pretenure_flag = stub->pretenure_flag(); |
| 1005 | 1014 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 return BuildUncheckedDictionaryElementLoad(receiver, key); | 1332 return BuildUncheckedDictionaryElementLoad(receiver, key); |
| 1324 } | 1333 } |
| 1325 | 1334 |
| 1326 | 1335 |
| 1327 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { | 1336 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { |
| 1328 return DoGenerateCode(isolate, this); | 1337 return DoGenerateCode(isolate, this); |
| 1329 } | 1338 } |
| 1330 | 1339 |
| 1331 | 1340 |
| 1332 } } // namespace v8::internal | 1341 } } // namespace v8::internal |
| OLD | NEW |