OLD | NEW |
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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 | 703 |
704 static void SetNextCandidate(JSFunction* candidate, | 704 static void SetNextCandidate(JSFunction* candidate, |
705 JSFunction* next_candidate) { | 705 JSFunction* next_candidate) { |
706 *GetNextCandidateField(candidate) = next_candidate; | 706 *GetNextCandidateField(candidate) = next_candidate; |
707 } | 707 } |
708 | 708 |
709 static SharedFunctionInfo** GetNextCandidateField( | 709 static SharedFunctionInfo** GetNextCandidateField( |
710 SharedFunctionInfo* candidate) { | 710 SharedFunctionInfo* candidate) { |
711 Code* code = candidate->code(); | 711 Code* code = candidate->code(); |
712 return reinterpret_cast<SharedFunctionInfo**>( | 712 return reinterpret_cast<SharedFunctionInfo**>( |
713 code->address() + Code::kNextCodeFlushingCandidateOffset); | 713 code->address() + Code::kGCMetadataOffset); |
714 } | 714 } |
715 | 715 |
716 static SharedFunctionInfo* GetNextCandidate(SharedFunctionInfo* candidate) { | 716 static SharedFunctionInfo* GetNextCandidate(SharedFunctionInfo* candidate) { |
717 return *GetNextCandidateField(candidate); | 717 return reinterpret_cast<SharedFunctionInfo*>( |
| 718 candidate->code()->gc_metadata()); |
718 } | 719 } |
719 | 720 |
720 static void SetNextCandidate(SharedFunctionInfo* candidate, | 721 static void SetNextCandidate(SharedFunctionInfo* candidate, |
721 SharedFunctionInfo* next_candidate) { | 722 SharedFunctionInfo* next_candidate) { |
722 *GetNextCandidateField(candidate) = next_candidate; | 723 candidate->code()->set_gc_metadata(next_candidate); |
723 } | 724 } |
724 | 725 |
725 Isolate* isolate_; | 726 Isolate* isolate_; |
726 JSFunction* jsfunction_candidates_head_; | 727 JSFunction* jsfunction_candidates_head_; |
727 SharedFunctionInfo* shared_function_info_candidates_head_; | 728 SharedFunctionInfo* shared_function_info_candidates_head_; |
728 | 729 |
729 DISALLOW_COPY_AND_ASSIGN(CodeFlusher); | 730 DISALLOW_COPY_AND_ASSIGN(CodeFlusher); |
730 }; | 731 }; |
731 | 732 |
732 | 733 |
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3913 while (buffer != NULL) { | 3914 while (buffer != NULL) { |
3914 SlotsBuffer* next_buffer = buffer->next(); | 3915 SlotsBuffer* next_buffer = buffer->next(); |
3915 DeallocateBuffer(buffer); | 3916 DeallocateBuffer(buffer); |
3916 buffer = next_buffer; | 3917 buffer = next_buffer; |
3917 } | 3918 } |
3918 *buffer_address = NULL; | 3919 *buffer_address = NULL; |
3919 } | 3920 } |
3920 | 3921 |
3921 | 3922 |
3922 } } // namespace v8::internal | 3923 } } // namespace v8::internal |
OLD | NEW |