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

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

Issue 2950003: Virtually dispatched scavengers (Closed)
Patch Set: Created 10 years, 5 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') | src/serialize.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 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 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 return ptr[index]; 2053 return ptr[index];
2054 } 2054 }
2055 2055
2056 2056
2057 void ExternalFloatArray::set(int index, float value) { 2057 void ExternalFloatArray::set(int index, float value) {
2058 ASSERT((index >= 0) && (index < this->length())); 2058 ASSERT((index >= 0) && (index < this->length()));
2059 float* ptr = static_cast<float*>(external_pointer()); 2059 float* ptr = static_cast<float*>(external_pointer());
2060 ptr[index] = value; 2060 ptr[index] = value;
2061 } 2061 }
2062 2062
2063 inline Scavenger Map::scavenger() {
2064 Scavenger callback = reinterpret_cast<Scavenger>(
2065 READ_INTPTR_FIELD(this, kScavengerCallbackOffset));
2066
2067 ASSERT(callback == Heap::GetScavenger(instance_type(),
2068 instance_size()));
2069
2070 return callback;
2071 }
2072
2073 inline void Map::set_scavenger(Scavenger callback) {
2074 WRITE_INTPTR_FIELD(this,
2075 kScavengerCallbackOffset,
2076 reinterpret_cast<intptr_t>(callback));
2077 }
2063 2078
2064 int Map::instance_size() { 2079 int Map::instance_size() {
2065 return READ_BYTE_FIELD(this, kInstanceSizeOffset) << kPointerSizeLog2; 2080 return READ_BYTE_FIELD(this, kInstanceSizeOffset) << kPointerSizeLog2;
2066 } 2081 }
2067 2082
2068 2083
2069 int Map::inobject_properties() { 2084 int Map::inobject_properties() {
2070 return READ_BYTE_FIELD(this, kInObjectPropertiesOffset); 2085 return READ_BYTE_FIELD(this, kInObjectPropertiesOffset);
2071 } 2086 }
2072 2087
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
3302 #undef WRITE_INT_FIELD 3317 #undef WRITE_INT_FIELD
3303 #undef READ_SHORT_FIELD 3318 #undef READ_SHORT_FIELD
3304 #undef WRITE_SHORT_FIELD 3319 #undef WRITE_SHORT_FIELD
3305 #undef READ_BYTE_FIELD 3320 #undef READ_BYTE_FIELD
3306 #undef WRITE_BYTE_FIELD 3321 #undef WRITE_BYTE_FIELD
3307 3322
3308 3323
3309 } } // namespace v8::internal 3324 } } // namespace v8::internal
3310 3325
3311 #endif // V8_OBJECTS_INL_H_ 3326 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698