Make sure that bce creates constants of right type
authordanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 31 Jul 2013 16:41:51 +0000 (16:41 +0000)
committerdanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 31 Jul 2013 16:41:51 +0000 (16:41 +0000)
R=verwaest@chromium.org

Review URL: https://chromiumcodereview.appspot.com/21371004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen-bce.cc
src/hydrogen-instructions.h

index b03590e1151f2c38d485534852d10207e3662729..7c81ec145cbd4e73dc289259c369ed234395a4d5 100644 (file)
@@ -261,8 +261,8 @@ class BoundsCheckBbData: public ZoneObject {
     if (index_context == NULL) return false;
 
     Zone* zone = BasicBlock()->zone();
-    HConstant* new_constant = HConstant::New(
-        zone, index_context, new_offset);
+    HConstant* new_constant = HConstant::New(zone, index_context,
+                                             new_offset, representation);
     if (*add == NULL) {
       new_constant->InsertBefore(check);
       (*add) = HAdd::New(zone, index_context, original_value, new_constant);
index 5831bbdc3e725fa26047b73ebdb79891a8d13f6e..5ba7fb19e0e364a3c30e570cf0c911812e01ae75 100644 (file)
@@ -3644,6 +3644,7 @@ class HArgumentsObject: public HTemplateInstruction<0> {
 class HConstant: public HTemplateInstruction<0> {
  public:
   DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t);
+  DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation);
   DECLARE_INSTRUCTION_FACTORY_P1(HConstant, double);
   DECLARE_INSTRUCTION_FACTORY_P1(HConstant, Handle<Object>);
   DECLARE_INSTRUCTION_FACTORY_P1(HConstant, ExternalReference);