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

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

Issue 25679008: Revert "Add support to load/store byte fields." and "MIPS: Add support to load/store byte fields.". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.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 // 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 5936 matching lines...) Expand 10 before | Expand all | Expand 10 after
5947 HLoadNamedField* b = HLoadNamedField::cast(other); 5947 HLoadNamedField* b = HLoadNamedField::cast(other);
5948 return access_.Equals(b->access_); 5948 return access_.Equals(b->access_);
5949 } 5949 }
5950 5950
5951 private: 5951 private:
5952 HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) { 5952 HLoadNamedField(HValue* object, HObjectAccess access) : access_(access) {
5953 ASSERT(object != NULL); 5953 ASSERT(object != NULL);
5954 SetOperandAt(0, object); 5954 SetOperandAt(0, object);
5955 5955
5956 Representation representation = access.representation(); 5956 Representation representation = access.representation();
5957 if (representation.IsByte()) { 5957 if (representation.IsSmi()) {
5958 set_representation(Representation::Integer32());
5959 } else if (representation.IsSmi()) {
5960 set_type(HType::Smi()); 5958 set_type(HType::Smi());
5961 set_representation(representation); 5959 set_representation(representation);
5962 } else if (representation.IsDouble() || 5960 } else if (representation.IsDouble() ||
5963 representation.IsExternal() || 5961 representation.IsExternal() ||
5964 representation.IsInteger32()) { 5962 representation.IsInteger32()) {
5965 set_representation(representation); 5963 set_representation(representation);
5966 } else if (FLAG_track_heap_object_fields && 5964 } else if (FLAG_track_heap_object_fields &&
5967 representation.IsHeapObject()) { 5965 representation.IsHeapObject()) {
5968 set_type(HType::NonPrimitive()); 5966 set_type(HType::NonPrimitive());
5969 set_representation(Representation::Tagged()); 5967 set_representation(Representation::Tagged());
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
6247 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { 6245 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE {
6248 return index == 1; 6246 return index == 1;
6249 } 6247 }
6250 virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE { 6248 virtual bool HasOutOfBoundsAccess(int size) V8_OVERRIDE {
6251 return !access().IsInobject() || access().offset() >= size; 6249 return !access().IsInobject() || access().offset() >= size;
6252 } 6250 }
6253 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 6251 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
6254 if (index == 0 && access().IsExternalMemory()) { 6252 if (index == 0 && access().IsExternalMemory()) {
6255 // object must be external in case of external memory access 6253 // object must be external in case of external memory access
6256 return Representation::External(); 6254 return Representation::External();
6257 } else if (index == 1) { 6255 } else if (index == 1 &&
6258 if (field_representation().IsByte() || 6256 (field_representation().IsDouble() ||
6259 field_representation().IsInteger32()) { 6257 field_representation().IsSmi() ||
6260 return Representation::Integer32(); 6258 field_representation().IsInteger32())) {
6261 } else if (field_representation().IsDouble() || 6259 return field_representation();
6262 field_representation().IsSmi()) {
6263 return field_representation();
6264 }
6265 } 6260 }
6266 return Representation::Tagged(); 6261 return Representation::Tagged();
6267 } 6262 }
6268 virtual void HandleSideEffectDominator(GVNFlag side_effect, 6263 virtual void HandleSideEffectDominator(GVNFlag side_effect,
6269 HValue* dominator) V8_OVERRIDE { 6264 HValue* dominator) V8_OVERRIDE {
6270 ASSERT(side_effect == kChangesNewSpacePromotion); 6265 ASSERT(side_effect == kChangesNewSpacePromotion);
6271 new_space_dominator_ = dominator; 6266 new_space_dominator_ = dominator;
6272 } 6267 }
6273 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 6268 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
6274 6269
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
7131 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7126 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7132 }; 7127 };
7133 7128
7134 7129
7135 #undef DECLARE_INSTRUCTION 7130 #undef DECLARE_INSTRUCTION
7136 #undef DECLARE_CONCRETE_INSTRUCTION 7131 #undef DECLARE_CONCRETE_INSTRUCTION
7137 7132
7138 } } // namespace v8::internal 7133 } } // namespace v8::internal
7139 7134
7140 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7135 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698