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

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

Issue 974213002: Extract ParseInfo from CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/globals.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 21 matching lines...) Expand all
32 32
33 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) { 33 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d) {
34 // TODO(svenpanne) Output properties etc. and be less cryptic. 34 // TODO(svenpanne) Output properties etc. and be less cryptic.
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->code_stub() != NULL) {
43 // Use the code stub interface descriptor.
44 CallInterfaceDescriptor descriptor =
45 info->code_stub()->GetCallInterfaceDescriptor();
46 return GetStubCallDescriptor(info->isolate(), zone, descriptor, 0,
47 CallDescriptor::kNoFlags,
48 Operator::kNoProperties);
49 }
42 if (info->function() != NULL) { 50 if (info->function() != NULL) {
43 // If we already have the function literal, use the number of parameters 51 // If we already have the function literal, use the number of parameters
44 // plus the receiver. 52 // plus the receiver.
45 return GetJSCallDescriptor(zone, info->is_osr(), 53 return GetJSCallDescriptor(zone, info->is_osr(),
46 1 + info->function()->parameter_count(), 54 1 + info->function()->parameter_count(),
47 CallDescriptor::kNoFlags); 55 CallDescriptor::kNoFlags);
48 } 56 }
49 if (!info->closure().is_null()) { 57 if (!info->closure().is_null()) {
50 // If we are compiling a JS function, use a JS call descriptor, 58 // If we are compiling a JS function, use a JS call descriptor,
51 // plus the receiver. 59 // plus the receiver.
52 SharedFunctionInfo* shared = info->closure()->shared(); 60 SharedFunctionInfo* shared = info->closure()->shared();
53 return GetJSCallDescriptor(zone, info->is_osr(), 61 return GetJSCallDescriptor(zone, info->is_osr(),
54 1 + shared->internal_formal_parameter_count(), 62 1 + shared->internal_formal_parameter_count(),
55 CallDescriptor::kNoFlags); 63 CallDescriptor::kNoFlags);
56 } 64 }
57 if (info->code_stub() != NULL) {
58 // Use the code stub interface descriptor.
59 CallInterfaceDescriptor descriptor =
60 info->code_stub()->GetCallInterfaceDescriptor();
61 return GetStubCallDescriptor(info->isolate(), zone, descriptor, 0,
62 CallDescriptor::kNoFlags,
63 Operator::kNoProperties);
64 }
65 return NULL; // TODO(titzer): ? 65 return NULL; // TODO(titzer): ?
66 } 66 }
67 67
68 68
69 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame, 69 FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame,
70 int extra) const { 70 int extra) const {
71 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() || 71 if (frame->GetSpillSlotCount() > 0 || incoming_->IsJSFunctionCall() ||
72 incoming_->kind() == CallDescriptor::kCallAddress) { 72 incoming_->kind() == CallDescriptor::kCallAddress) {
73 int offset; 73 int offset;
74 int register_save_area_size = frame->GetRegisterSaveAreaSize(); 74 int register_save_area_size = frame->GetRegisterSaveAreaSize();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, 183 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
184 const MachineSignature* sig) { 184 const MachineSignature* sig) {
185 UNIMPLEMENTED(); 185 UNIMPLEMENTED();
186 return NULL; 186 return NULL;
187 } 187 }
188 #endif // !V8_TURBOFAN_BACKEND 188 #endif // !V8_TURBOFAN_BACKEND
189 } 189 }
190 } 190 }
191 } // namespace v8::internal::compiler 191 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698