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

Unified Diff: src/code-stubs.cc

Issue 2188993003: [stubs] Port CreateWeakCellStub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stack overflow Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index bb593d6e6ead79ae8f6656b0a5032eee5bb6dec4..9a985f35286eb83edbc0a89fb432775b9a48044d 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -4120,9 +4120,6 @@ void FastCloneShallowArrayStub::InitializeDescriptor(
}
-void CreateWeakCellStub::InitializeDescriptor(CodeStubDescriptor* d) {}
-
-
void RegExpConstructResultStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
descriptor->Initialize(
@@ -4710,9 +4707,8 @@ void CreateAllocationSiteStub::GenerateAssembly(
Node* site = assembler->Allocate(size, compiler::CodeAssembler::kPretenured);
// Store the map
- Node* map =
- assembler->HeapConstant(isolate()->factory()->allocation_site_map());
- assembler->StoreMapNoWriteBarrier(site, map);
+ assembler->StoreObjectFieldRoot(site, AllocationSite::kMapOffset,
+ Heap::kAllocationSiteMapRootIndex);
Node* kind =
assembler->SmiConstant(Smi::FromInt(GetInitialFastElementsKind()));
@@ -4733,10 +4729,8 @@ void CreateAllocationSiteStub::GenerateAssembly(
site, AllocationSite::kPretenureCreateCountOffset, zero);
// Store an empty fixed array for the code dependency.
- Node* empty_fixed_array =
- assembler->HeapConstant(isolate()->factory()->empty_fixed_array());
- assembler->StoreObjectFieldNoWriteBarrier(
- site, AllocationSite::kDependentCodeOffset, empty_fixed_array);
+ assembler->StoreObjectFieldRoot(site, AllocationSite::kDependentCodeOffset,
+ Heap::kEmptyFixedArrayRootIndex);
// Link the object to the allocation site list
Node* site_list = assembler->ExternalConstant(
@@ -4762,6 +4756,13 @@ void CreateAllocationSiteStub::GenerateAssembly(
assembler->Return(site);
}
+void CreateWeakCellStub::GenerateAssembly(CodeStubAssembler* assembler) const {
+ assembler->Return(assembler->CreateWeakCellInFeedbackVector(
+ assembler->Parameter(Descriptor::kVector),
+ assembler->Parameter(Descriptor::kSlot),
+ assembler->Parameter(Descriptor::kValue)));
+}
+
void ArrayNoArgumentConstructorStub::GenerateAssembly(
CodeStubAssembler* assembler) const {
typedef compiler::Node Node;

Powered by Google App Engine
This is Rietveld 408576698