Home | History | Annotate | Download | only in regress
      1 // Copyright 2014 the V8 project authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Flags: --allow-natives-syntax
      6 
      7 var o = {a: undefined};
      8 
      9 function store(o, v) {
     10   o.a = v;
     11 }
     12 
     13 store(o, undefined);
     14 store(o, undefined);
     15 
     16 function f(bool) {
     17   var o = {a: undefined};
     18   if (bool) {
     19     store(o, 1);
     20   }
     21   return o;
     22 }
     23 
     24 f(false);
     25 f(false);
     26 %OptimizeFunctionOnNextCall(f);
     27 f(true);
     28