Chromium Code Reviews| Index: src/code-stubs-hydrogen.cc |
| diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc |
| index 3e18138eb2b459bc9b0f56392aae3334d2b643f6..b94301fb6796ffbaabeaafe5721c269fc3267a3d 100644 |
| --- a/src/code-stubs-hydrogen.cc |
| +++ b/src/code-stubs-hydrogen.cc |
| @@ -463,14 +463,27 @@ HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() { |
| HObjectAccess::ForAllocationSiteTransitionInfo(), |
| initial_elements_kind); |
| + // Store an empty fixed array for the code dependency. |
| + HConstant* empty_fixed_array = |
| + Add<HConstant>(isolate()->factory()->empty_fixed_array()); |
| + ASSERT(!isolate()->heap()->InNewSpace( |
| + isolate()->heap()->empty_fixed_array())); |
|
Hannes Payer (out of office)
2013/09/19 13:57:08
This assert can go, empty fixed array is always in
mvstanton
2013/09/19 14:06:11
Done.
|
| + HStoreNamedField* store = Add<HStoreNamedField>( |
| + object, |
| + HObjectAccess::ForAllocationSiteDependentCode(), |
| + empty_fixed_array); |
| + // TODO(mvstanton): Can I improve on using SkipWriteBarrier()? Should the |
| + // empty fixed array be an "immortal immovable?" |
|
Hannes Payer (out of office)
2013/09/19 13:57:08
The write barrier should be skipped there by defau
mvstanton
2013/09/19 14:06:11
I did verify, it was there, but now I've added the
|
| + store->SkipWriteBarrier(); |
| + |
| // Link the object to the allocation site list |
| HValue* site_list = Add<HConstant>( |
| ExternalReference::allocation_sites_list_address(isolate())); |
| HValue* site = Add<HLoadNamedField>(site_list, |
| HObjectAccess::ForAllocationSiteList()); |
| - HStoreNamedField* store = |
| - Add<HStoreNamedField>(object, HObjectAccess::ForAllocationSiteWeakNext(), |
| - site); |
| + store = Add<HStoreNamedField>(object, |
| + HObjectAccess::ForAllocationSiteWeakNext(), |
| + site); |
| store->SkipWriteBarrier(); |
| Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(), |
| object); |