Home | History | Annotate | Download | only in regress
      1 // Copyright 2015 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 function check(f, result) {
      8   %OptimizeFunctionOnNextCall(f);
      9   assertEquals(result, f());
     10 }
     11 
     12 var x = 17;
     13 function generic_load() { return x; }
     14 check(generic_load, 17);
     15 
     16 function generic_store() { x = 13; return x; }
     17 check(generic_store, 13);
     18