kevingadd/JSIL — pull request #145 by markusjohnsson (2012-12-27 16:08:09+00:00)
Title: Nullable fixes

Building a custom corlib I ran into an issue when translating:

```
An error occurred while translating the function 'System.Boolean System.Nullable`1::Equals(System.Object)':
at JSIL.AssemblyTranslator.RunTransformsOnFunction(SpecialIdentifiers si, HashSet`1 parameterNames, Dictionary`2 variables, JSFunctionExpression function) in (....)\JSIL.corlib\JSIL\JSIL\AssemblyTranslator.cs:line 1581
```

With inner exception:
```
System.Boolean System.Nullable`1::Equals(System.Nullable`1)
at JSIL.Transforms.ReplaceMethodCalls.VisitNode(JSInvocationExpression ie) in (....)\JSIL.corlib\JSIL\JSIL\Transforms\ReplaceMethodCalls.cs:line 163
```

I've not isolated the cause (I don't know how to find the call site even with the debugger), but I think I've solved the issue.

I've also added a VisitNode(JSValueOfNullableExpression) to JSAstEmitter because had untraslatable expressions appearing in emitted js. Not sure if that was the correct way to do it (or why it wasn't replaced in RepaceMethodCalls). Please advice.