Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ByteInputStream and spim version #1

Open
chakpongchung opened this issue Jan 6, 2019 · 3 comments
Open

ByteInputStream and spim version #1

chakpongchung opened this issue Jan 6, 2019 · 3 comments

Comments

@chakpongchung
Copy link

chakpongchung commented Jan 6, 2019

Thank you for sharing your amazing work!

I tried to run it and found these two issues:
1.

java.lang.NoClassDefFoundError: com/sun/xml/internal/messaging/saaj/util/ByteInputStream
# testcase/final/a-function-call.mx
========== PROGRAM OUTPUT:
SPIM Version 8.0 of January 8, 2010
========== ANS OUTPUT: 7053
Copyright 1990-2010, James R. Larus.
All Rights Reserved.
See the file README for a full copyright notice.
Loaded: /usr/lib/spim/exceptions.s
7053
1035
7035
========== STDERR:

Unknown argument: -stat (ignored)
Usage: spim
	-bare			Bare machine (no pseudo-ops, delayed branches and loads)
	-asm			Extended machine (pseudo-ops, no delayed branches and loads) (default)
	-delayed_branches	Execute delayed branches
	-delayed_loads		Execute delayed loads
	-exception		Load exception handler (default)
	-noexception		Do not load exception handler
	-exception_file <file>	Specify exception handler in place of default
	-quiet			Do not print warnings
	-noquiet		Print warnings (default)
	-mapped_io		Enable memory-mapped IO
	-nomapped_io		Do not enable memory-mapped IO (default)
	-file <file> <args>	Assembly code file and arguments to program

java.lang.AssertionError
	at org.junit.Assert.fail(Assert.java:86)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.junit.Assert.assertTrue(Assert.java:52)
	at com.abcdabcd987.compiler2016.BackEnd.FinalTest.testPass(FinalTest.java:147)
javac 10.0.2
tom@t430:~/code/qbe$ uname -a
Linux t430 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

what spim version you were using? Are there any alternative to get rid of the ByteInputStream dependencies?

@abcdabcd987
Copy link
Owner

I think I must have mistakenly used ByteInputStream. I'm not sure what's the alternative since I haven't used Java for a long time. Anyway, it only has to be a derived class of InputStream. Maybe try BufferedInputStream?

spim we used in this class was: https://bitbucket.org/xjia/statspim

@chakpongchung
Copy link
Author

thank you for your reply!

I just tried the statspim and it takes forever to run the testcase1 in the Finaltest section.
Also, for the SSA constructor/destructor test, they are not working because of the null pointer issues.

All other tests are working fine except for some locations issues.

@abcdabcd987
Copy link
Owner

Yeah I remember statspim being buggy. I remember I couldn't run statspim on Ubuntu 16.04. I can't remember what is wrong exactly, but maybe like you say, running forever (or I suspect it doesn't run at all. Check CPU usage). Then I switched back to Ubuntu 14.04, and it worked.

I'm not sure about the null pointer issues. I should have passed all the tests. But maybe there are some bugs I didn't discover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants