-
Notifications
You must be signed in to change notification settings - Fork 242
Conversation
Projects moved to appropriate solution folders.
StringBuilder.set_Chars fixed: treat not setted chars as \0.
@@ -8,7 +8,7 @@ if (!$jsilcore) | |||
|
|||
$jsilcore.getCurrentUICultureImpl = function () { | |||
var language; | |||
var svc = JSIL.Host.getService("window", false); | |||
var svc = JSIL.Host.getService("window", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need initialize current culture even in non-browser environment.
Really next line even tries to do it:
if (svc) {
language = svc.getNavigatorLanguage() || "en-US";
} else {
language = "en-US";
}
But in non-browser environment it will not return null, but fail.
Now it will return null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I probably got the second argument's boolean nature backwards... bools are awful.
Workaround of String-object and $Overflow JSIL bugs.
Currently JSImport works incorrectly on Linux. |
I don't really know, I find Linux development a nightmare. None of the tools are good. That's why some of the 'doesn't work on Mono' tests are still broken. |
@kg, how could function go into FunctionCache? |
It was my fault. Functions went to cache through GetSecondPass. |
Mono's ConcurrentDictionary is probably broken. They've had trivial bugs in their BCL containers before, and they take forever to get fixed (even when I provide a fix). It's a nightmare. |
Formatting test on travis still failing, but I've just tested it on my own Linux box - and it works as expected. We need really upload somewhere all artifacts (at least Libraries folder and all tests *.out files) to be able test problems that happens on Travis - but it is another task. |
It works incorrectly on Travis, but it works on my linux box.
So, now I think this PR is stable enough and could be merged. |
Ops. Looks like I missed non-integer types. Let's see test results. |
Added BitConverter.DoubleToInt64Bits.
87e7f5f
to
83672d3
Compare
Get artifacts from travis and looked why test fails there. |
@@ -0,0 +1,916 @@ | |||
// | |||
// mono/mono/metadata/number-formatter.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please explicitly call out what license that was under in addition to the filename. Doesn't need the whole license prologue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good catch. Looks like this file, as it located in mono/mono folder is licensed only with LGPL or commercial license.
It is really bad, so we should check if it was previously located under anther directory pr ask them for using this file with another license :(
Took a second look at this and I don't see anything wrong other than the two nits I commented on. Thanks. |
PR fix applied. Also added double signature fix and .Parse(string, IFormatProvider) signature as it is used by NumberFormatter. |
Per discussion in #850.
Added new C# project - JSIL.mscorlib.
This project is translated on JSIL compilation and goes into Libraries folder. It is attached as bootstrap through JSIL.js.
Currently I've added (Numeric).ToString(format, ...) implementations through mono System.NumberFormatter.
Also this PR contains several StringBuilder method implementations, fix for #855.
To support Bootstrap from C# there was introduced several meta attributes:
JSRepaceAssemblyDeclaration - replaces JSIL.DeclareAssembly with passed string
JSOverrideAssemblyReference - overrides $asm... for passed type assembly with string and enclose all translation in self-execution function
JSImportType - include type from other assembly in translation as it was defined here. Should be use with JSProxy.
JSSuppressTypeDeclaration (#507) - TypeDeclarationsToSuppress moved here.
@kg, please wait for tests to pass. I've not yet check all of them - but we can already start review of this change.