Revision: 18867
Author: [email protected]
Date: Tue Jan 28 09:42:24 2014 UTC
Log: Remove obsolete instruction HOuterContext.
HOuterContext can be expressed in terms of HLoadNamedField.
[email protected]
Review URL: https://codereview.chromium.org/131513015
http://code.google.com/p/v8/source/detail?r=18867
Modified:
/branches/bleeding_edge/src/arm/lithium-arm.cc
/branches/bleeding_edge/src/arm/lithium-arm.h
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/ia32/lithium-ia32.cc
/branches/bleeding_edge/src/ia32/lithium-ia32.h
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.h
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
/branches/bleeding_edge/src/x64/lithium-x64.h
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc Fri Jan 24 16:01:15 2014
UTC
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc Tue Jan 28 09:42:24 2014
UTC
@@ -1040,12 +1040,6 @@
return DefineAsRegister(new(zone()) LContext);
}
-
-
-LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
- return DefineAsRegister(new(zone()) LOuterContext(context));
-}
LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.h Fri Jan 24 14:05:11 2014
UTC
+++ /branches/bleeding_edge/src/arm/lithium-arm.h Tue Jan 28 09:42:24 2014
UTC
@@ -145,7 +145,6 @@
V(NumberTagU) \
V(NumberUntagD) \
V(OsrEntry) \
- V(OuterContext) \
V(Parameter) \
V(Power) \
V(PushArgument) \
@@ -1775,18 +1774,6 @@
};
-class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LOuterContext(LOperand* context) {
- inputs_[0] = context;
- }
-
- LOperand* context() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
-};
-
-
class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
public:
explicit LDeclareGlobals(LOperand* context) {
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Fri Jan 24
16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue Jan 28
09:42:24 2014 UTC
@@ -3617,14 +3617,6 @@
ASSERT(result.is(cp));
}
}
-
-
-void LCodeGen::DoOuterContext(LOuterContext* instr) {
- Register context = ToRegister(instr->context());
- Register result = ToRegister(instr->result());
- __ ldr(result,
- MemOperand(context,
Context::SlotOffset(Context::PREVIOUS_INDEX)));
-}
void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Fri Jan 24 16:01:15
2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Tue Jan 28 09:42:24
2014 UTC
@@ -149,7 +149,6 @@
V(Mod) \
V(Mul) \
V(OsrEntry) \
- V(OuterContext) \
V(Parameter) \
V(Power) \
V(PushArgument) \
@@ -2121,29 +2120,6 @@
set_representation(Representation::Tagged());
SetFlag(kUseGVN);
}
-
- virtual bool IsDeletable() const V8_OVERRIDE { return true; }
-};
-
-
-class HOuterContext V8_FINAL : public HUnaryOperation {
- public:
- DECLARE_INSTRUCTION_FACTORY_P1(HOuterContext, HValue*);
-
- DECLARE_CONCRETE_INSTRUCTION(OuterContext);
-
- virtual Representation RequiredInputRepresentation(int index)
V8_OVERRIDE {
- return Representation::Tagged();
- }
-
- protected:
- virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
-
- private:
- explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) {
- set_representation(Representation::Tagged());
- SetFlag(kUseGVN);
- }
virtual bool IsDeletable() const V8_OVERRIDE { return true; }
};
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Fri Jan 24 16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Tue Jan 28 09:42:24 2014 UTC
@@ -4693,7 +4693,8 @@
HValue* context = environment()->context();
int length = current_info()->scope()->ContextChainLength(var->scope());
while (length-- > 0) {
- context = Add<HOuterContext>(context);
+ context = AddLoadNamedField(
+ context, HObjectAccess::ForContextSlot(Context::PREVIOUS_INDEX));
}
return context;
}
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri Jan 24
16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Tue Jan 28
09:42:24 2014 UTC
@@ -3760,14 +3760,6 @@
ASSERT(result.is(esi));
}
}
-
-
-void LCodeGen::DoOuterContext(LOuterContext* instr) {
- Register context = ToRegister(instr->context());
- Register result = ToRegister(instr->result());
- __ mov(result,
- Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX)));
-}
void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Fri Jan 24 16:01:15
2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Tue Jan 28 09:42:24
2014 UTC
@@ -1125,12 +1125,6 @@
return DefineAsRegister(new(zone()) LContext);
}
-
-
-LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
- return DefineAsRegister(new(zone()) LOuterContext(context));
-}
LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.h Fri Jan 24 16:01:15
2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.h Tue Jan 28 09:42:24
2014 UTC
@@ -145,7 +145,6 @@
V(NumberTagU) \
V(NumberUntagD) \
V(OsrEntry) \
- V(OuterContext) \
V(Parameter) \
V(Power) \
V(PushArgument) \
@@ -1778,18 +1777,6 @@
};
-class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LOuterContext(LOperand* context) {
- inputs_[0] = context;
- }
-
- LOperand* context() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
-};
-
-
class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
public:
explicit LDeclareGlobals(LOperand* context) {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Jan 24
16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Jan 28
09:42:24 2014 UTC
@@ -3492,14 +3492,6 @@
ASSERT(result.is(cp));
}
}
-
-
-void LCodeGen::DoOuterContext(LOuterContext* instr) {
- Register context = ToRegister(instr->context());
- Register result = ToRegister(instr->result());
- __ lw(result,
- MemOperand(context, Context::SlotOffset(Context::PREVIOUS_INDEX)));
-}
void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Fri Jan 24 16:01:15
2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Jan 28 09:42:24
2014 UTC
@@ -1043,12 +1043,6 @@
return DefineAsRegister(new(zone()) LContext);
}
-
-
-LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
- return DefineAsRegister(new(zone()) LOuterContext(context));
-}
LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Fri Jan 24 14:05:11
2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.h Tue Jan 28 09:42:24
2014 UTC
@@ -144,7 +144,6 @@
V(NumberTagU) \
V(NumberUntagD) \
V(OsrEntry) \
- V(OuterContext) \
V(Parameter) \
V(Power) \
V(PushArgument) \
@@ -1753,18 +1752,6 @@
};
-class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LOuterContext(LOperand* context) {
- inputs_[0] = context;
- }
-
- LOperand* context() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
-};
-
-
class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
public:
explicit LDeclareGlobals(LOperand* context) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Fri Jan 24
16:01:15 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Tue Jan 28
09:42:24 2014 UTC
@@ -3329,14 +3329,6 @@
ASSERT(result.is(rsi));
}
}
-
-
-void LCodeGen::DoOuterContext(LOuterContext* instr) {
- Register context = ToRegister(instr->context());
- Register result = ToRegister(instr->result());
- __ movp(result,
- Operand(context, Context::SlotOffset(Context::PREVIOUS_INDEX)));
-}
void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Fri Jan 24 16:01:15 2014
UTC
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Tue Jan 28 09:42:24 2014
UTC
@@ -1047,12 +1047,6 @@
return DefineAsRegister(new(zone()) LContext);
}
-
-
-LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
- LOperand* context = UseRegisterAtStart(instr->value());
- return DefineAsRegister(new(zone()) LOuterContext(context));
-}
LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.h Fri Jan 24 14:05:11 2014
UTC
+++ /branches/bleeding_edge/src/x64/lithium-x64.h Tue Jan 28 09:42:24 2014
UTC
@@ -143,7 +143,6 @@
V(NumberTagU) \
V(NumberUntagD) \
V(OsrEntry) \
- V(OuterContext) \
V(Parameter) \
V(Power) \
V(PushArgument) \
@@ -1720,18 +1719,6 @@
};
-class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> {
- public:
- explicit LOuterContext(LOperand* context) {
- inputs_[0] = context;
- }
-
- LOperand* context() { return inputs_[0]; }
-
- DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer-context")
-};
-
-
class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> {
public:
explicit LDeclareGlobals(LOperand* context) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.