Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/code-stubs.cc

Issue 19214002: Revert 15635: Turn ElementsTransitionAndStore stub into a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 ElementsTransitionAndStoreStub::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
821 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { 859 void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
822 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE); 860 StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
823 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE); 861 StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
824 stub1.GetCode(isolate)->set_is_pregenerated(true); 862 stub1.GetCode(isolate)->set_is_pregenerated(true);
825 stub2.GetCode(isolate)->set_is_pregenerated(true); 863 stub2.GetCode(isolate)->set_is_pregenerated(true);
826 } 864 }
827 865
828 866
829 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, 867 void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function,
830 intptr_t stack_pointer) { 868 intptr_t stack_pointer) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 InstallDescriptor(isolate, &stub3); 922 InstallDescriptor(isolate, &stub3);
885 } 923 }
886 924
887 InternalArrayConstructorStub::InternalArrayConstructorStub( 925 InternalArrayConstructorStub::InternalArrayConstructorStub(
888 Isolate* isolate) { 926 Isolate* isolate) {
889 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 927 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
890 } 928 }
891 929
892 930
893 } } // namespace v8::internal 931 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698