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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 1816553002: Introduce a code stub version of Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 4 years, 9 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 3808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3819 } 3819 }
3820 3820
3821 class TailCallModeField : public BitField<TailCallMode, 0, 1> {}; 3821 class TailCallModeField : public BitField<TailCallMode, 0, 1> {};
3822 uint32_t bit_field_; 3822 uint32_t bit_field_;
3823 }; 3823 };
3824 3824
3825 3825
3826 class HArgumentsElements final : public HTemplateInstruction<0> { 3826 class HArgumentsElements final : public HTemplateInstruction<0> {
3827 public: 3827 public:
3828 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool); 3828 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool);
3829 DECLARE_INSTRUCTION_FACTORY_P2(HArgumentsElements, bool, bool);
3829 3830
3830 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) 3831 DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements)
3831 3832
3832 Representation RequiredInputRepresentation(int index) override { 3833 Representation RequiredInputRepresentation(int index) override {
3833 return Representation::None(); 3834 return Representation::None();
3834 } 3835 }
3835 3836
3836 bool from_inlined() const { return from_inlined_; } 3837 bool from_inlined() const { return from_inlined_; }
3838 bool arguments_adaptor() const { return arguments_adaptor_; }
3837 3839
3838 protected: 3840 protected:
3839 bool DataEquals(HValue* other) override { return true; } 3841 bool DataEquals(HValue* other) override { return true; }
3840 3842
3841 private: 3843 private:
3842 explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) { 3844 explicit HArgumentsElements(bool from_inlined, bool arguments_adaptor = true)
3845 : from_inlined_(from_inlined), arguments_adaptor_(arguments_adaptor) {
3843 // The value produced by this instruction is a pointer into the stack 3846 // The value produced by this instruction is a pointer into the stack
3844 // that looks as if it was a smi because of alignment. 3847 // that looks as if it was a smi because of alignment.
3845 set_representation(Representation::Tagged()); 3848 set_representation(Representation::Tagged());
3846 SetFlag(kUseGVN); 3849 SetFlag(kUseGVN);
3847 } 3850 }
3848 3851
3849 bool IsDeletable() const override { return true; } 3852 bool IsDeletable() const override { return true; }
3850 3853
3851 bool from_inlined_; 3854 bool from_inlined_;
3855 bool arguments_adaptor_;
3852 }; 3856 };
3853 3857
3854 3858
3855 class HArgumentsLength final : public HUnaryOperation { 3859 class HArgumentsLength final : public HUnaryOperation {
3856 public: 3860 public:
3857 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*); 3861 DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*);
3858 3862
3859 Representation RequiredInputRepresentation(int index) override { 3863 Representation RequiredInputRepresentation(int index) override {
3860 return Representation::Tagged(); 3864 return Representation::Tagged();
3861 } 3865 }
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
5847 return HObjectAccess(kInobject, 5851 return HObjectAccess(kInobject,
5848 Map::kBitField2Offset, 5852 Map::kBitField2Offset,
5849 Representation::UInteger8()); 5853 Representation::UInteger8());
5850 } 5854 }
5851 5855
5852 static HObjectAccess ForMapBitField3() { 5856 static HObjectAccess ForMapBitField3() {
5853 return HObjectAccess(kInobject, Map::kBitField3Offset, 5857 return HObjectAccess(kInobject, Map::kBitField3Offset,
5854 Representation::Integer32()); 5858 Representation::Integer32());
5855 } 5859 }
5856 5860
5861 static HObjectAccess ForMapDescriptors() {
5862 return HObjectAccess(kInobject, Map::kDescriptorsOffset);
5863 }
5864
5857 static HObjectAccess ForNameHashField() { 5865 static HObjectAccess ForNameHashField() {
5858 return HObjectAccess(kInobject, 5866 return HObjectAccess(kInobject,
5859 Name::kHashFieldOffset, 5867 Name::kHashFieldOffset,
5860 Representation::Integer32()); 5868 Representation::Integer32());
5861 } 5869 }
5862 5870
5863 static HObjectAccess ForMapInstanceTypeAndBitField() { 5871 static HObjectAccess ForMapInstanceTypeAndBitField() {
5864 STATIC_ASSERT((Map::kInstanceTypeAndBitFieldOffset & 1) == 0); 5872 STATIC_ASSERT((Map::kInstanceTypeAndBitFieldOffset & 1) == 0);
5865 // Ensure the two fields share one 16-bit word, endian-independent. 5873 // Ensure the two fields share one 16-bit word, endian-independent.
5866 STATIC_ASSERT((Map::kBitFieldOffset & ~1) == 5874 STATIC_ASSERT((Map::kBitFieldOffset & ~1) ==
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
7565 7573
7566 7574
7567 7575
7568 #undef DECLARE_INSTRUCTION 7576 #undef DECLARE_INSTRUCTION
7569 #undef DECLARE_CONCRETE_INSTRUCTION 7577 #undef DECLARE_CONCRETE_INSTRUCTION
7570 7578
7571 } // namespace internal 7579 } // namespace internal
7572 } // namespace v8 7580 } // namespace v8
7573 7581
7574 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7582 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698