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

Side by Side Diff: src/lithium-codegen.cc

Issue 209473006: Ensure that we don't mark weak heap references in the constant pool array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: replace with CHECK Created 6 years, 8 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/objects.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 maps.Add(map, zone()); 193 maps.Add(map, zone());
194 } else if (it.rinfo()->target_object()->IsJSObject()) { 194 } else if (it.rinfo()->target_object()->IsJSObject()) {
195 Handle<JSObject> object(JSObject::cast(it.rinfo()->target_object())); 195 Handle<JSObject> object(JSObject::cast(it.rinfo()->target_object()));
196 objects.Add(object, zone()); 196 objects.Add(object, zone());
197 } else if (it.rinfo()->target_object()->IsCell()) { 197 } else if (it.rinfo()->target_object()->IsCell()) {
198 Handle<Cell> cell(Cell::cast(it.rinfo()->target_object())); 198 Handle<Cell> cell(Cell::cast(it.rinfo()->target_object()));
199 cells.Add(cell, zone()); 199 cells.Add(cell, zone());
200 } 200 }
201 } 201 }
202 } 202 }
203 if (FLAG_enable_ool_constant_pool) {
204 code->constant_pool()->set_weak_object_state(
205 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE);
206 }
203 #ifdef VERIFY_HEAP 207 #ifdef VERIFY_HEAP
204 // This disables verification of weak embedded objects after full GC. 208 // This disables verification of weak embedded objects after full GC.
205 // AddDependentCode can cause a GC, which would observe the state where 209 // AddDependentCode can cause a GC, which would observe the state where
206 // this code is not yet in the depended code lists of the embedded maps. 210 // this code is not yet in the depended code lists of the embedded maps.
207 NoWeakObjectVerificationScope disable_verification_of_embedded_objects; 211 NoWeakObjectVerificationScope disable_verification_of_embedded_objects;
208 #endif 212 #endif
209 for (int i = 0; i < maps.length(); i++) { 213 for (int i = 0; i < maps.length(); i++) {
210 maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, code); 214 maps.at(i)->AddDependentCode(DependentCode::kWeaklyEmbeddedGroup, code);
211 } 215 }
212 for (int i = 0; i < objects.length(); i++) { 216 for (int i = 0; i < objects.length(); i++) {
213 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code); 217 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code);
214 } 218 }
215 for (int i = 0; i < cells.length(); i++) { 219 for (int i = 0; i < cells.length(); i++) {
216 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code); 220 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code);
217 } 221 }
218 } 222 }
219 223
220 224
221 } } // namespace v8::internal 225 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698