OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/lithium-codegen.h" | 5 #include "src/lithium-codegen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); | 210 ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE); |
211 } | 211 } |
212 #ifdef VERIFY_HEAP | 212 #ifdef VERIFY_HEAP |
213 // This disables verification of weak embedded objects after full GC. | 213 // This disables verification of weak embedded objects after full GC. |
214 // AddDependentCode can cause a GC, which would observe the state where | 214 // AddDependentCode can cause a GC, which would observe the state where |
215 // this code is not yet in the depended code lists of the embedded maps. | 215 // this code is not yet in the depended code lists of the embedded maps. |
216 NoWeakObjectVerificationScope disable_verification_of_embedded_objects; | 216 NoWeakObjectVerificationScope disable_verification_of_embedded_objects; |
217 #endif | 217 #endif |
218 for (int i = 0; i < maps.length(); i++) { | 218 for (int i = 0; i < maps.length(); i++) { |
219 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); | 219 Map::AddDependentCode(maps.at(i), DependentCode::kWeakCodeGroup, code); |
| 220 isolate()->heap()->CacheEmbeddedMap(maps.at(i)); |
220 } | 221 } |
221 for (int i = 0; i < objects.length(); i++) { | 222 for (int i = 0; i < objects.length(); i++) { |
222 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); | 223 AddWeakObjectToCodeDependency(isolate(), objects.at(i), code); |
223 } | 224 } |
224 for (int i = 0; i < cells.length(); i++) { | 225 for (int i = 0; i < cells.length(); i++) { |
225 AddWeakObjectToCodeDependency(isolate(), cells.at(i), code); | 226 AddWeakObjectToCodeDependency(isolate(), cells.at(i), code); |
226 } | 227 } |
227 } | 228 } |
228 | 229 |
229 | 230 |
(...skipping 14 matching lines...) Expand all Loading... |
244 chunk_->AddDeprecationDependency(map); | 245 chunk_->AddDeprecationDependency(map); |
245 } | 246 } |
246 | 247 |
247 | 248 |
248 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { | 249 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { |
249 if (!map->is_stable()) return Retry(kMapBecameUnstable); | 250 if (!map->is_stable()) return Retry(kMapBecameUnstable); |
250 chunk_->AddStabilityDependency(map); | 251 chunk_->AddStabilityDependency(map); |
251 } | 252 } |
252 | 253 |
253 } } // namespace v8::internal | 254 } } // namespace v8::internal |
OLD | NEW |