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

Unified Diff: src/compiler/linkage.cc

Issue 679793003: [turbofan] reduce allocations outside of pipeline (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/linkage.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/linkage.cc
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
index 4239f9fef92493dfe70a121311973b05bfa94206..481b44353b6f97ea191ef2b31dc555897faaa4ae 100644
--- a/src/compiler/linkage.cc
+++ b/src/compiler/linkage.cc
@@ -39,28 +39,30 @@ std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
}
-Linkage::Linkage(CompilationInfo* info) : info_(info) {
+CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) {
if (info->function() != NULL) {
// If we already have the function literal, use the number of parameters
// plus the receiver.
- incoming_ = GetJSCallDescriptor(1 + info->function()->parameter_count());
- } else if (!info->closure().is_null()) {
+ return GetJSCallDescriptor(1 + info->function()->parameter_count(), zone);
+ }
+ if (!info->closure().is_null()) {
// If we are compiling a JS function, use a JS call descriptor,
// plus the receiver.
SharedFunctionInfo* shared = info->closure()->shared();
- incoming_ = GetJSCallDescriptor(1 + shared->formal_parameter_count());
- } else if (info->code_stub() != NULL) {
+ return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone);
+ }
+ if (info->code_stub() != NULL) {
// Use the code stub interface descriptor.
CallInterfaceDescriptor descriptor =
info->code_stub()->GetCallInterfaceDescriptor();
- incoming_ = GetStubCallDescriptor(descriptor);
- } else {
- incoming_ = NULL; // TODO(titzer): ?
+ return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, zone);
}
+ return NULL; // TODO(titzer): ?
}
-FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) {
+FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame,
+ int extra) const {
if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() ||
incoming_->kind() == CallDescriptor::kCallAddress) {
int offset;
@@ -87,24 +89,22 @@ FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, int extra) {
}
-CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) {
- return GetJSCallDescriptor(parameter_count, this->info_->zone());
+CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) const {
+ return GetJSCallDescriptor(parameter_count, zone_);
}
CallDescriptor* Linkage::GetRuntimeCallDescriptor(
Runtime::FunctionId function, int parameter_count,
- Operator::Properties properties) {
- return GetRuntimeCallDescriptor(function, parameter_count, properties,
- this->info_->zone());
+ Operator::Properties properties) const {
+ return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_);
}
CallDescriptor* Linkage::GetStubCallDescriptor(
CallInterfaceDescriptor descriptor, int stack_parameter_count,
- CallDescriptor::Flags flags) {
- return GetStubCallDescriptor(descriptor, stack_parameter_count, flags,
- this->info_->zone());
+ CallDescriptor::Flags flags) const {
+ return GetStubCallDescriptor(descriptor, stack_parameter_count, flags, zone_);
}
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698