| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "code-stubs.h" | 7 #include "code-stubs.h" |
| 8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
| 9 #include "lithium.h" | 9 #include "lithium.h" |
| 10 | 10 |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 493 |
| 494 // Pretenuring memento creation count field. | 494 // Pretenuring memento creation count field. |
| 495 Add<HStoreNamedField>(object, | 495 Add<HStoreNamedField>(object, |
| 496 HObjectAccess::ForAllocationSiteOffset( | 496 HObjectAccess::ForAllocationSiteOffset( |
| 497 AllocationSite::kPretenureCreateCountOffset), | 497 AllocationSite::kPretenureCreateCountOffset), |
| 498 graph()->GetConstant0()); | 498 graph()->GetConstant0()); |
| 499 | 499 |
| 500 // Store an empty fixed array for the code dependency. | 500 // Store an empty fixed array for the code dependency. |
| 501 HConstant* empty_fixed_array = | 501 HConstant* empty_fixed_array = |
| 502 Add<HConstant>(isolate()->factory()->empty_fixed_array()); | 502 Add<HConstant>(isolate()->factory()->empty_fixed_array()); |
| 503 HStoreNamedField* store = Add<HStoreNamedField>( | 503 Add<HStoreNamedField>( |
| 504 object, | 504 object, |
| 505 HObjectAccess::ForAllocationSiteOffset( | 505 HObjectAccess::ForAllocationSiteOffset( |
| 506 AllocationSite::kDependentCodeOffset), | 506 AllocationSite::kDependentCodeOffset), |
| 507 empty_fixed_array); | 507 empty_fixed_array); |
| 508 | 508 |
| 509 // Link the object to the allocation site list | 509 // Link the object to the allocation site list |
| 510 HValue* site_list = Add<HConstant>( | 510 HValue* site_list = Add<HConstant>( |
| 511 ExternalReference::allocation_sites_list_address(isolate())); | 511 ExternalReference::allocation_sites_list_address(isolate())); |
| 512 HValue* site = Add<HLoadNamedField>( | 512 HValue* site = Add<HLoadNamedField>( |
| 513 site_list, static_cast<HValue*>(NULL), | 513 site_list, static_cast<HValue*>(NULL), |
| 514 HObjectAccess::ForAllocationSiteList()); | 514 HObjectAccess::ForAllocationSiteList()); |
| 515 store = Add<HStoreNamedField>(object, | 515 // TODO(mvstanton): This is a store to a weak pointer, which we may want to |
| 516 // mark as such in order to skip the write barrier, once we have a unified |
| 517 // system for weakness. For now we decided to keep it like this because having |
| 518 // an initial write barrier backed store makes this pointer strong until the |
| 519 // next GC, and allocation sites are designed to survive several GCs anyway. |
| 520 Add<HStoreNamedField>( |
| 521 object, |
| 516 HObjectAccess::ForAllocationSiteOffset(AllocationSite::kWeakNextOffset), | 522 HObjectAccess::ForAllocationSiteOffset(AllocationSite::kWeakNextOffset), |
| 517 site); | 523 site); |
| 518 store->SkipWriteBarrier(); | |
| 519 Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(), | 524 Add<HStoreNamedField>(site_list, HObjectAccess::ForAllocationSiteList(), |
| 520 object); | 525 object); |
| 521 | 526 |
| 522 HInstruction* feedback_vector = GetParameter(0); | 527 HInstruction* feedback_vector = GetParameter(0); |
| 523 HInstruction* slot = GetParameter(1); | 528 HInstruction* slot = GetParameter(1); |
| 524 Add<HStoreKeyed>(feedback_vector, slot, object, FAST_ELEMENTS, | 529 Add<HStoreKeyed>(feedback_vector, slot, object, FAST_ELEMENTS, |
| 525 INITIALIZING_STORE); | 530 INITIALIZING_STORE); |
| 526 return feedback_vector; | 531 return feedback_vector; |
| 527 } | 532 } |
| 528 | 533 |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 return BuildRegExpConstructResult(length, index, input); | 1493 return BuildRegExpConstructResult(length, index, input); |
| 1489 } | 1494 } |
| 1490 | 1495 |
| 1491 | 1496 |
| 1492 Handle<Code> RegExpConstructResultStub::GenerateCode() { | 1497 Handle<Code> RegExpConstructResultStub::GenerateCode() { |
| 1493 return DoGenerateCode(this); | 1498 return DoGenerateCode(this); |
| 1494 } | 1499 } |
| 1495 | 1500 |
| 1496 | 1501 |
| 1497 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
| OLD | NEW |