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

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

Issue 43563002: Generalize AllocationSite field access in HObjectAccess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comment response 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/code-stubs-hydrogen.cc ('k') | no next file » | 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 5768 matching lines...) Expand 10 before | Expand all | Expand 10 after
5779 5779
5780 static HObjectAccess ForArrayLength(ElementsKind elements_kind) { 5780 static HObjectAccess ForArrayLength(ElementsKind elements_kind) {
5781 return HObjectAccess( 5781 return HObjectAccess(
5782 kArrayLengths, 5782 kArrayLengths,
5783 JSArray::kLengthOffset, 5783 JSArray::kLengthOffset,
5784 IsFastElementsKind(elements_kind) && 5784 IsFastElementsKind(elements_kind) &&
5785 FLAG_track_fields 5785 FLAG_track_fields
5786 ? Representation::Smi() : Representation::Tagged()); 5786 ? Representation::Smi() : Representation::Tagged());
5787 } 5787 }
5788 5788
5789 static HObjectAccess ForAllocationSiteTransitionInfo() { 5789 static HObjectAccess ForAllocationSiteOffset(int offset) {
5790 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset); 5790 ASSERT(offset >= HeapObject::kHeaderSize && offset < AllocationSite::kSize);
5791 } 5791 return HObjectAccess(kInobject, offset);
5792
5793 static HObjectAccess ForAllocationSiteNestedSite() {
5794 return HObjectAccess(kInobject, AllocationSite::kNestedSiteOffset);
5795 }
5796
5797 static HObjectAccess ForAllocationSiteDependentCode() {
5798 return HObjectAccess(kInobject, AllocationSite::kDependentCodeOffset);
5799 }
5800
5801 static HObjectAccess ForAllocationSiteWeakNext() {
5802 return HObjectAccess(kInobject, AllocationSite::kWeakNextOffset);
5803 } 5792 }
5804 5793
5805 static HObjectAccess ForAllocationSiteList() { 5794 static HObjectAccess ForAllocationSiteList() {
5806 return HObjectAccess(kExternalMemory, 0, Representation::Tagged()); 5795 return HObjectAccess(kExternalMemory, 0, Representation::Tagged());
5807 } 5796 }
5808 5797
5809 static HObjectAccess ForFixedArrayLength() { 5798 static HObjectAccess ForFixedArrayLength() {
5810 return HObjectAccess( 5799 return HObjectAccess(
5811 kArrayLengths, 5800 kArrayLengths,
5812 FixedArray::kLengthOffset, 5801 FixedArray::kLengthOffset,
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
7201 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7190 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7202 }; 7191 };
7203 7192
7204 7193
7205 #undef DECLARE_INSTRUCTION 7194 #undef DECLARE_INSTRUCTION
7206 #undef DECLARE_CONCRETE_INSTRUCTION 7195 #undef DECLARE_CONCRETE_INSTRUCTION
7207 7196
7208 } } // namespace v8::internal 7197 } } // namespace v8::internal
7209 7198
7210 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7199 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698