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/objects-inl.h

Issue 7226: - Inlined JSArray::SetContent.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2233 2233
2234 void Map::ClearCodeCache() { 2234 void Map::ClearCodeCache() {
2235 // No write barrier is needed since empty_fixed_array is not in new space. 2235 // No write barrier is needed since empty_fixed_array is not in new space.
2236 // Please note this function is used during marking: 2236 // Please note this function is used during marking:
2237 // - MarkCompactCollector::MarkUnmarkedObject 2237 // - MarkCompactCollector::MarkUnmarkedObject
2238 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array())); 2238 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array()));
2239 WRITE_FIELD(this, kCodeCacheOffset, Heap::empty_fixed_array()); 2239 WRITE_FIELD(this, kCodeCacheOffset, Heap::empty_fixed_array());
2240 } 2240 }
2241 2241
2242 2242
2243 void JSArray::SetContent(FixedArray* storage) {
2244 set_length(Smi::FromInt(storage->length()));
2245 set_elements(storage);
2246 }
2247
2248
2243 #undef CAST_ACCESSOR 2249 #undef CAST_ACCESSOR
2244 #undef INT_ACCESSORS 2250 #undef INT_ACCESSORS
2245 #undef SMI_ACCESSORS 2251 #undef SMI_ACCESSORS
2246 #undef ACCESSORS 2252 #undef ACCESSORS
2247 #undef FIELD_ADDR 2253 #undef FIELD_ADDR
2248 #undef READ_FIELD 2254 #undef READ_FIELD
2249 #undef WRITE_FIELD 2255 #undef WRITE_FIELD
2250 #undef WRITE_BARRIER 2256 #undef WRITE_BARRIER
2251 #undef READ_MEMADDR_FIELD 2257 #undef READ_MEMADDR_FIELD
2252 #undef WRITE_MEMADDR_FIELD 2258 #undef WRITE_MEMADDR_FIELD
2253 #undef READ_DOUBLE_FIELD 2259 #undef READ_DOUBLE_FIELD
2254 #undef WRITE_DOUBLE_FIELD 2260 #undef WRITE_DOUBLE_FIELD
2255 #undef READ_INT_FIELD 2261 #undef READ_INT_FIELD
2256 #undef WRITE_INT_FIELD 2262 #undef WRITE_INT_FIELD
2257 #undef READ_SHORT_FIELD 2263 #undef READ_SHORT_FIELD
2258 #undef WRITE_SHORT_FIELD 2264 #undef WRITE_SHORT_FIELD
2259 #undef READ_BYTE_FIELD 2265 #undef READ_BYTE_FIELD
2260 #undef WRITE_BYTE_FIELD 2266 #undef WRITE_BYTE_FIELD
2261 2267
2262 2268
2263 } } // namespace v8::internal 2269 } } // namespace v8::internal
2264 2270
2265 #endif // V8_OBJECTS_INL_H_ 2271 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698