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

Side by Side Diff: src/arm/lithium-arm.h

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 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
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_ARM_LITHIUM_ARM_H_ 5 #ifndef V8_ARM_LITHIUM_ARM_H_
6 #define V8_ARM_LITHIUM_ARM_H_ 6 #define V8_ARM_LITHIUM_ARM_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 1840
1841 int arity() const { return hydrogen()->argument_count() - 1; } 1841 int arity() const { return hydrogen()->argument_count() - 1; }
1842 }; 1842 };
1843 1843
1844 1844
1845 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { 1845 class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
1846 public: 1846 public:
1847 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1847 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1848 const ZoneList<LOperand*>& operands, Zone* zone) 1848 const ZoneList<LOperand*>& operands, Zone* zone)
1849 : descriptor_(descriptor), 1849 : descriptor_(descriptor),
1850 inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1850 inputs_(descriptor.GetRegisterParameterCount() +
1851 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1851 kImplicitRegisterParameterCount,
1852 zone) {
1853 DCHECK(descriptor.GetRegisterParameterCount() +
1854 kImplicitRegisterParameterCount ==
1855 operands.length());
1852 inputs_.AddAll(operands, zone); 1856 inputs_.AddAll(operands, zone);
1853 } 1857 }
1854 1858
1855 LOperand* target() const { return inputs_[0]; } 1859 LOperand* target() const { return inputs_[0]; }
1856 1860
1857 const CallInterfaceDescriptor descriptor() { return descriptor_; } 1861 const CallInterfaceDescriptor descriptor() { return descriptor_; }
1858 1862
1859 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1863 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1860 1864
1865 // The target and context are passed as implicit parameters that are not
1866 // explicitly listed in the descriptor.
1867 static const int kImplicitRegisterParameterCount = 2;
1868
1861 private: 1869 private:
1862 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1870 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1863 1871
1864 void PrintDataTo(StringStream* stream) override; 1872 void PrintDataTo(StringStream* stream) override;
1865 1873
1866 int arity() const { return hydrogen()->argument_count() - 1; } 1874 int arity() const { return hydrogen()->argument_count() - 1; }
1867 1875
1868 CallInterfaceDescriptor descriptor_; 1876 CallInterfaceDescriptor descriptor_;
1869 ZoneList<LOperand*> inputs_; 1877 ZoneList<LOperand*> inputs_;
1870 1878
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2884 2892
2885 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2893 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2886 }; 2894 };
2887 2895
2888 #undef DECLARE_HYDROGEN_ACCESSOR 2896 #undef DECLARE_HYDROGEN_ACCESSOR
2889 #undef DECLARE_CONCRETE_INSTRUCTION 2897 #undef DECLARE_CONCRETE_INSTRUCTION
2890 2898
2891 } } // namespace v8::internal 2899 } } // namespace v8::internal
2892 2900
2893 #endif // V8_ARM_LITHIUM_ARM_H_ 2901 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/interface-descriptors-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | src/code-stubs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698