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

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

Issue 1676883002: [runtime] Optimize and unify rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/compiler/code-stub-assembler.h" 10 #include "src/compiler/code-stub-assembler.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 STORE_AND_GROW_NO_TRANSITION).GetCode(); 815 STORE_AND_GROW_NO_TRANSITION).GetCode();
816 for (int i = FIRST_FAST_ELEMENTS_KIND; i <= LAST_FAST_ELEMENTS_KIND; i++) { 816 for (int i = FIRST_FAST_ELEMENTS_KIND; i <= LAST_FAST_ELEMENTS_KIND; i++) {
817 ElementsKind kind = static_cast<ElementsKind>(i); 817 ElementsKind kind = static_cast<ElementsKind>(i);
818 StoreFastElementStub(isolate, true, kind, STANDARD_STORE).GetCode(); 818 StoreFastElementStub(isolate, true, kind, STANDARD_STORE).GetCode();
819 StoreFastElementStub(isolate, true, kind, STORE_AND_GROW_NO_TRANSITION) 819 StoreFastElementStub(isolate, true, kind, STORE_AND_GROW_NO_TRANSITION)
820 .GetCode(); 820 .GetCode();
821 } 821 }
822 } 822 }
823 823
824 824
825 void RestParamAccessStub::Generate(MacroAssembler* masm) { GenerateNew(masm); }
826
827
828 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { 825 void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
829 switch (type()) { 826 switch (type()) {
830 case READ_ELEMENT: 827 case READ_ELEMENT:
831 GenerateReadElement(masm); 828 GenerateReadElement(masm);
832 break; 829 break;
833 case NEW_SLOPPY_FAST: 830 case NEW_SLOPPY_FAST:
834 GenerateNewSloppyFast(masm); 831 GenerateNewSloppyFast(masm);
835 break; 832 break;
836 case NEW_SLOPPY_SLOW: 833 case NEW_SLOPPY_SLOW:
837 GenerateNewSloppySlow(masm); 834 GenerateNewSloppySlow(masm);
(...skipping 18 matching lines...) Expand all
856 os << "NewSloppySlow"; 853 os << "NewSloppySlow";
857 break; 854 break;
858 case NEW_STRICT: 855 case NEW_STRICT:
859 os << "NewStrict"; 856 os << "NewStrict";
860 break; 857 break;
861 } 858 }
862 return; 859 return;
863 } 860 }
864 861
865 862
866 void RestParamAccessStub::PrintName(std::ostream& os) const { // NOLINT
867 os << "RestParamAccessStub_";
868 }
869
870
871 void ArrayConstructorStub::PrintName(std::ostream& os) const { // NOLINT 863 void ArrayConstructorStub::PrintName(std::ostream& os) const { // NOLINT
872 os << "ArrayConstructorStub"; 864 os << "ArrayConstructorStub";
873 switch (argument_count()) { 865 switch (argument_count()) {
874 case ANY: 866 case ANY:
875 os << "_Any"; 867 os << "_Any";
876 break; 868 break;
877 case NONE: 869 case NONE:
878 os << "_None"; 870 os << "_None";
879 break; 871 break;
880 case ONE: 872 case ONE:
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 if (type->Is(Type::UntaggedPointer())) { 1028 if (type->Is(Type::UntaggedPointer())) {
1037 return Representation::External(); 1029 return Representation::External();
1038 } 1030 }
1039 1031
1040 DCHECK(!type->Is(Type::Untagged())); 1032 DCHECK(!type->Is(Type::Untagged()));
1041 return Representation::Tagged(); 1033 return Representation::Tagged();
1042 } 1034 }
1043 1035
1044 } // namespace internal 1036 } // namespace internal
1045 } // namespace v8 1037 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698