Chromium Code Reviews| Index: src/compiler/interpreter-linkage.cc |
| diff --git a/src/compiler/interpreter-linkage.cc b/src/compiler/interpreter-linkage.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..20211f35fd3aa6ec3b84573576594806fcb4f99c |
| --- /dev/null |
| +++ b/src/compiler/interpreter-linkage.cc |
| @@ -0,0 +1,48 @@ |
| +// Copyright 2015 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "src/assembler.h" |
| +#include "src/macro-assembler.h" |
| + |
| +#include "src/compiler/linkage.h" |
| +#include "src/compiler/linkage-impl.h" |
| + |
| +namespace v8 { |
| +namespace internal { |
| +namespace compiler { |
| + |
| +CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { |
| + MachineSignature::Builder types(zone, 0, 3); |
| + LocationSignature::Builder locations(zone, 0, 3); |
| + |
| + // Add registers for fixed parameters passed via interpreter dispatch. |
| + STATIC_ASSERT(0 == Linkage::kInterpreterBytecodeOffsetParameter); |
| + types.AddParam(kMachIntPtr); |
| + locations.AddParam(regloc(kInterpreterBytecodeOffsetRegister)); |
| + |
| + STATIC_ASSERT(1 == Linkage::kInterpreterBytecodeArrayParameter); |
| + types.AddParam(kMachAnyTagged); |
| + locations.AddParam(regloc(kInterpreterBytecodeArrayRegister)); |
| + |
| + STATIC_ASSERT(2 == Linkage::kInterpreterDispatchTableParameter); |
| + types.AddParam(kMachPtr); |
| + locations.AddParam(regloc(kInterpreterDispatchTableRegister)); |
| + |
| + LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); |
| + return new (zone) CallDescriptor( // -- |
| + CallDescriptor::kInterpreterDispatch, // kind |
| + kMachNone, // target MachineType |
| + target_loc, // target location |
| + types.Build(), // machine_sig |
| + locations.Build(), // location_sig |
| + 0, // stack_parameter_count |
| + Operator::kNoProperties, // properties |
| + kNoCalleeSaved, // callee-saved registers |
| + kNoCalleeSaved, // callee-saved fp regs |
| + CallDescriptor::kSupportsTailCalls, // flags |
| + "interpreter-dispatch"); |
| +} |
| +} |
|
Michael Starzinger
2015/08/07 07:59:02
nit:
} // namespace compiler
} // namespace int
|
| +} |
| +} |