X87: StubCallInterfaceDescriptor takes a context register.

port r22448

original commit message:
  StubCallInterfaceDescriptor and CallInterfaceDescriptor are unified under a base class InterfaceDescriptor.

  Handling of the context register had to be massaged to effect the unification. This will make it easier
  to call hydrogen code stubs directly from crankshaft.

BUG=
R=weiliang.lin@intel.com

Review URL: https://codereview.chromium.org/399313005

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22459 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6f23f4fe
This diff is collapsed.
......@@ -1120,8 +1120,7 @@ LInstruction* LChunkBuilder::DoCallJSFunction(
LInstruction* LChunkBuilder::DoCallWithDescriptor(
HCallWithDescriptor* instr) {
const CallInterfaceDescriptor* descriptor = instr->descriptor();
const InterfaceDescriptor* descriptor = instr->descriptor();
LOperand* target = UseRegisterOrConstantAtStart(instr->target());
ZoneList<LOperand*> ops(instr->OperandCount(), zone());
ops.Add(target, zone());
......@@ -2458,7 +2457,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
CodeStubInterfaceDescriptor* descriptor =
info()->code_stub()->GetInterfaceDescriptor();
int index = static_cast<int>(instr->index());
Register reg = descriptor->GetParameterRegister(index);
Register reg = descriptor->GetEnvironmentParameterRegister(index);
return DefineFixed(result, reg);
}
}
......
......@@ -1878,11 +1878,11 @@ class LCallJSFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> {
class LCallWithDescriptor V8_FINAL : public LTemplateResultInstruction<1> {
public:
LCallWithDescriptor(const CallInterfaceDescriptor* descriptor,
LCallWithDescriptor(const InterfaceDescriptor* descriptor,
const ZoneList<LOperand*>& operands,
Zone* zone)
: inputs_(descriptor->environment_length() + 1, zone) {
ASSERT(descriptor->environment_length() + 1 == operands.length());
: inputs_(descriptor->GetRegisterParameterCount() + 1, zone) {
ASSERT(descriptor->GetRegisterParameterCount() + 1 == operands.length());
inputs_.AddAll(operands, zone);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment