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

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

Issue 3364007: Turn visitor_id into a byte field and free back one word in Map. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « src/objects.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 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 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 } 2102 }
2103 2103
2104 2104
2105 void ExternalFloatArray::set(int index, float value) { 2105 void ExternalFloatArray::set(int index, float value) {
2106 ASSERT((index >= 0) && (index < this->length())); 2106 ASSERT((index >= 0) && (index < this->length()));
2107 float* ptr = static_cast<float*>(external_pointer()); 2107 float* ptr = static_cast<float*>(external_pointer());
2108 ptr[index] = value; 2108 ptr[index] = value;
2109 } 2109 }
2110 2110
2111 2111
2112 INT_ACCESSORS(Map, visitor_id, kScavengerCallbackOffset) 2112 int Map::visitor_id() {
2113 return READ_BYTE_FIELD(this, kVisitorIdOffset);
2114 }
2115
2116
2117 void Map::set_visitor_id(int id) {
2118 ASSERT(0 <= id && id < 256);
2119 WRITE_BYTE_FIELD(this, kVisitorIdOffset, static_cast<byte>(id));
2120 }
2121
2113 2122
2114 int Map::instance_size() { 2123 int Map::instance_size() {
2115 return READ_BYTE_FIELD(this, kInstanceSizeOffset) << kPointerSizeLog2; 2124 return READ_BYTE_FIELD(this, kInstanceSizeOffset) << kPointerSizeLog2;
2116 } 2125 }
2117 2126
2118 2127
2119 int Map::inobject_properties() { 2128 int Map::inobject_properties() {
2120 return READ_BYTE_FIELD(this, kInObjectPropertiesOffset); 2129 return READ_BYTE_FIELD(this, kInObjectPropertiesOffset);
2121 } 2130 }
2122 2131
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
3480 #undef WRITE_INT_FIELD 3489 #undef WRITE_INT_FIELD
3481 #undef READ_SHORT_FIELD 3490 #undef READ_SHORT_FIELD
3482 #undef WRITE_SHORT_FIELD 3491 #undef WRITE_SHORT_FIELD
3483 #undef READ_BYTE_FIELD 3492 #undef READ_BYTE_FIELD
3484 #undef WRITE_BYTE_FIELD 3493 #undef WRITE_BYTE_FIELD
3485 3494
3486 3495
3487 } } // namespace v8::internal 3496 } } // namespace v8::internal
3488 3497
3489 #endif // V8_OBJECTS_INL_H_ 3498 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698