| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 || Contains(ToBooleanStub::HEAP_NUMBER); | 811 || Contains(ToBooleanStub::HEAP_NUMBER); |
| 812 } | 812 } |
| 813 | 813 |
| 814 | 814 |
| 815 bool ToBooleanStub::Types::CanBeUndetectable() const { | 815 bool ToBooleanStub::Types::CanBeUndetectable() const { |
| 816 return Contains(ToBooleanStub::SPEC_OBJECT) | 816 return Contains(ToBooleanStub::SPEC_OBJECT) |
| 817 || Contains(ToBooleanStub::STRING); | 817 || Contains(ToBooleanStub::STRING); |
| 818 } | 818 } |
| 819 | 819 |
| 820 | 820 |
| 821 void ElementsTransitionAndStorePlatformStub::Generate(MacroAssembler* masm) { | |
| 822 Label fail; | |
| 823 AllocationSiteMode mode = AllocationSite::GetMode(from_, to_); | |
| 824 ASSERT(!IsFastHoleyElementsKind(from_) || IsFastHoleyElementsKind(to_)); | |
| 825 if (!FLAG_trace_elements_transitions) { | |
| 826 if (IsFastSmiOrObjectElementsKind(to_)) { | |
| 827 if (IsFastSmiOrObjectElementsKind(from_)) { | |
| 828 ElementsTransitionGenerator:: | |
| 829 GenerateMapChangeElementsTransition(masm, mode, &fail); | |
| 830 } else if (IsFastDoubleElementsKind(from_)) { | |
| 831 ASSERT(!IsFastSmiElementsKind(to_)); | |
| 832 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); | |
| 833 } else { | |
| 834 UNREACHABLE(); | |
| 835 } | |
| 836 KeyedStoreStubCompiler::GenerateStoreFastElement(masm, | |
| 837 is_jsarray_, | |
| 838 to_, | |
| 839 store_mode_); | |
| 840 } else if (IsFastSmiElementsKind(from_) && | |
| 841 IsFastDoubleElementsKind(to_)) { | |
| 842 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); | |
| 843 KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(masm, | |
| 844 is_jsarray_, | |
| 845 store_mode_); | |
| 846 } else if (IsFastDoubleElementsKind(from_)) { | |
| 847 ASSERT(to_ == FAST_HOLEY_DOUBLE_ELEMENTS); | |
| 848 ElementsTransitionGenerator:: | |
| 849 GenerateMapChangeElementsTransition(masm, mode, &fail); | |
| 850 } else { | |
| 851 UNREACHABLE(); | |
| 852 } | |
| 853 } | |
| 854 masm->bind(&fail); | |
| 855 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode_); | |
| 856 } | |
| 857 | |
| 858 | |
| 859 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { | 821 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { |
| 860 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE); | 822 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE); |
| 861 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE); | 823 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE); |
| 862 stub1.GetCode(isolate)->set_is_pregenerated(true); | 824 stub1.GetCode(isolate)->set_is_pregenerated(true); |
| 863 stub2.GetCode(isolate)->set_is_pregenerated(true); | 825 stub2.GetCode(isolate)->set_is_pregenerated(true); |
| 864 } | 826 } |
| 865 | 827 |
| 866 | 828 |
| 867 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, | 829 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, |
| 868 intptr_t stack_pointer) { | 830 intptr_t stack_pointer) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 InstallDescriptor(isolate, &stub3); | 884 InstallDescriptor(isolate, &stub3); |
| 923 } | 885 } |
| 924 | 886 |
| 925 InternalArrayConstructorStub::InternalArrayConstructorStub( | 887 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 926 Isolate* isolate) { | 888 Isolate* isolate) { |
| 927 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 889 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 928 } | 890 } |
| 929 | 891 |
| 930 | 892 |
| 931 } } // namespace v8::internal | 893 } } // namespace v8::internal |
| OLD | NEW |