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

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

Issue 2405203002: [stubs] Simplify the ArrayConstructorStub. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.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 // 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 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 1084
1085 enum AllocationSiteOverrideMode { 1085 enum AllocationSiteOverrideMode {
1086 DONT_OVERRIDE, 1086 DONT_OVERRIDE,
1087 DISABLE_ALLOCATION_SITES, 1087 DISABLE_ALLOCATION_SITES,
1088 LAST_ALLOCATION_SITE_OVERRIDE_MODE = DISABLE_ALLOCATION_SITES 1088 LAST_ALLOCATION_SITE_OVERRIDE_MODE = DISABLE_ALLOCATION_SITES
1089 }; 1089 };
1090 1090
1091 1091
1092 class ArrayConstructorStub: public PlatformCodeStub { 1092 class ArrayConstructorStub: public PlatformCodeStub {
1093 public: 1093 public:
1094 enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE };
1095
1096 ArrayConstructorStub(Isolate* isolate, int argument_count);
1097
1098 explicit ArrayConstructorStub(Isolate* isolate); 1094 explicit ArrayConstructorStub(Isolate* isolate);
1099 1095
1100 private: 1096 private:
1101 ArgumentCountKey argument_count() const {
1102 return ArgumentCountBits::decode(minor_key_);
1103 }
1104
1105 void GenerateDispatchToArrayStub(MacroAssembler* masm, 1097 void GenerateDispatchToArrayStub(MacroAssembler* masm,
1106 AllocationSiteOverrideMode mode); 1098 AllocationSiteOverrideMode mode);
1107 1099
1108 void PrintName(std::ostream& os) const override; // NOLINT
1109
1110 class ArgumentCountBits : public BitField<ArgumentCountKey, 0, 2> {};
1111
1112 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArrayNArgumentsConstructor); 1100 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArrayNArgumentsConstructor);
1113 DEFINE_PLATFORM_CODE_STUB(ArrayConstructor, PlatformCodeStub); 1101 DEFINE_PLATFORM_CODE_STUB(ArrayConstructor, PlatformCodeStub);
1114 }; 1102 };
1115 1103
1116 1104
1117 class InternalArrayConstructorStub: public PlatformCodeStub { 1105 class InternalArrayConstructorStub: public PlatformCodeStub {
1118 public: 1106 public:
1119 explicit InternalArrayConstructorStub(Isolate* isolate); 1107 explicit InternalArrayConstructorStub(Isolate* isolate);
1120 1108
1121 private: 1109 private:
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 #undef DEFINE_HYDROGEN_CODE_STUB 2880 #undef DEFINE_HYDROGEN_CODE_STUB
2893 #undef DEFINE_CODE_STUB 2881 #undef DEFINE_CODE_STUB
2894 #undef DEFINE_CODE_STUB_BASE 2882 #undef DEFINE_CODE_STUB_BASE
2895 2883
2896 extern Representation RepresentationFromMachineType(MachineType type); 2884 extern Representation RepresentationFromMachineType(MachineType type);
2897 2885
2898 } // namespace internal 2886 } // namespace internal
2899 } // namespace v8 2887 } // namespace v8
2900 2888
2901 #endif // V8_CODE_STUBS_H_ 2889 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698