<commit_before>﻿{

  Copyright (c) 2009-2010 RemObjects Software. See LICENSE.txt for more details.

}
namespace RemObjects.Script.EcmaScript;

interface


uses
  System.Collections.Generic,
  System.Text,
  Microsoft,
  RemObjects.Script,
  RemObjects.Script.EcmaScript.Internal;


type
  GlobalObject = public partial class(EcmaScriptObject)
  public
    method CreateArray: EcmaScriptObject;

    method ArrayIsArray(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayCtor(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayToString(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayToLocaleString(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayConcat(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayJoin(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayPop(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayPush(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReverse(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayShift(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySlice(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySort(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySplice(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayUnshift(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayIndexOf(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayEvery(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayLastIndexOf(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySome(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayMap(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayForeach(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayFilter(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReduce(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReduceRight(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;

    method DefaultCompare(aCaller: ExecutionContext; aSelf: Object; params Args: Array of Object): Object;
  end;
  RemObjects.Script.EcmaScript.Internal.EcmaScriptArrayObject = public class(EcmaScriptObject)
  private
    fItems: List<Object> := new List<Object>;
  public
    constructor(aRoot: GlobalObject; aLength: Integer);
    constructor(aCapacity: Integer; aRoot: GlobalObject);

    class var &Constructor: System.Reflection.ConstructorInfo := typeof(EcmaScriptArrayObject).GetConstructor([typeof(Integer), typeof(GlobalObject)]); readonly; 
    class var Method_AddValue: System.Reflection.MethodInfo := typeof(EcmaScriptArrayObject).GetMethod('AddValue', [typeof(Object)]); readonly;
    method AddValues(aItems: Array of Object): EcmaScriptArrayObject;
    method AddValue(aItem: Object);
    method Put(aExecutionContext: ExecutionContext; aName: String; aValue: Object; aThrow: Integer): Object; override;
    method Get(aExecutionContext: ExecutionContext; aFlags: Integer; aName: String): Object; override;
    method PutIndex(aName: Int32; aValue: Object): Object; 
    method GetIndex(aName: Int32): Object; 
    method GetOwnProperty(aName: String): PropertyValue; override;
    property ToArray: array of Object read fItems.ToArray;
    property Items: List<Object> read fItems;
    method GetNames: IEnumerator<String>; override;
  end;

  EcmaScriptArrayObjectObject = class(EcmaScriptFunctionObject)
  private
  public
    constructor (aOwner: GlobalObject);

    method Construct(context: ExecutionContext; params args: array of Object): Object; override;
  end;
implementation
<commit_msg>0: Array should be public<commit_after>﻿{

  Copyright (c) 2009-2010 RemObjects Software. See LICENSE.txt for more details.

}
namespace RemObjects.Script.EcmaScript;

interface


uses
  System.Collections.Generic,
  System.Text,
  Microsoft,
  RemObjects.Script,
  RemObjects.Script.EcmaScript.Internal;


type
  GlobalObject = public partial class(EcmaScriptObject)
  public
    method CreateArray: EcmaScriptObject;

    method ArrayIsArray(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayCtor(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayToString(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayToLocaleString(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayConcat(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayJoin(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayPop(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayPush(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReverse(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayShift(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySlice(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySort(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySplice(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayUnshift(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayIndexOf(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayEvery(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayLastIndexOf(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArraySome(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayMap(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayForeach(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayFilter(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReduce(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;
    method ArrayReduceRight(aCaller: ExecutionContext;aSelf: Object; params Args: array of Object): Object;

    method DefaultCompare(aCaller: ExecutionContext; aSelf: Object; params Args: Array of Object): Object;
  end;
  RemObjects.Script.EcmaScript.EcmaScriptArrayObject = public class(EcmaScriptObject)
  private
    fItems: List<Object> := new List<Object>;
  public
    constructor(aRoot: GlobalObject; aLength: Integer);
    constructor(aCapacity: Integer; aRoot: GlobalObject);

    class var &Constructor: System.Reflection.ConstructorInfo := typeof(EcmaScriptArrayObject).GetConstructor([typeof(Integer), typeof(GlobalObject)]); readonly; 
    class var Method_AddValue: System.Reflection.MethodInfo := typeof(EcmaScriptArrayObject).GetMethod('AddValue', [typeof(Object)]); readonly;
    method AddValues(aItems: Array of Object): EcmaScriptArrayObject;
    method AddValue(aItem: Object);
    method Put(aExecutionContext: ExecutionContext; aName: String; aValue: Object; aThrow: Integer): Object; override;
    method Get(aExecutionContext: ExecutionContext; aFlags: Integer; aName: String): Object; override;
    method PutIndex(aName: Int32; aValue: Object): Object; 
    method GetIndex(aName: Int32): Object; 
    method GetOwnProperty(aName: String): PropertyValue; override;
    property ToArray: array of Object read fItems.ToArray;
    property Items: List<Object> read fItems;
    method GetNames: IEnumerator<String>; override;
  end;

  EcmaScriptArrayObjectObject = class(EcmaScriptFunctionObject)
  private
  public
    constructor (aOwner: GlobalObject);

    method Construct(context: ExecutionContext; params args: array of Object): Object; override;
  end;
implementation

{'fraction_non_alphanumeric': 0.08955223880597014, 'fraction_numerical': 0.0028483536515893815, 'mean_word_length': 5.944620253164557, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4895493', 'n_tokens_mistral': 2488, 'n_tokens_neox': 2477, 'n_words': 768}