From: danno@chromium.org Date: Tue, 27 May 2014 15:15:49 +0000 (+0000) Subject: Small changes in preparation for Hydrogen-generated KeyedLoadGeneric X-Git-Tag: upstream/4.7.83~8935 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f929e7a54ac131f55a23eedb8a633c0a95aee60;p=platform%2Fupstream%2Fv8.git Small changes in preparation for Hydrogen-generated KeyedLoadGeneric R=mvstanton@chromium.org Review URL: https://codereview.chromium.org/303583002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h index 5fdf67418..71a20f4ae 100644 --- a/src/arm/lithium-arm.h +++ b/src/arm/lithium-arm.h @@ -424,6 +424,7 @@ class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: + virtual bool IsControl() const V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; diff --git a/src/arm64/lithium-arm64.h b/src/arm64/lithium-arm64.h index 72ae57db3..1da3dd836 100644 --- a/src/arm64/lithium-arm64.h +++ b/src/arm64/lithium-arm64.h @@ -1288,6 +1288,7 @@ class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: + virtual bool IsControl() const V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 388f92f58..ef9f6d4ae 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -2904,6 +2904,7 @@ bool HConstant::EmitAtUses() { if (UseCount() == 0) return true; if (IsCell()) return false; if (representation().IsDouble()) return false; + if (representation().IsExternal()) return false; return true; } diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index b7f50a1db..74faf556c 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -7777,6 +7777,8 @@ class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> { class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { public: + DECLARE_INSTRUCTION_FACTORY_P2(HLoadFieldByIndex, HValue*, HValue*); + HLoadFieldByIndex(HValue* object, HValue* index) { SetOperandAt(0, object); @@ -7786,7 +7788,11 @@ class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { } virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { - return Representation::Tagged(); + if (index == 1) { + return Representation::Smi(); + } else { + return Representation::Tagged(); + } } HValue* object() { return OperandAt(0); } diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h index 5a612b751..e7b0d5b42 100644 --- a/src/ia32/lithium-ia32.h +++ b/src/ia32/lithium-ia32.h @@ -415,6 +415,7 @@ class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: + virtual bool IsControl() const V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h index 954974ce6..cf6be5941 100644 --- a/src/mips/lithium-mips.h +++ b/src/mips/lithium-mips.h @@ -421,6 +421,7 @@ class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: + virtual bool IsControl() const V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; diff --git a/src/x64/lithium-x64.h b/src/x64/lithium-x64.h index 3f228249f..ef407898f 100644 --- a/src/x64/lithium-x64.h +++ b/src/x64/lithium-x64.h @@ -429,6 +429,7 @@ class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: + virtual bool IsControl() const V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) };