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

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

Issue 11028016: Move code flushing support into shared visitor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 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
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-visiting-inl.h » ('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 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 static inline void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo); 395 static inline void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo);
396 static inline void VisitGlobalPropertyCell(Heap* heap, RelocInfo* rinfo); 396 static inline void VisitGlobalPropertyCell(Heap* heap, RelocInfo* rinfo);
397 static inline void VisitDebugTarget(Heap* heap, RelocInfo* rinfo); 397 static inline void VisitDebugTarget(Heap* heap, RelocInfo* rinfo);
398 static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo); 398 static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo);
399 static inline void VisitExternalReference(RelocInfo* rinfo) { } 399 static inline void VisitExternalReference(RelocInfo* rinfo) { }
400 static inline void VisitRuntimeEntry(RelocInfo* rinfo) { } 400 static inline void VisitRuntimeEntry(RelocInfo* rinfo) { }
401 401
402 // TODO(mstarzinger): This should be made protected once refactoring is done. 402 // TODO(mstarzinger): This should be made protected once refactoring is done.
403 static inline void VisitNativeContext(Map* map, HeapObject* object); 403 static inline void VisitNativeContext(Map* map, HeapObject* object);
404 404
405 // TODO(mstarzinger): This should be made protected once refactoring is done.
406 // Mark non-optimize code for functions inlined into the given optimized
407 // code. This will prevent it from being flushed.
408 static void MarkInlinedFunctionsCode(Heap* heap, Code* code);
409
405 protected: 410 protected:
406 static inline void VisitMap(Map* map, HeapObject* object); 411 static inline void VisitMap(Map* map, HeapObject* object);
407 static inline void VisitCode(Map* map, HeapObject* object); 412 static inline void VisitCode(Map* map, HeapObject* object);
413 static inline void VisitSharedFunctionInfo(Map* map, HeapObject* object);
414 static inline void VisitJSFunction(Map* map, HeapObject* object);
408 static inline void VisitJSRegExp(Map* map, HeapObject* object); 415 static inline void VisitJSRegExp(Map* map, HeapObject* object);
409 416
410 // Mark pointers in a Map and its TransitionArray together, possibly 417 // Mark pointers in a Map and its TransitionArray together, possibly
411 // treating transitions or back pointers weak. 418 // treating transitions or back pointers weak.
412 static void MarkMapContents(Heap* heap, Map* map); 419 static void MarkMapContents(Heap* heap, Map* map);
413 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions); 420 static void MarkTransitionArray(Heap* heap, TransitionArray* transitions);
414 421
422 // Code flushing support.
423 static inline bool IsFlushable(Heap* heap, JSFunction* function);
424 static inline bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info);
425
426 // Helpers used by code flushing support that visit pointer fields and treat
427 // references to code objects either strongly or weakly.
428 static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object);
429 static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object);
430 static void VisitJSFunctionStrongCode(Heap* heap, HeapObject* object);
431 static void VisitJSFunctionWeakCode(Heap* heap, HeapObject* object);
432
415 class DataObjectVisitor { 433 class DataObjectVisitor {
416 public: 434 public:
417 template<int size> 435 template<int size>
418 static inline void VisitSpecialized(Map* map, HeapObject* object) { 436 static inline void VisitSpecialized(Map* map, HeapObject* object) {
419 } 437 }
420 438
421 static inline void Visit(Map* map, HeapObject* object) { 439 static inline void Visit(Map* map, HeapObject* object) {
422 } 440 }
423 }; 441 };
424 442
(...skipping 12 matching lines...) Expand all
437 455
438 456
439 template<typename StaticVisitor> 457 template<typename StaticVisitor>
440 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback> 458 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback>
441 StaticMarkingVisitor<StaticVisitor>::table_; 459 StaticMarkingVisitor<StaticVisitor>::table_;
442 460
443 461
444 } } // namespace v8::internal 462 } } // namespace v8::internal
445 463
446 #endif // V8_OBJECTS_VISITING_H_ 464 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698