Commit de627a69 authored by plind44@gmail.com's avatar plind44@gmail.com

MIPS: Remove HCallGlobal and merge uses with HCallNamed.

Port r18595 (957a383)

BUG=
R=plind44@gmail.com

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

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5b2b13fc
......@@ -3927,17 +3927,6 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
}
void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
ASSERT(ToRegister(instr->context()).is(cp));
ASSERT(ToRegister(instr->result()).is(v0));
int arity = instr->arity();
Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity);
__ li(a2, Operand(instr->name()));
CallCode(ic, RelocInfo::CODE_TARGET, instr);
}
void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) {
ASSERT(ToRegister(instr->result()).is(v0));
CallKnownFunction(instr->hydrogen()->target(),
......
......@@ -318,12 +318,6 @@ void LCallNamed::PrintDataTo(StringStream* stream) {
}
void LCallGlobal::PrintDataTo(StringStream* stream) {
SmartArrayPointer<char> name_string = name()->ToCString();
stream->Add("%s #%d / ", name_string.get(), arity());
}
void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
stream->Add("#%d / ", arity());
}
......@@ -1194,12 +1188,6 @@ LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
}
LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
LOperand* context = UseFixed(instr->context(), cp);
return MarkAsCall(DefineFixed(new(zone()) LCallGlobal(context), v0), instr);
}
LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
return MarkAsCall(DefineFixed(new(zone()) LCallKnownGlobal, v0), instr);
}
......
......@@ -54,7 +54,6 @@ class LCodeGen;
V(Branch) \
V(CallConstantFunction) \
V(CallFunction) \
V(CallGlobal) \
V(CallKeyed) \
V(CallKnownGlobal) \
V(CallNamed) \
......@@ -1900,24 +1899,6 @@ class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> {
};
class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> {
public:
explicit LCallGlobal(LOperand* context) {
inputs_[0] = context;
}
LOperand* context() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global")
DECLARE_HYDROGEN_ACCESSOR(CallGlobal)
virtual void PrintDataTo(StringStream* stream);
Handle<String> name() const {return hydrogen()->name(); }
int arity() const { return hydrogen()->argument_count() - 1; }
};
class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> {
public:
DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global")
......
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