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

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

Issue 80643002: Merged r17800, r17801 into 3.22 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.22
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-dehoist.cc ('k') | src/lithium.h » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 6056 matching lines...) Expand 10 before | Expand all | Expand 10 after
6067 SetFlag(kUseGVN); 6067 SetFlag(kUseGVN);
6068 SetGVNFlag(kDependsOnCalls); 6068 SetGVNFlag(kDependsOnCalls);
6069 } 6069 }
6070 }; 6070 };
6071 6071
6072 class ArrayInstructionInterface { 6072 class ArrayInstructionInterface {
6073 public: 6073 public:
6074 virtual HValue* GetKey() = 0; 6074 virtual HValue* GetKey() = 0;
6075 virtual void SetKey(HValue* key) = 0; 6075 virtual void SetKey(HValue* key) = 0;
6076 virtual void SetIndexOffset(uint32_t index_offset) = 0; 6076 virtual void SetIndexOffset(uint32_t index_offset) = 0;
6077 virtual int MaxIndexOffsetBits() = 0;
6077 virtual bool IsDehoisted() = 0; 6078 virtual bool IsDehoisted() = 0;
6078 virtual void SetDehoisted(bool is_dehoisted) = 0; 6079 virtual void SetDehoisted(bool is_dehoisted) = 0;
6079 virtual ~ArrayInstructionInterface() { }; 6080 virtual ~ArrayInstructionInterface() { };
6080 6081
6081 static Representation KeyedAccessIndexRequirement(Representation r) { 6082 static Representation KeyedAccessIndexRequirement(Representation r) {
6082 return r.IsInteger32() || SmiValuesAre32Bits() 6083 return r.IsInteger32() || SmiValuesAre32Bits()
6083 ? Representation::Integer32() : Representation::Smi(); 6084 ? Representation::Integer32() : Representation::Smi();
6084 } 6085 }
6085 }; 6086 };
6086 6087
(...skipping 19 matching lines...) Expand all
6106 HValue* key() { return OperandAt(1); } 6107 HValue* key() { return OperandAt(1); }
6107 HValue* dependency() { 6108 HValue* dependency() {
6108 ASSERT(HasDependency()); 6109 ASSERT(HasDependency());
6109 return OperandAt(2); 6110 return OperandAt(2);
6110 } 6111 }
6111 bool HasDependency() const { return OperandAt(0) != OperandAt(2); } 6112 bool HasDependency() const { return OperandAt(0) != OperandAt(2); }
6112 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); } 6113 uint32_t index_offset() { return IndexOffsetField::decode(bit_field_); }
6113 void SetIndexOffset(uint32_t index_offset) { 6114 void SetIndexOffset(uint32_t index_offset) {
6114 bit_field_ = IndexOffsetField::update(bit_field_, index_offset); 6115 bit_field_ = IndexOffsetField::update(bit_field_, index_offset);
6115 } 6116 }
6117 virtual int MaxIndexOffsetBits() {
6118 return kBitsForIndexOffset;
6119 }
6116 HValue* GetKey() { return key(); } 6120 HValue* GetKey() { return key(); }
6117 void SetKey(HValue* key) { SetOperandAt(1, key); } 6121 void SetKey(HValue* key) { SetOperandAt(1, key); }
6118 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); } 6122 bool IsDehoisted() { return IsDehoistedField::decode(bit_field_); }
6119 void SetDehoisted(bool is_dehoisted) { 6123 void SetDehoisted(bool is_dehoisted) {
6120 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted); 6124 bit_field_ = IsDehoistedField::update(bit_field_, is_dehoisted);
6121 } 6125 }
6122 ElementsKind elements_kind() const { 6126 ElementsKind elements_kind() const {
6123 return ElementsKindField::decode(bit_field_); 6127 return ElementsKindField::decode(bit_field_);
6124 } 6128 }
6125 LoadKeyedHoleMode hole_mode() const { 6129 LoadKeyedHoleMode hole_mode() const {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
6489 6493
6490 HValue* elements() { return OperandAt(0); } 6494 HValue* elements() { return OperandAt(0); }
6491 HValue* key() { return OperandAt(1); } 6495 HValue* key() { return OperandAt(1); }
6492 HValue* value() { return OperandAt(2); } 6496 HValue* value() { return OperandAt(2); }
6493 bool value_is_smi() const { 6497 bool value_is_smi() const {
6494 return IsFastSmiElementsKind(elements_kind_); 6498 return IsFastSmiElementsKind(elements_kind_);
6495 } 6499 }
6496 ElementsKind elements_kind() const { return elements_kind_; } 6500 ElementsKind elements_kind() const { return elements_kind_; }
6497 uint32_t index_offset() { return index_offset_; } 6501 uint32_t index_offset() { return index_offset_; }
6498 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } 6502 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
6503 virtual int MaxIndexOffsetBits() {
6504 return 31 - ElementsKindToShiftSize(elements_kind_);
6505 }
6499 HValue* GetKey() { return key(); } 6506 HValue* GetKey() { return key(); }
6500 void SetKey(HValue* key) { SetOperandAt(1, key); } 6507 void SetKey(HValue* key) { SetOperandAt(1, key); }
6501 bool IsDehoisted() { return is_dehoisted_; } 6508 bool IsDehoisted() { return is_dehoisted_; }
6502 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } 6509 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
6503 bool IsUninitialized() { return is_uninitialized_; } 6510 bool IsUninitialized() { return is_uninitialized_; }
6504 void SetUninitialized(bool is_uninitialized) { 6511 void SetUninitialized(bool is_uninitialized) {
6505 is_uninitialized_ = is_uninitialized; 6512 is_uninitialized_ = is_uninitialized;
6506 } 6513 }
6507 6514
6508 bool IsConstantHoleStore() { 6515 bool IsConstantHoleStore() {
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
7194 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7201 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7195 }; 7202 };
7196 7203
7197 7204
7198 #undef DECLARE_INSTRUCTION 7205 #undef DECLARE_INSTRUCTION
7199 #undef DECLARE_CONCRETE_INSTRUCTION 7206 #undef DECLARE_CONCRETE_INSTRUCTION
7200 7207
7201 } } // namespace v8::internal 7208 } } // namespace v8::internal
7202 7209
7203 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7210 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-dehoist.cc ('k') | src/lithium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698