tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cptn-no-iter.js (693B)


      1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 13.7.3.6
      5 description: >
      6    Completion value when no iteration occurs
      7 info: |
      8    IterationStatement : while ( Expression ) Statement
      9 
     10    1. Let V = undefined.
     11    2. Repeat
     12       a. Let exprRef be the result of evaluating Expression.
     13       b. Let exprValue be GetValue(exprRef).
     14       c. ReturnIfAbrupt(exprValue).
     15       d. If ToBoolean(exprValue) is false, return NormalCompletion(V).
     16 ---*/
     17 
     18 assert.sameValue(eval('1; while (false) { }'), undefined);
     19 assert.sameValue(eval('2; while (false) { 3; }'), undefined);
     20 
     21 reportCompare(0, 0);