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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler.h" | 6 #include "src/compiler.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/frame.h" | 8 #include "src/compiler/frame.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 STATIC_ASSERT(3 == Linkage::kInterpreterBytecodeArrayParameter); | 406 STATIC_ASSERT(3 == Linkage::kInterpreterBytecodeArrayParameter); |
407 types.AddParam(kMachAnyTagged); | 407 types.AddParam(kMachAnyTagged); |
408 locations.AddParam(regloc(kInterpreterBytecodeArrayRegister)); | 408 locations.AddParam(regloc(kInterpreterBytecodeArrayRegister)); |
409 | 409 |
410 STATIC_ASSERT(4 == Linkage::kInterpreterDispatchTableParameter); | 410 STATIC_ASSERT(4 == Linkage::kInterpreterDispatchTableParameter); |
411 types.AddParam(kMachPtr); | 411 types.AddParam(kMachPtr); |
412 locations.AddParam(regloc(kInterpreterDispatchTableRegister)); | 412 locations.AddParam(regloc(kInterpreterDispatchTableRegister)); |
413 | 413 |
414 STATIC_ASSERT(5 == Linkage::kInterpreterContextParameter); | 414 STATIC_ASSERT(5 == Linkage::kInterpreterContextParameter); |
415 types.AddParam(kMachAnyTagged); | 415 types.AddParam(kMachAnyTagged); |
416 #if defined(V8_TARGET_ARCH_IA32) | 416 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X87) |
417 locations.AddParam( | 417 locations.AddParam( |
418 LinkageLocation::ForCallerFrameSlot(kInterpreterContextSpillSlot)); | 418 LinkageLocation::ForCallerFrameSlot(kInterpreterContextSpillSlot)); |
419 #else | 419 #else |
420 locations.AddParam(regloc(kContextRegister)); | 420 locations.AddParam(regloc(kContextRegister)); |
421 #endif | 421 #endif |
422 | 422 |
423 LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); | 423 LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); |
424 return new (zone) CallDescriptor( // -- | 424 return new (zone) CallDescriptor( // -- |
425 CallDescriptor::kCallCodeObject, // kind | 425 CallDescriptor::kCallCodeObject, // kind |
426 kMachNone, // target MachineType | 426 kMachNone, // target MachineType |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 return LinkageLocation::ForCalleeFrameSlot(spill_index); | 514 return LinkageLocation::ForCalleeFrameSlot(spill_index); |
515 } else { | 515 } else { |
516 // Parameter. Use the assigned location from the incoming call descriptor. | 516 // Parameter. Use the assigned location from the incoming call descriptor. |
517 int parameter_index = 1 + index; // skip index 0, which is the target. | 517 int parameter_index = 1 + index; // skip index 0, which is the target. |
518 return incoming_->GetInputLocation(parameter_index); | 518 return incoming_->GetInputLocation(parameter_index); |
519 } | 519 } |
520 } | 520 } |
521 } // namespace compiler | 521 } // namespace compiler |
522 } // namespace internal | 522 } // namespace internal |
523 } // namespace v8 | 523 } // namespace v8 |
OLD | NEW |