Version 3.3.4

Implemented API to disallow code generation from strings for a context (issue 1258).

Fixed bug with whitespaces in parseInt (issue 955).

Fixed bug with == comparison of Date objects (issue 1356).

Added GYP variables for ARM code generation: v8_can_use_vfp_instructions, v8_can_use_unaligned_accesses and v8_use_arm_eabi_hardfloat.


git-svn-id: http://v8.googlecode.com/svn/trunk@7779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 4fb7fec..82fdfa7 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -31,6 +31,7 @@
 #include "v8.h"
 
 #include "code-stubs.h"
+#include "data-flow.h"
 #include "small-pointer-list.h"
 #include "string-stream.h"
 #include "zone.h"
@@ -554,6 +555,8 @@
     representation_ = r;
   }
 
+  virtual bool IsConvertibleToInteger() const { return true; }
+
   HType type() const { return type_; }
   void set_type(HType type) {
     ASSERT(HasNoUses());
@@ -1922,7 +1925,8 @@
       : inputs_(2),
         merged_index_(merged_index),
         phi_id_(-1),
-        is_live_(false) {
+        is_live_(false),
+        is_convertible_to_integer_(true) {
     for (int i = 0; i < Representation::kNumRepresentations; i++) {
       non_phi_uses_[i] = 0;
       indirect_uses_[i] = 0;
@@ -2000,6 +2004,14 @@
   }
   virtual Opcode opcode() const { return HValue::kPhi; }
 
+  virtual bool IsConvertibleToInteger() const {
+    return is_convertible_to_integer_;
+  }
+
+  void set_is_convertible_to_integer(bool b) {
+    is_convertible_to_integer_ = b;
+  }
+
  protected:
   virtual void DeleteFromGraph();
   virtual void InternalSetOperandAt(int index, HValue* value) {
@@ -2014,6 +2026,7 @@
   int indirect_uses_[Representation::kNumRepresentations];
   int phi_id_;
   bool is_live_;
+  bool is_convertible_to_integer_;
 };
 
 
@@ -2044,6 +2057,14 @@
     return Representation::None();
   }
 
+  virtual bool IsConvertibleToInteger() const {
+    if (handle_->IsSmi()) return true;
+    if (handle_->IsHeapNumber() &&
+        (HeapNumber::cast(*handle_)->value() ==
+         static_cast<double>(NumberToInt32(*handle_)))) return true;
+    return false;
+  }
+
   virtual bool EmitAtUses() { return !representation().IsDouble(); }
   virtual void PrintDataTo(StringStream* stream);
   virtual HType CalculateInferredType();