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

Side by Side Diff: src/heap-inl.h

Issue 23477061: Make objects embedded in optimized code weak. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arm Created 7 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/heap.cc ('k') | src/ia32/lithium-codegen-ia32.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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 839
840 840
841 AlwaysAllocateScope::~AlwaysAllocateScope() { 841 AlwaysAllocateScope::~AlwaysAllocateScope() {
842 Isolate* isolate = Isolate::Current(); 842 Isolate* isolate = Isolate::Current();
843 isolate->heap()->always_allocate_scope_depth_--; 843 isolate->heap()->always_allocate_scope_depth_--;
844 ASSERT(isolate->heap()->always_allocate_scope_depth_ == 0); 844 ASSERT(isolate->heap()->always_allocate_scope_depth_ == 0);
845 } 845 }
846 846
847 847
848 #ifdef VERIFY_HEAP 848 #ifdef VERIFY_HEAP
849 NoWeakEmbeddedMapsVerificationScope::NoWeakEmbeddedMapsVerificationScope() { 849 NoWeakObjectVerificationScope::NoWeakObjectVerificationScope() {
850 Isolate* isolate = Isolate::Current(); 850 Isolate* isolate = Isolate::Current();
851 isolate->heap()->no_weak_embedded_maps_verification_scope_depth_++; 851 isolate->heap()->no_weak_object_verification_scope_depth_++;
852 } 852 }
853 853
854 854
855 NoWeakEmbeddedMapsVerificationScope::~NoWeakEmbeddedMapsVerificationScope() { 855 NoWeakObjectVerificationScope::~NoWeakObjectVerificationScope() {
856 Isolate* isolate = Isolate::Current(); 856 Isolate* isolate = Isolate::Current();
857 isolate->heap()->no_weak_embedded_maps_verification_scope_depth_--; 857 isolate->heap()->no_weak_object_verification_scope_depth_--;
858 } 858 }
859 #endif 859 #endif
860 860
861 861
862 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) { 862 void VerifyPointersVisitor::VisitPointers(Object** start, Object** end) {
863 for (Object** current = start; current < end; current++) { 863 for (Object** current = start; current < end; current++) {
864 if ((*current)->IsHeapObject()) { 864 if ((*current)->IsHeapObject()) {
865 HeapObject* object = HeapObject::cast(*current); 865 HeapObject* object = HeapObject::cast(*current);
866 CHECK(object->GetIsolate()->heap()->Contains(object)); 866 CHECK(object->GetIsolate()->heap()->Contains(object));
867 CHECK(object->map()->IsMap()); 867 CHECK(object->map()->IsMap());
(...skipping 20 matching lines...) Expand all
888 #ifdef DEBUG 888 #ifdef DEBUG
889 Isolate* isolate = Isolate::Current(); 889 Isolate* isolate = Isolate::Current();
890 isolate->heap()->disallow_allocation_failure_ = old_state_; 890 isolate->heap()->disallow_allocation_failure_ = old_state_;
891 #endif 891 #endif
892 } 892 }
893 893
894 894
895 } } // namespace v8::internal 895 } } // namespace v8::internal
896 896
897 #endif // V8_HEAP_INL_H_ 897 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698