Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: src/hydrogen-instructions.h

Issue 303583002: Small changes in preparation for Hydrogen-generated KeyedLoadGeneric (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 4f83aafa72e0515cf4a419f1d1cc16f25ba29a81..29da29e60fd6802579e043c9f69810eae08ac04c 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -7776,6 +7776,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);
@@ -7785,7 +7787,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); }

Powered by Google App Engine
This is Rietveld 408576698