public GeneratorClosedException(EcmaValue returnValue) { this.ReturnValue = returnValue; }
public static EcmaValue ToBigUInt64(this EcmaValue value) { throw new NotSupportedException(); }
public static int Compare(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
public static EcmaValue Negate64(EcmaValue x) { throw new NotSupportedException(); }
public static ulong ToUInt64(EcmaValue value) { throw new NotSupportedException(); }
public static EcmaValue BitwiseOr64(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
public static EcmaValue LeftShift(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
public void ResolveHandler(EcmaValue value) { HandleResult(PromiseState.Fulfilled, value); }
public void RejectHandler(EcmaValue value) { HandleResult(PromiseState.Rejected, value); }
protected virtual PromiseState GetState(out EcmaValue value) { value = default; return(PromiseState.Pending); }
private EcmaPropertyKey(EcmaValue value) : this() { this.value = value; }
public void SetValueInBuffer(int index, EcmaValue value) { value = CoerceValue(value); Guard.BufferNotDetached(this); SetValueInBufferImpl(index, value); }
public EcmaRuntimeException(EcmaValue value) : base(ToString(value)) { this.value = value; }
void IGeneratorContext.Return(EcmaValue value) { ReturnFromGenerator(value); }
public EcmaValue CreateIterResultObject(EcmaValue value) { return(EcmaValueUtility.CreateIterResultObject(value, done)); }
public EcmaSet Add(EcmaValue key) { SetItem(key, key); return(this); }
public static EcmaValue Multiply(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
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; } }
public static EcmaValue ExclusiveOr64(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
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); }
public static EcmaValue RightShift64(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
public EcmaJsonWriter(string indentString, EcmaValue replacer) : this(indentString) { this.replacer = replacer; }
public static bool TryParse(string inputString, out EcmaValue value) { throw new NotSupportedException(); }
public void Serialize(EcmaValue value, Stream stream) { Serialize(value, new StreamWriter(stream)); }
public static string ToString(EcmaValue value, int radix) { throw new NotSupportedException(); }
internal AsyncFromSyncIterator(EcmaValue value) : base(WellKnownObject.AsyncFromSyncIteratorPrototype) { this.target = value.ToObject(); this.iterator = new EcmaIteratorEnumerator(value); }
public static EcmaValue ToBigUIntN(EcmaValue value, int bits) { throw new NotSupportedException(); }
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); }
public static EcmaValue Add64(EcmaValue x, EcmaValue y) { throw new NotSupportedException(); }
protected abstract void ReturnFromGenerator(EcmaValue value);