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

Side by Side Diff: src/objects-inl.h

Issue 113522: X64: Checked and slightly modified Object layouts to be compatible with 64-bit pointers. (Closed)
Patch Set: Created 11 years, 7 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
« src/objects.h ('K') | « src/objects.h ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 if (instance_type == JS_OBJECT_TYPE) return map->instance_size(); 1787 if (instance_type == JS_OBJECT_TYPE) return map->instance_size();
1788 if (instance_type == FIXED_ARRAY_TYPE) { 1788 if (instance_type == FIXED_ARRAY_TYPE) {
1789 return reinterpret_cast<FixedArray*>(this)->FixedArraySize(); 1789 return reinterpret_cast<FixedArray*>(this)->FixedArraySize();
1790 } 1790 }
1791 // Otherwise do the general size computation. 1791 // Otherwise do the general size computation.
1792 return SlowSizeFromMap(map); 1792 return SlowSizeFromMap(map);
1793 } 1793 }
1794 1794
1795 1795
1796 void Map::set_instance_size(int value) { 1796 void Map::set_instance_size(int value) {
1797 ASSERT((value & ~(kPointerSize - 1)) == value); 1797 ASSERT_EQ((value & ~(kPointerSize - 1)), value);
1798 value >>= kPointerSizeLog2; 1798 value >>= kPointerSizeLog2;
1799 ASSERT(0 <= value && value < 256); 1799 ASSERT(0 <= value && value < 256);
1800 WRITE_BYTE_FIELD(this, kInstanceSizeOffset, static_cast<byte>(value)); 1800 WRITE_BYTE_FIELD(this, kInstanceSizeOffset, static_cast<byte>(value));
1801 } 1801 }
1802 1802
1803 1803
1804 void Map::set_inobject_properties(int value) { 1804 void Map::set_inobject_properties(int value) {
1805 ASSERT(0 <= value && value < 256); 1805 ASSERT(0 <= value && value < 256);
1806 WRITE_BYTE_FIELD(this, kInObjectPropertiesOffset, static_cast<byte>(value)); 1806 WRITE_BYTE_FIELD(this, kInObjectPropertiesOffset, static_cast<byte>(value));
1807 } 1807 }
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 #undef WRITE_INT_FIELD 2628 #undef WRITE_INT_FIELD
2629 #undef READ_SHORT_FIELD 2629 #undef READ_SHORT_FIELD
2630 #undef WRITE_SHORT_FIELD 2630 #undef WRITE_SHORT_FIELD
2631 #undef READ_BYTE_FIELD 2631 #undef READ_BYTE_FIELD
2632 #undef WRITE_BYTE_FIELD 2632 #undef WRITE_BYTE_FIELD
2633 2633
2634 2634
2635 } } // namespace v8::internal 2635 } } // namespace v8::internal
2636 2636
2637 #endif // V8_OBJECTS_INL_H_ 2637 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698