Roll V8 back to 3.6

Roll back to V8 3.6 to fix x86 build, we don't have ucontext.h.

This reverts commits:
5d4cdbf7a67d3662fa0bee4efdb7edd8daec9b0b
c7cc028aaeedbbfa11c11d0b7b243b3d9e837ed9
592a9fc1d8ea420377a2e7efd0600e20b058be2b

Bug: 5688872
Change-Id: Ic961bb5e65b778e98bbfb71cce71d99fa949e995
diff --git a/src/variables.h b/src/variables.h
index f49b6e1..56c8dab 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -29,7 +29,6 @@
 #define V8_VARIABLES_H_
 
 #include "zone.h"
-#include "interface.h"
 
 namespace v8 {
 namespace internal {
@@ -41,6 +40,34 @@
 
 class Variable: public ZoneObject {
  public:
+  enum Mode {
+    // User declared variables:
+    VAR,       // declared via 'var', and 'function' declarations
+
+    CONST,     // declared via 'const' declarations
+
+    LET,       // declared via 'let' declarations
+
+    // Variables introduced by the compiler:
+    DYNAMIC,         // always require dynamic lookup (we don't know
+                     // the declaration)
+
+    DYNAMIC_GLOBAL,  // requires dynamic lookup, but we know that the
+                     // variable is global unless it has been shadowed
+                     // by an eval-introduced variable
+
+    DYNAMIC_LOCAL,   // requires dynamic lookup, but we know that the
+                     // variable is local and where it is unless it
+                     // has been shadowed by an eval-introduced
+                     // variable
+
+    INTERNAL,        // like VAR, but not user-visible (may or may not
+                     // be in a context)
+
+    TEMPORARY        // temporary variables (not user-visible), never
+                     // in a context
+  };
+
   enum Kind {
     NORMAL,
     THIS,
@@ -76,14 +103,12 @@
 
   Variable(Scope* scope,
            Handle<String> name,
-           VariableMode mode,
+           Mode mode,
            bool is_valid_lhs,
-           Kind kind,
-           InitializationFlag initialization_flag,
-           Interface* interface = Interface::NewValue());
+           Kind kind);
 
   // Printing support
-  static const char* Mode2String(VariableMode mode);
+  static const char* Mode2String(Mode mode);
 
   bool IsValidLeftHandSide() { return is_valid_LHS_; }
 
@@ -94,20 +119,17 @@
   Scope* scope() const { return scope_; }
 
   Handle<String> name() const { return name_; }
-  VariableMode mode() const { return mode_; }
-  bool has_forced_context_allocation() const {
-    return force_context_allocation_;
+  Mode mode() const { return mode_; }
+  bool is_accessed_from_inner_scope() const {
+    return is_accessed_from_inner_scope_;
   }
-  void ForceContextAllocation() {
+  void MarkAsAccessedFromInnerScope() {
     ASSERT(mode_ != TEMPORARY);
-    force_context_allocation_ = true;
+    is_accessed_from_inner_scope_ = true;
   }
   bool is_used() { return is_used_; }
   void set_is_used(bool flag) { is_used_ = flag; }
 
-  int initializer_position() { return initializer_position_; }
-  void set_initializer_position(int pos) { initializer_position_ = pos; }
-
   bool IsVariable(Handle<String> n) const {
     return !is_this() && name().is_identical_to(n);
   }
@@ -124,13 +146,6 @@
             mode_ == DYNAMIC_GLOBAL ||
             mode_ == DYNAMIC_LOCAL);
   }
-  bool is_const_mode() const {
-    return (mode_ == CONST ||
-            mode_ == CONST_HARMONY);
-  }
-  bool binding_needs_init() const {
-    return initialization_flag_ == kNeedsInitialization;
-  }
 
   bool is_global() const;
   bool is_this() const { return kind_ == THIS; }
@@ -138,7 +153,8 @@
 
   // True if the variable is named eval and not known to be shadowed.
   bool is_possibly_eval() const {
-    return IsVariable(FACTORY->eval_symbol());
+    return IsVariable(FACTORY->eval_symbol()) &&
+        (mode_ == DYNAMIC || mode_ == DYNAMIC_GLOBAL);
   }
 
   Variable* local_if_not_shadowed() const {
@@ -152,43 +168,28 @@
 
   Location location() const { return location_; }
   int index() const { return index_; }
-  InitializationFlag initialization_flag() const {
-    return initialization_flag_;
-  }
-  Interface* interface() const { return interface_; }
 
   void AllocateTo(Location location, int index) {
     location_ = location;
     index_ = index;
   }
 
-  static int CompareIndex(Variable* const* v, Variable* const* w);
-
  private:
   Scope* scope_;
   Handle<String> name_;
-  VariableMode mode_;
+  Mode mode_;
   Kind kind_;
   Location location_;
   int index_;
-  int initializer_position_;
 
-  // If this field is set, this variable references the stored locally bound
-  // variable, but it might be shadowed by variable bindings introduced by
-  // non-strict 'eval' calls between the reference scope (inclusive) and the
-  // binding scope (exclusive).
   Variable* local_if_not_shadowed_;
 
   // Valid as a LHS? (const and this are not valid LHS, for example)
   bool is_valid_LHS_;
 
   // Usage info.
-  bool force_context_allocation_;  // set by variable resolver
+  bool is_accessed_from_inner_scope_;  // set by variable resolver
   bool is_used_;
-  InitializationFlag initialization_flag_;
-
-  // Module type info.
-  Interface* interface_;
 };