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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 int* stack_param_delta) const { | 90 int* stack_param_delta) const { |
91 CallDescriptor const* other = CallDescriptorOf(node->op()); | 91 CallDescriptor const* other = CallDescriptorOf(node->op()); |
92 size_t current_input = 0; | 92 size_t current_input = 0; |
93 size_t other_input = 0; | 93 size_t other_input = 0; |
94 *stack_param_delta = 0; | 94 *stack_param_delta = 0; |
95 bool more_other = true; | 95 bool more_other = true; |
96 bool more_this = true; | 96 bool more_this = true; |
97 while (more_other || more_this) { | 97 while (more_other || more_this) { |
98 if (other_input < other->InputCount()) { | 98 if (other_input < other->InputCount()) { |
99 if (!other->GetInputLocation(other_input).IsRegister()) { | 99 if (!other->GetInputLocation(other_input).IsRegister()) { |
100 (*stack_param_delta)--; | 100 (*stack_param_delta)++; |
101 } | 101 } |
102 } else { | 102 } else { |
103 more_other = false; | 103 more_other = false; |
104 } | 104 } |
105 if (current_input < InputCount()) { | 105 if (current_input < InputCount()) { |
106 if (!GetInputLocation(current_input).IsRegister()) { | 106 if (!GetInputLocation(current_input).IsRegister()) { |
107 (*stack_param_delta)++; | 107 (*stack_param_delta)--; |
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(CallDescriptorOf(node->op())); | 115 return HasSameReturnLocationsAs(CallDescriptorOf(node->op())); |
116 } | 116 } |
117 | 117 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 } else { | 517 } else { |
518 DCHECK(loc == regloc(kContextRegister)); | 518 DCHECK(loc == regloc(kContextRegister)); |
519 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); | 519 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 | 523 |
524 } // namespace compiler | 524 } // namespace compiler |
525 } // namespace internal | 525 } // namespace internal |
526 } // namespace v8 | 526 } // namespace v8 |
OLD | NEW |