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

Side by Side Diff: src/mark-compact.h

Issue 11889031: Merged r13380, r13381 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 11 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 | « include/v8.h ('k') | src/mark-compact.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 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 public: 416 public:
417 explicit CodeFlusher(Isolate* isolate) 417 explicit CodeFlusher(Isolate* isolate)
418 : isolate_(isolate), 418 : isolate_(isolate),
419 jsfunction_candidates_head_(NULL), 419 jsfunction_candidates_head_(NULL),
420 shared_function_info_candidates_head_(NULL) {} 420 shared_function_info_candidates_head_(NULL) {}
421 421
422 void AddCandidate(SharedFunctionInfo* shared_info) { 422 void AddCandidate(SharedFunctionInfo* shared_info) {
423 if (GetNextCandidate(shared_info) == NULL) { 423 if (GetNextCandidate(shared_info) == NULL) {
424 SetNextCandidate(shared_info, shared_function_info_candidates_head_); 424 SetNextCandidate(shared_info, shared_function_info_candidates_head_);
425 shared_function_info_candidates_head_ = shared_info; 425 shared_function_info_candidates_head_ = shared_info;
426 } else {
427 // TODO(mstarzinger): Active in release mode to flush out problems.
428 // Should be turned back into an ASSERT or removed completely.
429 CHECK(ContainsCandidate(shared_info));
426 } 430 }
427 } 431 }
428 432
429 void AddCandidate(JSFunction* function) { 433 void AddCandidate(JSFunction* function) {
430 ASSERT(function->code() == function->shared()->code()); 434 ASSERT(function->code() == function->shared()->code());
431 if (GetNextCandidate(function)->IsUndefined()) { 435 if (GetNextCandidate(function)->IsUndefined()) {
432 SetNextCandidate(function, jsfunction_candidates_head_); 436 SetNextCandidate(function, jsfunction_candidates_head_);
433 jsfunction_candidates_head_ = function; 437 jsfunction_candidates_head_ = function;
434 } 438 }
435 } 439 }
436 440
441 bool ContainsCandidate(SharedFunctionInfo* shared_info);
442
437 void EvictCandidate(SharedFunctionInfo* shared_info); 443 void EvictCandidate(SharedFunctionInfo* shared_info);
438 void EvictCandidate(JSFunction* function); 444 void EvictCandidate(JSFunction* function);
439 445
440 void ProcessCandidates() { 446 void ProcessCandidates() {
441 ProcessSharedFunctionInfoCandidates(); 447 ProcessSharedFunctionInfoCandidates();
442 ProcessJSFunctionCandidates(); 448 ProcessJSFunctionCandidates();
443 } 449 }
444 450
445 void EvictAllCandidates() { 451 void EvictAllCandidates() {
446 EvictJSFunctionCandidates(); 452 EvictJSFunctionCandidates();
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 861
856 friend class Heap; 862 friend class Heap;
857 }; 863 };
858 864
859 865
860 const char* AllocationSpaceName(AllocationSpace space); 866 const char* AllocationSpaceName(AllocationSpace space);
861 867
862 } } // namespace v8::internal 868 } } // namespace v8::internal
863 869
864 #endif // V8_MARK_COMPACT_H_ 870 #endif // V8_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698