OLD | NEW |
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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/frame.h" | 9 #include "src/compiler/frame.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 } | 108 } |
109 } else { | 109 } else { |
110 more_this = false; | 110 more_this = false; |
111 } | 111 } |
112 ++current_input; | 112 ++current_input; |
113 ++other_input; | 113 ++other_input; |
114 } | 114 } |
115 return HasSameReturnLocationsAs(OpParameter<CallDescriptor const*>(node)); | 115 return HasSameReturnLocationsAs(OpParameter<CallDescriptor const*>(node)); |
116 } | 116 } |
117 | 117 |
118 | 118 const CallDescriptor* Linkage::ComputeIncoming(Zone* zone, |
119 CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { | 119 CompilationInfo* info) { |
120 DCHECK(!info->IsStub()); | 120 DCHECK(!info->IsStub()); |
121 if (info->has_literal()) { | 121 if (info->has_literal()) { |
122 // If we already have the function literal, use the number of parameters | 122 // If we already have the function literal, use the number of parameters |
123 // plus the receiver. | 123 // plus the receiver. |
124 return GetJSCallDescriptor(zone, info->is_osr(), | 124 return GetJSCallDescriptor(zone, info->is_osr(), |
125 1 + info->literal()->parameter_count(), | 125 1 + info->literal()->parameter_count(), |
126 CallDescriptor::kNoFlags); | 126 CallDescriptor::kNoFlags); |
127 } | 127 } |
128 if (!info->closure().is_null()) { | 128 if (!info->closure().is_null()) { |
129 // If we are compiling a JS function, use a JS call descriptor, | 129 // If we are compiling a JS function, use a JS call descriptor, |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 } else { | 446 } else { |
447 DCHECK(loc == regloc(kContextRegister)); | 447 DCHECK(loc == regloc(kContextRegister)); |
448 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); | 448 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); |
449 } | 449 } |
450 } | 450 } |
451 | 451 |
452 | 452 |
453 } // namespace compiler | 453 } // namespace compiler |
454 } // namespace internal | 454 } // namespace internal |
455 } // namespace v8 | 455 } // namespace v8 |
OLD | NEW |