Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Mar 9, 2022
1 parent e2239d3 commit 106430e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 44 deletions.
45 changes: 4 additions & 41 deletions Jint.Tests.Test262/test/skipped.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,26 +209,6 @@
"reason": "inner binding rejects modification (from parameters) Expected a Error to be thrown but no exception was thrown at all"
},

{
"source": "built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js",
"reason": "yield not implemented"
},
{
"source": "built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js",
"reason": "yield not implemented"
},
{
"source": "language/expressions/object/accessor-name-computed-yield-id.js",
"reason": "accessor / yield not implemented"
},
{
"source": "language/expressions/object/accessor-name-computed.js",
"reason": "yield not implemented"
},
{
"source": "built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js",
"reason": "yield not implemented"
},
{
"source": "language/expressions/object/prop-dup-set-get-set.js",
"reason": "accessor not implemented"
Expand Down Expand Up @@ -298,27 +278,6 @@
"reason": "not implemented: Creation of new variable environment for the function body (as distinct from that for the function's parameters)"
},

{
"source": "built-ins/Object/prototype/toString/proxy-function.js",
"reason": "generators not implemented"
},
{
"source": "language/statements/class/subclass/builtin-objects/GeneratorFunction/instance-prototype.js",
"reason": "generators not implemented"
},
{
"source": "language/statements/class/subclass/builtin-objects/GeneratorFunction/regular-subclassing.js",
"reason": "generators not implemented"
},
{
"source": "language/module-code/instn-local-bndng-export-gen.js",
"reason": "generators not implemented"
},
{
"source": "language/module-code/instn-local-bndng-gen.js",
"reason": "generators not implemented"
},

// Eval problems

{
Expand All @@ -343,6 +302,10 @@

// Esprima problems

{
"source": "built-ins/GeneratorFunction/instance-yield-expr-in-param.js",
"reason": "Esprima doesn't detect invalid yield param"
},
{
"source": "language/expressions/object/method-definition/name-super-prop-param.js",
"reason": "Esprima problem"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override Completion ExecuteInternal(EvaluationContext context)
JsValue value;
if (_classDefinition is not null)
{
value = _classDefinition.BuildConstructor(context, env);
value = _classDefinition.BuildConstructor(context, env).Value;
var classBinding = _classDefinition._className;
if (classBinding != null)
{
Expand Down Expand Up @@ -93,4 +93,4 @@ private void InitializeBoundName(string name, JsValue value, EnvironmentRecord?
ExceptionHelper.ThrowNotImplementedException();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ private Completion BodyEvaluation(
if (result.Type != CompletionType.Continue || (result.Target != null && result.Target != _statement?.LabelSet?.Name))
{
completionType = result.Type;
if (iterationKind == IterationKind.Enumerate)
{
// TODO make sure we can start from where we left off
//return result;
}
if (result.IsAbrupt())
{
close = true;
Expand Down
3 changes: 2 additions & 1 deletion Jint/Runtime/Modules/SourceTextModuleRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ protected override void InitializeEnvironment()
var fn = d.Id?.Name ?? "*default*";
var fd = new JintFunctionDefinition(_engine, d);
env.CreateMutableBinding(fn, true);
var fo = realm.Intrinsics.Function.InstantiateFunctionObject(fd, env);
// TODO private scope
var fo = realm.Intrinsics.Function.InstantiateFunctionObject(fd, env, privateScope: null);
if (fn == "*default*") fo.SetFunctionName("default");
env.InitializeBinding(fn, fo);
}
Expand Down

0 comments on commit 106430e

Please sign in to comment.