Merge V8 5.2.361.47  DO NOT MERGE

https://chromium.googlesource.com/v8/v8/+/5.2.361.47

FPIIM-449

Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/src/typing-asm.cc b/src/typing-asm.cc
index 7482c4f..e541539 100644
--- a/src/typing-asm.cc
+++ b/src/typing-asm.cc
@@ -44,7 +44,7 @@
       root_(root),
       valid_(true),
       allow_simd_(false),
-      property_info_(NULL),
+      property_info_(nullptr),
       intish_(0),
       stdlib_types_(zone),
       stdlib_heap_types_(zone),
@@ -62,7 +62,8 @@
       in_function_(false),
       building_function_tables_(false),
       visiting_exports_(false),
-      cache_(TypeCache::Get()) {
+      cache_(TypeCache::Get()),
+      bounds_(zone) {
   InitializeAstVisitor(isolate);
   InitializeStdlib();
 }
@@ -79,16 +80,16 @@
   if (!scope->is_function_scope()) FAIL(fun, "not at function scope");
 
   ExpressionStatement* use_asm = fun->body()->first()->AsExpressionStatement();
-  if (use_asm == NULL) FAIL(fun, "missing \"use asm\"");
+  if (use_asm == nullptr) FAIL(fun, "missing \"use asm\"");
   Literal* use_asm_literal = use_asm->expression()->AsLiteral();
-  if (use_asm_literal == NULL) FAIL(fun, "missing \"use asm\"");
+  if (use_asm_literal == nullptr) FAIL(fun, "missing \"use asm\"");
   if (!use_asm_literal->raw_value()->AsString()->IsOneByteEqualTo("use asm"))
     FAIL(fun, "missing \"use asm\"");
 
   // Module parameters.
   for (int i = 0; i < scope->num_parameters(); ++i) {
     Variable* param = scope->parameter(i);
-    DCHECK(GetType(param) == NULL);
+    DCHECK(GetType(param) == nullptr);
     SetType(param, Type::None());
   }
 
@@ -96,7 +97,7 @@
 
   // Set all globals to type Any.
   VariableDeclaration* decl = scope->function();
-  if (decl != NULL) SetType(decl->proxy()->var(), Type::None());
+  if (decl != nullptr) SetType(decl->proxy()->var(), Type::None());
   RECURSE(VisitDeclarations(scope->declarations()));
 
   // Validate global variables.
@@ -105,15 +106,15 @@
   // Validate function annotations.
   for (int i = 0; i < decls->length(); ++i) {
     FunctionDeclaration* decl = decls->at(i)->AsFunctionDeclaration();
-    if (decl != NULL) {
+    if (decl != nullptr) {
       RECURSE(VisitFunctionAnnotation(decl->fun()));
       Variable* var = decl->proxy()->var();
-      if (property_info_ != NULL) {
+      if (property_info_ != nullptr) {
         SetVariableInfo(var, property_info_);
-        property_info_ = NULL;
+        property_info_ = nullptr;
       }
       SetType(var, computed_type_);
-      DCHECK(GetType(var) != NULL);
+      DCHECK(GetType(var) != nullptr);
     }
   }
 
@@ -125,7 +126,7 @@
   // Validate function bodies.
   for (int i = 0; i < decls->length(); ++i) {
     FunctionDeclaration* decl = decls->at(i)->AsFunctionDeclaration();
-    if (decl != NULL) {
+    if (decl != nullptr) {
       RECURSE(VisitWithExpectation(decl->fun(), Type::Any(), "UNREACHABLE"));
       if (!computed_type_->IsFunction()) {
         FAIL(decl->fun(), "function literal expected to be a function");
@@ -147,13 +148,13 @@
 void AsmTyper::VisitVariableDeclaration(VariableDeclaration* decl) {
   Variable* var = decl->proxy()->var();
   if (var->location() != VariableLocation::PARAMETER) {
-    if (GetType(var) == NULL) {
+    if (GetType(var) == nullptr) {
       SetType(var, Type::Any());
     } else {
       DCHECK(!GetType(var)->IsFunction());
     }
   }
-  DCHECK(GetType(var) != NULL);
+  DCHECK(GetType(var) != nullptr);
   intish_ = 0;
 }
 
@@ -175,14 +176,14 @@
   Type* result_type = Type::Undefined();
   if (body->length() > 0) {
     ReturnStatement* stmt = body->last()->AsReturnStatement();
-    if (stmt != NULL) {
+    if (stmt != nullptr) {
       Literal* literal = stmt->expression()->AsLiteral();
       Type* old_expected = expected_type_;
       expected_type_ = Type::Any();
       if (literal) {
         RECURSE(VisitLiteral(literal, true));
       } else {
-        RECURSE(VisitExpressionAnnotation(stmt->expression(), NULL, true));
+        RECURSE(VisitExpressionAnnotation(stmt->expression(), nullptr, true));
       }
       expected_type_ = old_expected;
       result_type = computed_type_;
@@ -197,18 +198,18 @@
     good = false;
     if (i >= body->length()) break;
     ExpressionStatement* stmt = body->at(i)->AsExpressionStatement();
-    if (stmt == NULL) break;
+    if (stmt == nullptr) break;
     Assignment* expr = stmt->expression()->AsAssignment();
-    if (expr == NULL || expr->is_compound()) break;
+    if (expr == nullptr || expr->is_compound()) break;
     VariableProxy* proxy = expr->target()->AsVariableProxy();
-    if (proxy == NULL) break;
+    if (proxy == nullptr) break;
     Variable* var = proxy->var();
     if (var->location() != VariableLocation::PARAMETER || var->index() != i)
       break;
     RECURSE(VisitExpressionAnnotation(expr->value(), var, false));
-    if (property_info_ != NULL) {
+    if (property_info_ != nullptr) {
       SetVariableInfo(var, property_info_);
-      property_info_ = NULL;
+      property_info_ = nullptr;
     }
     SetType(var, computed_type_);
     type->AsFunction()->InitParameter(i, computed_type_);
@@ -224,10 +225,10 @@
                                          bool is_return) {
   // Normal +x or x|0 annotations.
   BinaryOperation* bin = expr->AsBinaryOperation();
-  if (bin != NULL) {
-    if (var != NULL) {
+  if (bin != nullptr) {
+    if (var != nullptr) {
       VariableProxy* proxy = bin->left()->AsVariableProxy();
-      if (proxy == NULL) {
+      if (proxy == nullptr) {
         FAIL(bin->left(), "expected variable for type annotation");
       }
       if (proxy->var() != var) {
@@ -235,7 +236,7 @@
       }
     }
     Literal* right = bin->right()->AsLiteral();
-    if (right != NULL) {
+    if (right != nullptr) {
       switch (bin->op()) {
         case Token::MUL:  // We encode +x as x*1.0
           if (right->raw_value()->ContainsDot() &&
@@ -269,10 +270,10 @@
   }
 
   Call* call = expr->AsCall();
-  if (call != NULL) {
+  if (call != nullptr) {
     VariableProxy* proxy = call->expression()->AsVariableProxy();
-    if (proxy != NULL) {
-      VariableInfo* info = GetVariableInfo(proxy->var(), false);
+    if (proxy != nullptr) {
+      VariableInfo* info = GetVariableInfo(proxy->var());
       if (!info ||
           (!info->is_check_function && !info->is_constructor_function)) {
         if (allow_simd_) {
@@ -448,14 +449,14 @@
   if (!in_function_) {
     FAIL(stmt, "for statement inside module body");
   }
-  if (stmt->init() != NULL) {
+  if (stmt->init() != nullptr) {
     RECURSE(Visit(stmt->init()));
   }
-  if (stmt->cond() != NULL) {
+  if (stmt->cond() != nullptr) {
     RECURSE(VisitWithExpectation(stmt->cond(), cache_.kAsmSigned,
                                  "for condition expected to be integer"));
   }
-  if (stmt->next() != NULL) {
+  if (stmt->next() != nullptr) {
     RECURSE(Visit(stmt->next()));
   }
   RECURSE(Visit(stmt->body()));
@@ -494,11 +495,11 @@
   Scope* scope = expr->scope();
   DCHECK(scope->is_function_scope());
 
-  if (!expr->bounds().upper->IsFunction()) {
+  if (!bounds_.get(expr).upper->IsFunction()) {
     FAIL(expr, "invalid function literal");
   }
 
-  Type* type = expr->bounds().upper;
+  Type* type = bounds_.get(expr).upper;
   Type* save_return_type = return_type_;
   return_type_ = type->AsFunction()->Result();
   in_function_ = true;
@@ -556,40 +557,31 @@
 
 
 void AsmTyper::VisitVariableProxy(VariableProxy* expr) {
-  VisitVariableProxy(expr, false);
-}
-
-void AsmTyper::VisitVariableProxy(VariableProxy* expr, bool assignment) {
   Variable* var = expr->var();
-  VariableInfo* info = GetVariableInfo(var, false);
-  if (!assignment && !in_function_ && !building_function_tables_ &&
-      !visiting_exports_) {
+  VariableInfo* info = GetVariableInfo(var);
+  if (!in_function_ && !building_function_tables_ && !visiting_exports_) {
     if (var->location() != VariableLocation::PARAMETER || var->index() >= 3) {
       FAIL(expr, "illegal variable reference in module body");
     }
   }
-  if (info == NULL || info->type == NULL) {
+  if (info == nullptr || info->type == nullptr) {
     if (var->mode() == TEMPORARY) {
       SetType(var, Type::Any());
-      info = GetVariableInfo(var, false);
+      info = GetVariableInfo(var);
     } else {
       FAIL(expr, "unbound variable");
     }
   }
-  if (property_info_ != NULL) {
+  if (property_info_ != nullptr) {
     SetVariableInfo(var, property_info_);
-    property_info_ = NULL;
+    property_info_ = nullptr;
   }
   Type* type = Type::Intersect(info->type, expected_type_, zone());
-  if (type->Is(cache_.kAsmInt)) {
-    type = cache_.kAsmInt;
-  }
-  info->type = type;
+  if (type->Is(cache_.kAsmInt)) type = cache_.kAsmInt;
   intish_ = 0;
   IntersectResult(expr, type);
 }
 
-
 void AsmTyper::VisitLiteral(Literal* expr, bool is_return) {
   intish_ = 0;
   Handle<Object> value = expr->value();
@@ -683,13 +675,35 @@
   RECURSE(VisitWithExpectation(
       expr->value(), type, "assignment value expected to match surrounding"));
   Type* target_type = StorageType(computed_type_);
+
   if (expr->target()->IsVariableProxy()) {
+    // Assignment to a local or context variable.
+    VariableProxy* proxy = expr->target()->AsVariableProxy();
     if (intish_ != 0) {
       FAIL(expr, "intish or floatish assignment");
     }
     expected_type_ = target_type;
-    VisitVariableProxy(expr->target()->AsVariableProxy(), true);
+    Variable* var = proxy->var();
+    VariableInfo* info = GetVariableInfo(var);
+    if (info == nullptr || info->type == nullptr) {
+      if (var->mode() == TEMPORARY) {
+        SetType(var, Type::Any());
+        info = GetVariableInfo(var);
+      } else {
+        FAIL(proxy, "unbound variable");
+      }
+    }
+    if (property_info_ != nullptr) {
+      SetVariableInfo(var, property_info_);
+      property_info_ = nullptr;
+    }
+    Type* type = Type::Intersect(info->type, expected_type_, zone());
+    if (type->Is(cache_.kAsmInt)) type = cache_.kAsmInt;
+    info->type = type;
+    intish_ = 0;
+    IntersectResult(proxy, type);
   } else if (expr->target()->IsProperty()) {
+    // Assignment to a property: should be a heap assignment {H[x] = y}.
     int32_t value_intish = intish_;
     Property* property = expr->target()->AsProperty();
     RECURSE(VisitWithExpectation(property->obj(), Type::Any(),
@@ -745,13 +759,13 @@
     }
     // TODO(bradnelson): Fix the parser and then un-comment this part
     // BinaryOperation* bin = expr->key()->AsBinaryOperation();
-    // if (bin == NULL || bin->op() != Token::BIT_AND) {
+    // if (bin == nullptr || bin->op() != Token::BIT_AND) {
     //   FAIL(expr->key(), "expected & in call");
     // }
     // RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmSigned,
     //                              "array index expected to be integer"));
     // Literal* right = bin->right()->AsLiteral();
-    // if (right == NULL || right->raw_value()->ContainsDot()) {
+    // if (right == nullptr || right->raw_value()->ContainsDot()) {
     //   FAIL(right, "call mask must be integer");
     // }
     // RECURSE(VisitWithExpectation(bin->right(), cache_.kAsmSigned,
@@ -774,13 +788,13 @@
         RECURSE(Visit(expr->key()));
       } else {
         BinaryOperation* bin = expr->key()->AsBinaryOperation();
-        if (bin == NULL || bin->op() != Token::SAR) {
+        if (bin == nullptr || bin->op() != Token::SAR) {
           FAIL(expr->key(), "expected >> in heap access");
         }
         RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmSigned,
                                      "array index expected to be integer"));
         Literal* right = bin->right()->AsLiteral();
-        if (right == NULL || right->raw_value()->ContainsDot()) {
+        if (right == nullptr || right->raw_value()->ContainsDot()) {
           FAIL(bin->right(), "heap access shift must be integer");
         }
         RECURSE(VisitWithExpectation(bin->right(), cache_.kAsmSigned,
@@ -790,7 +804,7 @@
           FAIL(right, "heap access shift must match element size");
         }
       }
-      expr->key()->set_bounds(Bounds(cache_.kAsmSigned));
+      bounds_.set(expr->key(), Bounds(cache_.kAsmSigned));
     }
     Type* result_type;
     if (type->Is(cache_.kAsmIntArrayElement)) {
@@ -830,18 +844,18 @@
 
 bool AsmTyper::IsStdlibObject(Expression* expr) {
   VariableProxy* proxy = expr->AsVariableProxy();
-  if (proxy == NULL) {
+  if (proxy == nullptr) {
     return false;
   }
   Variable* var = proxy->var();
-  VariableInfo* info = GetVariableInfo(var, false);
+  VariableInfo* info = GetVariableInfo(var);
   if (info) {
     if (info->standard_member == kStdlib) return true;
   }
   if (var->location() != VariableLocation::PARAMETER || var->index() != 0) {
     return false;
   }
-  info = GetVariableInfo(var, true);
+  info = MakeVariableInfo(var);
   info->type = Type::Object();
   info->standard_member = kStdlib;
   return true;
@@ -851,13 +865,13 @@
 Expression* AsmTyper::GetReceiverOfPropertyAccess(Expression* expr,
                                                   const char* name) {
   Property* property = expr->AsProperty();
-  if (property == NULL) {
-    return NULL;
+  if (property == nullptr) {
+    return nullptr;
   }
   Literal* key = property->key()->AsLiteral();
-  if (key == NULL || !key->IsPropertyName() ||
+  if (key == nullptr || !key->IsPropertyName() ||
       !key->AsPropertyName()->IsUtf8EqualTo(CStrVector(name))) {
-    return NULL;
+    return nullptr;
   }
   return property->obj();
 }
@@ -904,7 +918,7 @@
     return;
   }
 
-  property_info_ = NULL;
+  property_info_ = nullptr;
 
   // Only recurse at this point so that we avoid needing
   // stdlib.Math to have a real type.
@@ -913,12 +927,12 @@
 
   // For heap view or function table access.
   if (computed_type_->IsArray()) {
-    VisitHeapAccess(expr, false, NULL);
+    VisitHeapAccess(expr, false, nullptr);
     return;
   }
 
   VariableProxy* proxy = expr->obj()->AsVariableProxy();
-  if (proxy != NULL) {
+  if (proxy != nullptr) {
     Variable* var = proxy->var();
     if (var->location() == VariableLocation::PARAMETER && var->index() == 1) {
       // foreign.x - Function represent as () -> Any
@@ -941,7 +955,7 @@
   }
   // Handle polymorphic stdlib functions specially.
   Expression* arg0 = args->at(0);
-  Type* arg0_type = arg0->bounds().upper;
+  Type* arg0_type = bounds_.get(arg0).upper;
   switch (standard_member) {
     case kMathFround: {
       if (!arg0_type->Is(cache_.kAsmFloat) &&
@@ -970,8 +984,8 @@
         FAIL(arg0, "illegal function argument type");
       }
       if (args->length() > 1) {
-        Type* other = Type::Intersect(args->at(0)->bounds().upper,
-                                      args->at(1)->bounds().upper, zone());
+        Type* other = Type::Intersect(bounds_.get(args->at(0)).upper,
+                                      bounds_.get(args->at(1)).upper, zone());
         if (!other->Is(cache_.kAsmFloat) && !other->Is(cache_.kAsmDouble) &&
             !other->Is(cache_.kAsmSigned)) {
           FAIL(arg0, "function arguments types don't match");
@@ -992,10 +1006,10 @@
   if (proxy) {
     standard_member = VariableAsStandardMember(proxy->var());
   }
-  if (!in_function_ && (proxy == NULL || standard_member != kMathFround)) {
+  if (!in_function_ && (proxy == nullptr || standard_member != kMathFround)) {
     FAIL(expr, "calls forbidden outside function bodies");
   }
-  if (proxy == NULL && !expr->expression()->IsProperty()) {
+  if (proxy == nullptr && !expr->expression()->IsProperty()) {
     FAIL(expr, "calls must be to bound variables or function tables");
   }
   if (computed_type_->IsFunction()) {
@@ -1018,8 +1032,8 @@
         }
       }
       intish_ = 0;
-      expr->expression()->set_bounds(
-          Bounds(Type::Function(Type::Any(), zone())));
+      bounds_.set(expr->expression(),
+                  Bounds(Type::Function(Type::Any(), zone())));
       IntersectResult(expr, expected_type);
     } else {
       if (fun_type->Arity() != args->length()) {
@@ -1071,7 +1085,7 @@
 
 
 void AsmTyper::VisitCallRuntime(CallRuntime* expr) {
-  // Allow runtime calls for now.
+  FAIL(expr, "runtime call not allowed");
 }
 
 
@@ -1185,11 +1199,12 @@
       RECURSE(VisitIntegerBitwiseOperator(expr, Type::Any(), cache_.kAsmIntQ,
                                           cache_.kAsmSigned, true));
       if (expr->left()->IsCall() && expr->op() == Token::BIT_OR &&
-          Type::Number()->Is(expr->left()->bounds().upper)) {
+          Type::Number()->Is(bounds_.get(expr->left()).upper)) {
         // Force the return types of foreign functions.
-        expr->left()->set_bounds(Bounds(cache_.kAsmSigned));
+        bounds_.set(expr->left(), Bounds(cache_.kAsmSigned));
       }
-      if (in_function_ && !expr->left()->bounds().upper->Is(cache_.kAsmIntQ)) {
+      if (in_function_ &&
+          !bounds_.get(expr->left()).upper->Is(cache_.kAsmIntQ)) {
         FAIL(expr->left(), "intish required");
       }
       return;
@@ -1199,7 +1214,7 @@
       Literal* left = expr->left()->AsLiteral();
       if (left && left->value()->IsBoolean()) {
         if (left->ToBooleanIsTrue()) {
-          left->set_bounds(Bounds(cache_.kSingletonOne));
+          bounds_.set(left, Bounds(cache_.kSingletonOne));
           RECURSE(VisitWithExpectation(expr->right(), cache_.kAsmIntQ,
                                        "not operator expects an integer"));
           IntersectResult(expr, cache_.kAsmSigned);
@@ -1286,13 +1301,13 @@
                  expr->right()->AsLiteral()->raw_value()->AsNumber() == 1.0) {
         // For unary +, expressed as x * 1.0
         if (expr->left()->IsCall() &&
-            Type::Number()->Is(expr->left()->bounds().upper)) {
+            Type::Number()->Is(bounds_.get(expr->left()).upper)) {
           // Force the return types of foreign functions.
-          expr->left()->set_bounds(Bounds(cache_.kAsmDouble));
-          left_type = expr->left()->bounds().upper;
+          bounds_.set(expr->left(), Bounds(cache_.kAsmDouble));
+          left_type = bounds_.get(expr->left()).upper;
         }
         if (!(expr->left()->IsProperty() &&
-              Type::Number()->Is(expr->left()->bounds().upper))) {
+              Type::Number()->Is(bounds_.get(expr->left()).upper))) {
           if (!left_type->Is(cache_.kAsmSigned) &&
               !left_type->Is(cache_.kAsmUnsigned) &&
               !left_type->Is(cache_.kAsmFixnum) &&
@@ -1310,7 +1325,7 @@
                  !expr->right()->AsLiteral()->raw_value()->ContainsDot() &&
                  expr->right()->AsLiteral()->raw_value()->AsNumber() == -1.0) {
         // For unary -, expressed as x * -1
-        expr->right()->set_bounds(Bounds(cache_.kAsmDouble));
+        bounds_.set(expr->right(), Bounds(cache_.kAsmDouble));
         IntersectResult(expr, cache_.kAsmDouble);
         return;
       } else if (type->Is(cache_.kAsmFloat) && expr->op() != Token::MOD) {
@@ -1502,11 +1517,12 @@
 
 void AsmTyper::VisitLibraryAccess(ObjectTypeMap* map, Property* expr) {
   Literal* key = expr->key()->AsLiteral();
-  if (key == NULL || !key->IsPropertyName())
+  if (key == nullptr || !key->IsPropertyName())
     FAIL(expr, "invalid key used on stdlib member");
   Handle<String> name = key->AsPropertyName();
   VariableInfo* info = LibType(map, name);
-  if (info == NULL || info->type == NULL) FAIL(expr, "unknown stdlib function");
+  if (info == nullptr || info->type == nullptr)
+    FAIL(expr, "unknown stdlib function");
   SetResult(expr, info->type);
   property_info_ = info;
 }
@@ -1517,55 +1533,47 @@
   base::SmartArrayPointer<char> aname = name->ToCString();
   ObjectTypeMap::iterator i = map->find(std::string(aname.get()));
   if (i == map->end()) {
-    return NULL;
+    return nullptr;
   }
   return i->second;
 }
 
 
 void AsmTyper::SetType(Variable* variable, Type* type) {
-  VariableInfo* info = GetVariableInfo(variable, true);
+  VariableInfo* info = MakeVariableInfo(variable);
   info->type = type;
 }
 
 
 Type* AsmTyper::GetType(Variable* variable) {
-  VariableInfo* info = GetVariableInfo(variable, false);
-  if (!info) return NULL;
+  VariableInfo* info = GetVariableInfo(variable);
+  if (!info) return nullptr;
   return info->type;
 }
 
+AsmTyper::VariableInfo* AsmTyper::GetVariableInfo(Variable* variable) {
+  ZoneHashMap* map =
+      in_function_ ? &local_variable_type_ : &global_variable_type_;
+  ZoneHashMap::Entry* entry =
+      map->Lookup(variable, ComputePointerHash(variable));
+  if (!entry && in_function_) {
+    entry =
+        global_variable_type_.Lookup(variable, ComputePointerHash(variable));
+  }
+  return entry ? reinterpret_cast<VariableInfo*>(entry->value) : nullptr;
+}
 
-AsmTyper::VariableInfo* AsmTyper::GetVariableInfo(Variable* variable,
-                                                  bool setting) {
-  ZoneHashMap::Entry* entry;
-  ZoneHashMap* map;
-  if (in_function_) {
-    map = &local_variable_type_;
-  } else {
-    map = &global_variable_type_;
-  }
-  if (setting) {
-    entry = map->LookupOrInsert(variable, ComputePointerHash(variable),
-                                ZoneAllocationPolicy(zone()));
-  } else {
-    entry = map->Lookup(variable, ComputePointerHash(variable));
-    if (!entry && in_function_) {
-      entry =
-          global_variable_type_.Lookup(variable, ComputePointerHash(variable));
-    }
-  }
-  if (!entry) return NULL;
-  if (!entry->value) {
-    if (!setting) return NULL;
-    entry->value = new (zone()) VariableInfo;
-  }
+AsmTyper::VariableInfo* AsmTyper::MakeVariableInfo(Variable* variable) {
+  ZoneHashMap* map =
+      in_function_ ? &local_variable_type_ : &global_variable_type_;
+  ZoneHashMap::Entry* entry = map->LookupOrInsert(
+      variable, ComputePointerHash(variable), ZoneAllocationPolicy(zone()));
+  if (!entry->value) entry->value = new (zone()) VariableInfo;
   return reinterpret_cast<VariableInfo*>(entry->value);
 }
 
-
 void AsmTyper::SetVariableInfo(Variable* variable, const VariableInfo* info) {
-  VariableInfo* dest = GetVariableInfo(variable, true);
+  VariableInfo* dest = MakeVariableInfo(variable);
   dest->type = info->type;
   dest->is_check_function = info->is_check_function;
   dest->is_constructor_function = info->is_constructor_function;
@@ -1575,7 +1583,7 @@
 
 AsmTyper::StandardMember AsmTyper::VariableAsStandardMember(
     Variable* variable) {
-  VariableInfo* info = GetVariableInfo(variable, false);
+  VariableInfo* info = GetVariableInfo(variable);
   if (!info) return kNone;
   return info->standard_member;
 }
@@ -1583,14 +1591,14 @@
 
 void AsmTyper::SetResult(Expression* expr, Type* type) {
   computed_type_ = type;
-  expr->set_bounds(Bounds(computed_type_));
+  bounds_.set(expr, Bounds(computed_type_));
 }
 
 
 void AsmTyper::IntersectResult(Expression* expr, Type* type) {
   computed_type_ = type;
   Type* bounded_type = Type::Intersect(computed_type_, expected_type_, zone());
-  expr->set_bounds(Bounds(bounded_type));
+  bounds_.set(expr, Bounds(bounded_type));
 }