Пример #1
0
 public GeneratorClosedException(EcmaValue returnValue)
 {
     this.ReturnValue = returnValue;
 }
Пример #2
0
 public static EcmaValue ToBigUInt64(this EcmaValue value)
 {
     throw new NotSupportedException();
 }
Пример #3
0
 public static int Compare(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #4
0
 public static EcmaValue Negate64(EcmaValue x)
 {
     throw new NotSupportedException();
 }
Пример #5
0
 public static ulong ToUInt64(EcmaValue value)
 {
     throw new NotSupportedException();
 }
Пример #6
0
 public static EcmaValue BitwiseOr64(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #7
0
 public static EcmaValue LeftShift(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #8
0
 public void ResolveHandler(EcmaValue value)
 {
     HandleResult(PromiseState.Fulfilled, value);
 }
Пример #9
0
 public void RejectHandler(EcmaValue value)
 {
     HandleResult(PromiseState.Rejected, value);
 }
Пример #10
0
 protected virtual PromiseState GetState(out EcmaValue value)
 {
     value = default;
     return(PromiseState.Pending);
 }
Пример #11
0
 private EcmaPropertyKey(EcmaValue value)
     : this()
 {
     this.value = value;
 }
Пример #12
0
 public void SetValueInBuffer(int index, EcmaValue value)
 {
     value = CoerceValue(value);
     Guard.BufferNotDetached(this);
     SetValueInBufferImpl(index, value);
 }
Пример #13
0
 public EcmaRuntimeException(EcmaValue value)
     : base(ToString(value))
 {
     this.value = value;
 }
Пример #14
0
 void IGeneratorContext.Return(EcmaValue value)
 {
     ReturnFromGenerator(value);
 }
Пример #15
0
 public EcmaValue CreateIterResultObject(EcmaValue value)
 {
     return(EcmaValueUtility.CreateIterResultObject(value, done));
 }
Пример #16
0
 public EcmaSet Add(EcmaValue key)
 {
     SetItem(key, key);
     return(this);
 }
Пример #17
0
 public static EcmaValue Multiply(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #18
0
        private void WritePropertyValue(TextWriter writer, Stack <RuntimeObject> stack, EcmaValue value)
        {
            switch (value.Type)
            {
            case EcmaValueType.Null:
                writer.Write("null");
                break;

            case EcmaValueType.Boolean:
                writer.Write(value.ToBoolean() ? "true" : "false");
                break;

            case EcmaValueType.Number:
                writer.Write(value.IsFinite ? value.ToString() : "null");
                break;

            case EcmaValueType.String:
                WriteString(writer, value.ToString());
                break;

            case EcmaValueType.Object:
                if (!value.IsCallable)
                {
                    if (EcmaArray.IsArray(value))
                    {
                        SerializeJsonArray(writer, stack, value.ToObject());
                    }
                    else
                    {
                        SerializeJsonObject(writer, stack, value.ToObject());
                    }
                }
                break;
            }
        }
Пример #19
0
 public static EcmaValue ExclusiveOr64(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #20
0
 private EcmaValue TransformValue(RuntimeObject holder, EcmaPropertyKey property, EcmaValue value)
 {
     if (value.Type == EcmaValueType.Object)
     {
         EcmaValue toJson = value[WellKnownProperty.ToJSON];
         if (toJson.IsCallable)
         {
             value = toJson.Call(value, property.ToValue());
         }
     }
     if (replacer != EcmaValue.Undefined)
     {
         value = replacer.Call(holder, property.ToValue(), value);
     }
     if (value.Type == EcmaValueType.Object)
     {
         EcmaValue primitive = EcmaValueUtility.UnboxPrimitiveObject(value);
         switch (primitive.Type)
         {
         case EcmaValueType.Number:
         case EcmaValueType.String:
         case EcmaValueType.Boolean:
             return(primitive);
         }
     }
     return(value);
 }
Пример #21
0
 public static EcmaValue RightShift64(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #22
0
 public EcmaJsonWriter(string indentString, EcmaValue replacer)
     : this(indentString) {
     this.replacer = replacer;
 }
Пример #23
0
 public static bool TryParse(string inputString, out EcmaValue value)
 {
     throw new NotSupportedException();
 }
Пример #24
0
 public void Serialize(EcmaValue value, Stream stream)
 {
     Serialize(value, new StreamWriter(stream));
 }
Пример #25
0
 public static string ToString(EcmaValue value, int radix)
 {
     throw new NotSupportedException();
 }
Пример #26
0
 internal AsyncFromSyncIterator(EcmaValue value)
     : base(WellKnownObject.AsyncFromSyncIteratorPrototype)
 {
     this.target   = value.ToObject();
     this.iterator = new EcmaIteratorEnumerator(value);
 }
Пример #27
0
 public static EcmaValue ToBigUIntN(EcmaValue value, int bits)
 {
     throw new NotSupportedException();
 }
Пример #28
0
        private bool TryGetResult(EcmaPropertyKey propertyKey, EcmaValue value, out bool done, out EcmaValue result)
        {
            RuntimeObject method = target.GetMethod(propertyKey);

            if (method == null)
            {
                result = value;
                done   = true;
                return(false);
            }
            EcmaValue obj = method.Call(target, value);

            Guard.ArgumentIsObject(obj);
            done   = obj[WellKnownProperty.Done].ToBoolean();
            result = obj[WellKnownProperty.Value];
            return(true);
        }
Пример #29
0
 public static EcmaValue Add64(EcmaValue x, EcmaValue y)
 {
     throw new NotSupportedException();
 }
Пример #30
0
 protected abstract void ReturnFromGenerator(EcmaValue value);