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

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

Issue 101853003: Cache optimized code for OSR. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments, fixed a bug. Created 7 years 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 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext( 324 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext(
325 Map* map, HeapObject* object) { 325 Map* map, HeapObject* object) {
326 FixedBodyVisitor<StaticVisitor, 326 FixedBodyVisitor<StaticVisitor,
327 Context::MarkCompactBodyDescriptor, 327 Context::MarkCompactBodyDescriptor,
328 void>::Visit(map, object); 328 void>::Visit(map, object);
329 329
330 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); 330 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
331 for (int idx = Context::FIRST_WEAK_SLOT; 331 for (int idx = Context::FIRST_WEAK_SLOT;
332 idx < Context::NATIVE_CONTEXT_SLOTS; 332 idx < Context::NATIVE_CONTEXT_SLOTS;
333 ++idx) { 333 ++idx) {
334 Object** slot = 334 Object** slot = Context::cast(object)->RawFieldOfElementAt(idx);
335 HeapObject::RawField(object, FixedArray::OffsetOfElementAt(idx));
336 collector->RecordSlot(slot, slot, *slot); 335 collector->RecordSlot(slot, slot, *slot);
337 } 336 }
338 } 337 }
339 338
340 339
341 template<typename StaticVisitor> 340 template<typename StaticVisitor>
342 void StaticMarkingVisitor<StaticVisitor>::VisitMap( 341 void StaticMarkingVisitor<StaticVisitor>::VisitMap(
343 Map* map, HeapObject* object) { 342 Map* map, HeapObject* object) {
344 Heap* heap = map->GetHeap(); 343 Heap* heap = map->GetHeap();
345 Map* map_object = Map::cast(object); 344 Map* map_object = Map::cast(object);
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 RelocIterator it(this, mode_mask); 920 RelocIterator it(this, mode_mask);
922 for (; !it.done(); it.next()) { 921 for (; !it.done(); it.next()) {
923 it.rinfo()->template Visit<StaticVisitor>(heap); 922 it.rinfo()->template Visit<StaticVisitor>(heap);
924 } 923 }
925 } 924 }
926 925
927 926
928 } } // namespace v8::internal 927 } } // namespace v8::internal
929 928
930 #endif // V8_OBJECTS_VISITING_INL_H_ 929 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | src/transitions-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698