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

Unified Diff: src/compiler/code-stub-assembler.cc

Issue 1674633002: Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove CodeStubAssembler::ContextParameter. Created 4 years, 9 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
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/fast-accessor-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/code-stub-assembler.cc
diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc
index ac10a98c5c0fc10b6aca5ebc258924806a0c3e1e..a62e131f5b8c45ce3f836a2a88a697f6ab7cc45d 100644
--- a/src/compiler/code-stub-assembler.cc
+++ b/src/compiler/code-stub-assembler.cc
@@ -28,24 +28,27 @@ CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
const CallInterfaceDescriptor& descriptor,
Code::Flags flags, const char* name,
size_t result_size)
- : raw_assembler_(new RawMachineAssembler(
- isolate, new (zone) Graph(zone),
+ : CodeStubAssembler(
+ isolate, zone,
Linkage::GetStubCallDescriptor(
isolate, zone, descriptor, descriptor.GetStackParameterCount(),
CallDescriptor::kNoFlags, Operator::kNoProperties,
- MachineType::AnyTagged(), result_size))),
- flags_(flags),
- name_(name),
- code_generated_(false),
- variables_(zone) {}
+ MachineType::AnyTagged(), result_size),
+ flags, name) {}
CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
int parameter_count, Code::Flags flags,
const char* name)
- : raw_assembler_(new RawMachineAssembler(
- isolate, new (zone) Graph(zone),
- Linkage::GetJSCallDescriptor(zone, false, parameter_count,
- CallDescriptor::kNoFlags))),
+ : CodeStubAssembler(isolate, zone, Linkage::GetJSCallDescriptor(
+ zone, false, parameter_count,
+ CallDescriptor::kNoFlags),
+ flags, name) {}
+
+CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
+ CallDescriptor* call_descriptor,
+ Code::Flags flags, const char* name)
+ : raw_assembler_(new RawMachineAssembler(isolate, new (zone) Graph(zone),
+ call_descriptor)),
flags_(flags),
name_(name),
code_generated_(false),
@@ -109,11 +112,18 @@ Node* CodeStubAssembler::HeapNumberMapConstant() {
return HeapConstant(isolate()->factory()->heap_number_map());
}
+Node* CodeStubAssembler::NullConstant() {
+ return LoadRoot(Heap::kNullValueRootIndex);
+}
+
+Node* CodeStubAssembler::UndefinedConstant() {
+ return LoadRoot(Heap::kUndefinedValueRootIndex);
+}
+
Node* CodeStubAssembler::Parameter(int value) {
return raw_assembler_->Parameter(value);
}
-
void CodeStubAssembler::Return(Node* value) {
return raw_assembler_->Return(value);
}
@@ -207,13 +217,14 @@ Node* CodeStubAssembler::WordIsSmi(Node* a) {
IntPtrConstant(0));
}
-Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset) {
- return raw_assembler_->Load(MachineType::AnyTagged(), buffer,
- IntPtrConstant(offset));
+Node* CodeStubAssembler::LoadBufferObject(Node* buffer, int offset,
+ MachineType rep) {
+ return raw_assembler_->Load(rep, buffer, IntPtrConstant(offset));
}
-Node* CodeStubAssembler::LoadObjectField(Node* object, int offset) {
- return raw_assembler_->Load(MachineType::AnyTagged(), object,
+Node* CodeStubAssembler::LoadObjectField(Node* object, int offset,
+ MachineType rep) {
+ return raw_assembler_->Load(rep, object,
IntPtrConstant(offset - kHeapObjectTag));
}
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/fast-accessor-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698