OLD | NEW |
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 code->constant_pool()->set_weak_object_state( | 204 code->constant_pool()->set_weak_object_state( |
205 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); | 205 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); |
206 } | 206 } |
207 #ifdef VERIFY_HEAP | 207 #ifdef VERIFY_HEAP |
208 // This disables verification of weak embedded objects after full GC. | 208 // This disables verification of weak embedded objects after full GC. |
209 // AddDependentCode can cause a GC, which would observe the state where | 209 // AddDependentCode can cause a GC, which would observe the state where |
210 // 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. |
211 NoWeakObjectVerificationScope disable_verification_of_embedded_objects; | 211 NoWeakObjectVerificationScope disable_verification_of_embedded_objects; |
212 #endif | 212 #endif |
213 for (int i = 0; i < maps.length(); i++) { | 213 for (int i = 0; i < maps.length(); i++) { |
214 maps.at(i)->AddDependentCode(DependentCode::kWeakCodeGroup, code); | 214 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); |
215 } | 215 } |
216 for (int i = 0; i < objects.length(); i++) { | 216 for (int i = 0; i < objects.length(); i++) { |
217 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code); | 217 AddWeakObjectToCodeDependency(isolate()->heap(), objects.at(i), code); |
218 } | 218 } |
219 for (int i = 0; i < cells.length(); i++) { | 219 for (int i = 0; i < cells.length(); i++) { |
220 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code); | 220 AddWeakObjectToCodeDependency(isolate()->heap(), cells.at(i), code); |
221 } | 221 } |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 } } // namespace v8::internal | 225 } } // namespace v8::internal |
OLD | NEW |