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

Side by Side Diff: src/compiler/linkage.cc

Issue 693103004: Revert "Skip the CallFunctionStub when the callee function can be statically determined." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/linkage-impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 "src/code-stubs.h" 5 #include "src/code-stubs.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 24 matching lines...) Expand all
35 return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount() 35 return os << d.kind() << ":" << d.debug_name() << ":r" << d.ReturnCount()
36 << "j" << d.JSParameterCount() << "i" << d.InputCount() << "f" 36 << "j" << d.JSParameterCount() << "i" << d.InputCount() << "f"
37 << d.FrameStateCount(); 37 << d.FrameStateCount();
38 } 38 }
39 39
40 40
41 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { 41 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) {
42 if (info->function() != NULL) { 42 if (info->function() != NULL) {
43 // If we already have the function literal, use the number of parameters 43 // If we already have the function literal, use the number of parameters
44 // plus the receiver. 44 // plus the receiver.
45 return GetJSCallDescriptor(1 + info->function()->parameter_count(), zone, 45 return GetJSCallDescriptor(1 + info->function()->parameter_count(), zone);
46 CallDescriptor::kNoFlags);
47 } 46 }
48 if (!info->closure().is_null()) { 47 if (!info->closure().is_null()) {
49 // If we are compiling a JS function, use a JS call descriptor, 48 // If we are compiling a JS function, use a JS call descriptor,
50 // plus the receiver. 49 // plus the receiver.
51 SharedFunctionInfo* shared = info->closure()->shared(); 50 SharedFunctionInfo* shared = info->closure()->shared();
52 return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone, 51 return GetJSCallDescriptor(1 + shared->formal_parameter_count(), zone);
53 CallDescriptor::kNoFlags);
54 } 52 }
55 if (info->code_stub() != NULL) { 53 if (info->code_stub() != NULL) {
56 // Use the code stub interface descriptor. 54 // Use the code stub interface descriptor.
57 CallInterfaceDescriptor descriptor = 55 CallInterfaceDescriptor descriptor =
58 info->code_stub()->GetCallInterfaceDescriptor(); 56 info->code_stub()->GetCallInterfaceDescriptor();
59 return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, zone); 57 return GetStubCallDescriptor(descriptor, 0, CallDescriptor::kNoFlags, zone);
60 } 58 }
61 return NULL; // TODO(titzer): ? 59 return NULL; // TODO(titzer): ?
62 } 60 }
63 61
(...skipping 19 matching lines...) Expand all
83 // No frame. Retrieve all parameters relative to stack pointer. 81 // No frame. Retrieve all parameters relative to stack pointer.
84 DCHECK(spill_slot < 0); // Must be a parameter. 82 DCHECK(spill_slot < 0); // Must be a parameter.
85 int register_save_area_size = frame->GetRegisterSaveAreaSize(); 83 int register_save_area_size = frame->GetRegisterSaveAreaSize();
86 int offset = register_save_area_size - (spill_slot + 1) * kPointerSize + 84 int offset = register_save_area_size - (spill_slot + 1) * kPointerSize +
87 kPCOnStackSize + extra; 85 kPCOnStackSize + extra;
88 return FrameOffset::FromStackPointer(offset); 86 return FrameOffset::FromStackPointer(offset);
89 } 87 }
90 } 88 }
91 89
92 90
93 CallDescriptor* Linkage::GetJSCallDescriptor( 91 CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count) const {
94 int parameter_count, CallDescriptor::Flags flags) const { 92 return GetJSCallDescriptor(parameter_count, zone_);
95 return GetJSCallDescriptor(parameter_count, zone_, flags);
96 } 93 }
97 94
98 95
99 CallDescriptor* Linkage::GetRuntimeCallDescriptor( 96 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
100 Runtime::FunctionId function, int parameter_count, 97 Runtime::FunctionId function, int parameter_count,
101 Operator::Properties properties) const { 98 Operator::Properties properties) const {
102 return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_); 99 return GetRuntimeCallDescriptor(function, parameter_count, properties, zone_);
103 } 100 }
104 101
105 102
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 241
245 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, 242 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
246 MachineSignature* sig) { 243 MachineSignature* sig) {
247 UNIMPLEMENTED(); 244 UNIMPLEMENTED();
248 return NULL; 245 return NULL;
249 } 246 }
250 #endif // !V8_TURBOFAN_BACKEND 247 #endif // !V8_TURBOFAN_BACKEND
251 } 248 }
252 } 249 }
253 } // namespace v8::internal::compiler 250 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/linkage-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698