Skip to content

Commit 45b70f6

Browse files
committed
Modified for Unity/iOS
1 parent 035eab1 commit 45b70f6

27 files changed

+143
-4227
lines changed

Project/Assets/Plugins/Jint/ES3.g

Lines changed: 0 additions & 1865 deletions
This file was deleted.

Project/Assets/Plugins/Jint/ExecutionVisitor.cs

Lines changed: 3 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -363,23 +363,7 @@ public void Visit(ForEachInStatement statement) {
363363
var dictionary = Result as JsDictionaryObject;
364364

365365
if (Result.Value is IEnumerable) {
366-
foreach (object value in (IEnumerable)Result.Value) {
367-
CurrentScope[identifier] = Global.WrapClr(value);
368-
369-
statement.Statement.Accept(this);
370-
371-
ResetContinueIfPresent(statement.Label);
372-
373-
if (StopStatementFlow()) {
374-
if (breakStatement != null && statement.Label == breakStatement.Label) {
375-
breakStatement = null;
376-
}
377-
378-
return;
379-
}
380-
381-
ResetContinueIfPresent(statement.Label);
382-
}
366+
throw new NotSupportedException();
383367
}
384368
else if (dictionary != null) {
385369
List<string> keys = new List<string>(dictionary.GetKeys());
@@ -668,28 +652,7 @@ public void Visit(NewExpression expression) {
668652

669653
if (Result == JsUndefined.Instance && typeFullname.Length > 0 && expression.Generics.Count > 0)
670654
{
671-
string typeName = typeFullname.ToString();
672-
typeFullname = new StringBuilder();
673-
674-
var genericParameters = new Type[expression.Generics.Count];
675-
676-
try
677-
{
678-
int i = 0;
679-
foreach (Expression generic in expression.Generics)
680-
{
681-
generic.Accept(this);
682-
genericParameters[i] = Global.Marshaller.MarshalJsValue<Type>(Result);
683-
i++;
684-
}
685-
}
686-
catch (Exception e)
687-
{
688-
throw new JintException("A type parameter is required", e);
689-
}
690-
691-
typeName += "`" + genericParameters.Length;
692-
Result = Global.Marshaller.MarshalClrValue<Type>(typeResolver.ResolveType(typeName).MakeGenericType(genericParameters));
655+
throw new NotSupportedException();
693656
}
694657

695658
if (Result != null && Result is JsFunction) {
@@ -1213,14 +1176,7 @@ public void Visit(MemberExpression expression) {
12131176

12141177
// Try to evaluate a CLR type
12151178
if (Result == JsUndefined.Instance && typeFullname.Length > 0) {
1216-
EnsureClrAllowed();
1217-
1218-
Type type = typeResolver.ResolveType(typeFullname.ToString());
1219-
1220-
if (type != null) {
1221-
Result = Global.WrapClr(type);
1222-
typeFullname = new StringBuilder();
1223-
}
1179+
throw new NotSupportedException();
12241180
}
12251181
}
12261182

Project/Assets/Plugins/Jint/Jint.csproj

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)