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

Side by Side Diff: src/ia32/lithium-ia32.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_IA32_LITHIUM_IA32_H_ 5 #ifndef V8_IA32_LITHIUM_IA32_H_
6 #define V8_IA32_LITHIUM_IA32_H_ 6 #define V8_IA32_LITHIUM_IA32_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 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1854 void PrintDataTo(StringStream* stream) override; 1854 void PrintDataTo(StringStream* stream) override;
1855 1855
1856 int arity() const { return hydrogen()->argument_count() - 1; } 1856 int arity() const { return hydrogen()->argument_count() - 1; }
1857 }; 1857 };
1858 1858
1859 1859
1860 class LCallWithDescriptor final : public LTemplateResultInstruction<1> { 1860 class LCallWithDescriptor final : public LTemplateResultInstruction<1> {
1861 public: 1861 public:
1862 LCallWithDescriptor(CallInterfaceDescriptor descriptor, 1862 LCallWithDescriptor(CallInterfaceDescriptor descriptor,
1863 const ZoneList<LOperand*>& operands, Zone* zone) 1863 const ZoneList<LOperand*>& operands, Zone* zone)
1864 : inputs_(descriptor.GetRegisterParameterCount() + 1, zone) { 1864 : inputs_(descriptor.GetRegisterParameterCount() +
1865 DCHECK(descriptor.GetRegisterParameterCount() + 1 == operands.length()); 1865 kImplicitRegisterParameterCount,
1866 zone) {
1867 DCHECK(descriptor.GetRegisterParameterCount() +
1868 kImplicitRegisterParameterCount ==
1869 operands.length());
1866 inputs_.AddAll(operands, zone); 1870 inputs_.AddAll(operands, zone);
1867 } 1871 }
1868 1872
1869 LOperand* target() const { return inputs_[0]; } 1873 LOperand* target() const { return inputs_[0]; }
1870 1874
1871 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor) 1875 DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
1872 1876
1877 // The target and context are passed as implicit parameters that are not
1878 // explicitly listed in the descriptor.
1879 static const int kImplicitRegisterParameterCount = 2;
1880
1873 private: 1881 private:
1874 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor") 1882 DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
1875 1883
1876 void PrintDataTo(StringStream* stream) override; 1884 void PrintDataTo(StringStream* stream) override;
1877 1885
1878 int arity() const { return hydrogen()->argument_count() - 1; } 1886 int arity() const { return hydrogen()->argument_count() - 1; }
1879 1887
1880 ZoneList<LOperand*> inputs_; 1888 ZoneList<LOperand*> inputs_;
1881 1889
1882 // Iterator support. 1890 // Iterator support.
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 2890
2883 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2891 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2884 }; 2892 };
2885 2893
2886 #undef DECLARE_HYDROGEN_ACCESSOR 2894 #undef DECLARE_HYDROGEN_ACCESSOR
2887 #undef DECLARE_CONCRETE_INSTRUCTION 2895 #undef DECLARE_CONCRETE_INSTRUCTION
2888 2896
2889 } } // namespace v8::internal 2897 } } // namespace v8::internal
2890 2898
2891 #endif // V8_IA32_LITHIUM_IA32_H_ 2899 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698