Skip to content

WP8/WinRT support preview (take two) #33

Merged
merged 49 commits into from Feb 12, 2013

2 participants

@alexey-pelykh

No description provided.

@dicej
ReadyTalk member
dicej commented Feb 4, 2013

Thanks, Alexey. This looks really good. I have a few comments:

  • A couple of files reference avian-interop.h, but I don't see that file in the source tree.
  • It looks like you uncommented the printTrace call in throw_ for debugging; we should probably comment that out again
  • There are a lot of preprocessor conditionals. Many of them are necessary, but in some cases, I think we could eliminate them. One example is the fprintf/OutputDebugString code in machine.cpp; I think it would be better to define a new function (e.g. logDebug(const char* format, ...)) that abstracts away the platform differences.
  • I noticed you replaced the dynamic array allocation (e.g. "int32_t counts[dimensions]" changed to "int32_t* counts = new int32_t[dimensions]" in many places, since the MS compiler doesn't support stack-based dynamically-sized arrays. We have a macro called RUNTIME_ARRAY (defined in common.h) that I prefer to use for these cases, since it allows us to still use stack allocation with compilers that support it, and the array is automatically allocated and freed when using the MS compiler.

I'd like to address these issues before I merge the changes. If you'd like to do that, let me know. Otherwise, I'll work on it when I get a chance.

@alexey-pelykh
  • avian-interop comes from https://github.com/osmandapp/avian-wp8
  • done
  • this is extension, not replacement. Thus it will be just function copy-paste without ifdefs. OutputDebugString is not replacement of fprintf in that situation, at least I did not intend that at all.
@dicej
ReadyTalk member
dicej commented Feb 4, 2013
@alexey-pelykh

It can be done, but then that method will be completely rewritten, since you don't have a single format string

@dicej
ReadyTalk member
dicej commented Feb 4, 2013
@alexey-pelykh

Ah, got it. Ok, I'll update that soon

@alexey-pelykh

It would be awesome if you could advise something on previous issue regarding performance.

@alexey-pelykh

That should be good now, also rebased

@dicej
ReadyTalk member
dicej commented Feb 5, 2013

Thanks, Alexey. Can this branch actually be compiled for WinRT/WP8 by itself, or is additional code needed (e.g. avian-interop.h)?

@alexey-pelykh

Same relation as your "win32" repo has.

@dicej
ReadyTalk member
dicej commented Feb 5, 2013

Ah, yes, sorry -- you answered that earlier. I'll do some more testing and then push it if it looks good.

@dicej
ReadyTalk member
dicej commented Feb 6, 2013

Hi Alexey. I've done some testing and fixed a couple of things: https://github.com/dicej/avian/commits/master. One thing I found but wasn't sure how to fix is that Java_java_io_RandomAccessFile_open doesn't work anymore on desktop Windows, since we're casting a wchar_t* to a const char*, which always results in "No such file or directory" when we call ::open. Do you have any thoughts on how to fix that?

@alexey-pelykh

I'll fix that today. Actually it should be _wopen. Maybe it will also work for WP8 to avoid native calls usage. Or, as an option, I can write Win32 calls for Windows instead of ::open

alexey-pelykh and others added some commits Jan 21, 2013
@alexey-pelykh alexey-pelykh java.lang.Math.log() and java.lang.Math.tan() 85ce769
Victor Shcherb Add java lang math methods d6aff87
Victor Shcherb Fix RAF c8ca838
@alexey-pelykh alexey-pelykh RandomAccessFile f1b2b3f
Victor Shcherb Add android platform 3a42db9
@alexey-pelykh alexey-pelykh Android toolchain b1990ba
@alexey-pelykh alexey-pelykh Path fix 1f77d15
Victor Shcherb Fix android makefile c368a8b
Victor Shcherb Add android redirect to logcat 51e8a00
Victor Shcherb Fix proguard warnings
Conflicts:

	TODO.if.merge
cc237b9
@alexey-pelykh alexey-pelykh Windows Phone 8 / Windows RT initial support
Conflicts:

	makefile
2f2cac5
@alexey-pelykh alexey-pelykh Makefile fix 1b43caf
@alexey-pelykh alexey-pelykh Replaced TODO comments with messages ; More correct AVIAN_AOT_ONLY usage 4d03650
@alexey-pelykh alexey-pelykh WinRT/WP8 process=compile dca12d3
Victor Shcherb Add last modified to file 2d11e7c
@alexey-pelykh alexey-pelykh Fix library overwriting ; proper assembler flags 5e0b073
@alexey-pelykh alexey-pelykh Fixes to WP8/WinRT support acdd297
@alexey-pelykh alexey-pelykh Additional AOT_ONLY ifdef 4228f69
@alexey-pelykh alexey-pelykh Makefile changes, added additional compiler flags aaa60ae
@alexey-pelykh alexey-pelykh Allow output of exceptions to debugger. Generate WinMD file d51db00
@alexey-pelykh alexey-pelykh Finally, proper jvm.dll linking for WP8 c669428
@alexey-pelykh alexey-pelykh Fix WP8/WinRT ARM build 71052fa
@alexey-pelykh alexey-pelykh Fix crash on memory validation c131490
@alexey-pelykh alexey-pelykh Allow avian.bootstrap to accept multiple libraries 9ed3124
@alexey-pelykh alexey-pelykh Fix crash if no avian.boostrap is specified bde33c9
@alexey-pelykh alexey-pelykh Fix crash if no avian.boostrap is specified (oops) bd2a836
@alexey-pelykh alexey-pelykh Fix crash if no avian.boostrap is specified (oops) d0ac632
@alexey-pelykh alexey-pelykh Fix crash if no avian.boostrap is specified (oops) 74c9f60
@alexey-pelykh alexey-pelykh Instead of throwing exception, just return initial file name c3b437a
@alexey-pelykh alexey-pelykh Remove debug code 9d8c825
@alexey-pelykh alexey-pelykh java.io.RandomAccessFile for WinPhone8 / WinRT 11eda6a
@alexey-pelykh alexey-pelykh WP8/WinRT : Proper absolute path
WP8/WinRT : Last modified time
e358a68
@alexey-pelykh alexey-pelykh Add notifications about improvements possible 234bba5
@alexey-pelykh alexey-pelykh Added comments regarding java.io.File.toAbsolute() and WinRT/WP8 6376a49
@alexey-pelykh alexey-pelykh Support new WinRT interop 362f4aa
@alexey-pelykh alexey-pelykh getErrorStr() for Windows platforms d6a5544
@alexey-pelykh alexey-pelykh Culture fixes ; Path extensions e7ad04f
@alexey-pelykh alexey-pelykh Support built-in jars when wusing multi-library b918389
@alexey-pelykh alexey-pelykh Remove empty lines
Conflicts:

	classpath/java-lang.cpp
24e1e1a
@alexey-pelykh alexey-pelykh Fix dword<>qword mistake f3c443d
@alexey-pelykh alexey-pelykh Make clean target more robust
Conflicts:

	.gitignore
197d4f7
@alexey-pelykh alexey-pelykh Comment out printTrace e4bd01f
@alexey-pelykh alexey-pelykh RUNTIME_ARRAY usage 83e55ce
@alexey-pelykh alexey-pelykh Trace writeout refactor d5d2e50
@alexey-pelykh alexey-pelykh Fix for windows ::open 0a1743e
@alexey-pelykh alexey-pelykh WP8 target refine 837e284
@alexey-pelykh

I've added small change to makefile

@dicej dicej merged commit 9c632b7 into ReadyTalk:master Feb 12, 2013

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.