From b59f2b700b5a5bbeacd050cea39ba25831aba2ae Mon Sep 17 00:00:00 2001 From: "fschneider@chromium.org" Date: Tue, 28 Jun 2011 08:49:01 +0000 Subject: [PATCH] Fix a bug in %_GetCachedArrayIndex. This inline runtime function had the wrong super class. It did not cause any problems since it is only used in our natives and never in a test context. Review URL: http://codereview.chromium.org/7253004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen-instructions.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 8e122a2..a0cab6a 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -2762,9 +2762,16 @@ class HHasCachedArrayIndex: public HUnaryPredicate { }; -class HGetCachedArrayIndex: public HUnaryPredicate { +class HGetCachedArrayIndex: public HUnaryOperation { public: - explicit HGetCachedArrayIndex(HValue* value) : HUnaryPredicate(value) { } + explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) { + set_representation(Representation::Tagged()); + SetFlag(kUseGVN); + } + + virtual Representation RequiredInputRepresentation(int index) const { + return Representation::Tagged(); + } DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex) -- 2.7.4