| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 locations.AddReturn(regloc(kReturnRegister2, MachineType::AnyTagged())); | 245 locations.AddReturn(regloc(kReturnRegister2, MachineType::AnyTagged())); |
| 246 } | 246 } |
| 247 | 247 |
| 248 // All parameters to the runtime call go on the stack. | 248 // All parameters to the runtime call go on the stack. |
| 249 for (int i = 0; i < js_parameter_count; i++) { | 249 for (int i = 0; i < js_parameter_count; i++) { |
| 250 locations.AddParam(LinkageLocation::ForCallerFrameSlot( | 250 locations.AddParam(LinkageLocation::ForCallerFrameSlot( |
| 251 i - js_parameter_count, MachineType::AnyTagged())); | 251 i - js_parameter_count, MachineType::AnyTagged())); |
| 252 } | 252 } |
| 253 // Add runtime function itself. | 253 // Add runtime function itself. |
| 254 locations.AddParam( | 254 locations.AddParam( |
| 255 regloc(kRuntimeCallFunctionRegister, MachineType::AnyTagged())); | 255 regloc(kRuntimeCallFunctionRegister, MachineType::Pointer())); |
| 256 | 256 |
| 257 // Add runtime call argument count. | 257 // Add runtime call argument count. |
| 258 locations.AddParam( | 258 locations.AddParam( |
| 259 regloc(kRuntimeCallArgCountRegister, MachineType::AnyTagged())); | 259 regloc(kRuntimeCallArgCountRegister, MachineType::Int32())); |
| 260 | 260 |
| 261 // Add context. | 261 // Add context. |
| 262 locations.AddParam(regloc(kContextRegister, MachineType::AnyTagged())); | 262 locations.AddParam(regloc(kContextRegister, MachineType::AnyTagged())); |
| 263 | 263 |
| 264 if (!Linkage::NeedsFrameStateInput(function_id)) { | 264 if (!Linkage::NeedsFrameStateInput(function_id)) { |
| 265 flags = static_cast<CallDescriptor::Flags>( | 265 flags = static_cast<CallDescriptor::Flags>( |
| 266 flags & ~CallDescriptor::kNeedsFrameState); | 266 flags & ~CallDescriptor::kNeedsFrameState); |
| 267 } | 267 } |
| 268 | 268 |
| 269 // The target for runtime calls is a code object. | 269 // The target for runtime calls is a code object. |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 DCHECK(loc == regloc(kContextRegister, MachineType::AnyTagged())); | 512 DCHECK(loc == regloc(kContextRegister, MachineType::AnyTagged())); |
| 513 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot, | 513 return LinkageLocation::ForCalleeFrameSlot(Frame::kContextSlot, |
| 514 MachineType::AnyTagged()); | 514 MachineType::AnyTagged()); |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 | 517 |
| 518 | 518 |
| 519 } // namespace compiler | 519 } // namespace compiler |
| 520 } // namespace internal | 520 } // namespace internal |
| 521 } // namespace v8 | 521 } // namespace v8 |
| OLD | NEW |