Commit Graph

19 Commits

Author SHA1 Message Date
Mark Street adb2dc07a8 Slight rework of m2c wrapper to use platform.id (#1750)
* Slight rework of m2c wrapper to use platform.id

* PR feedback
2025-12-02 14:58:14 +00:00
Mark Street 86b9dfdf8d Add has_decompiler for arm32 platforms (#1741)
* Add has_decompiler for arm32 platforms

* Handle missing '.syntax unified' for gba

* allow fallback to default compiler if arch is supported
2025-11-15 12:12:12 +00:00
Simon Lindholm bc80e6788d m2c for ARM (#1640)
* Pass "mipsee" to m2c

* Run m2c for arm

* Update m2c
2025-08-10 21:56:41 +09:00
Mark Street bb4a367de1 Include M2CError response when decompilation fails due to bad context (#1170)
* Include M2CError response when decompilation fails due to bad context

* fix test
2024-03-26 15:52:45 +09:00
Ethan Roseman 5cecde9d90 Attempt to decompile without context if the first decompilation fails (#1120) 2024-03-10 22:54:35 +09:00
Mark Street 2f206fd084 Add PSP platform (#958)
* Add PSP platform

* black

* Add credits for font used in PSP logo

* Switch wine for wibo + bump version

* use wine again for pspsnc.exe

* bump asm-differ
2024-02-15 23:17:26 +09:00
Ethan Roseman 4ae89872e2 Presets in the DB (#897)
* Organize tests, update settings, backend deps

* Remove project import code from backend

* Remove some frontent project code

* more progress, project cleanup

* more preset work

* .

* upd8z

* Admins can delete scratches & preset migration

* bye, source presets

* fixes & changes

* Preset in admin panel & rename migration

* mypy

* Fix perset viewset & tests

* Change compilers hash files

* test annotations so Windows doesn't run them

* Mark nits

* Preset auto ID field

* scratch as reference (1/?)

* backend fixes to preset (2/3)

* Use preset ID instead of name in frontend

* update frogger preset

* I broke one of the ten commandments of react

* finishing touches (3/3 lol)

* Update serializers.py
2023-10-27 23:40:59 +09:00
Ethan Roseman caa803c661 Compiler refactor (#849)
* Initial commit of organizing things

* some bugs

* anudder

* smores

* fix bug?

* oopth

* strings
2023-09-12 06:40:08 +09:00
ConorB 906aa4a8a8 Switch timeout mechanism to subprocess.run (#659)
* Switch to subprocess.run for timeouts

* [experiment] Set CI TIMEOUT_SCALE_FACTOR to 1

* supress parameterized.expand error in event of no compilers, change TIMEOUT_SCALE_FACTOR in CI to 2

* Exempt dummy compilers from nsjail bind mounts, disable nsjail time limits

* Don't run timeout test on windows

* Decouple test_compiler_timeout's timeout from global timeout settings, reset TIMEOUT_SCALE_FACTOR to 10

* Have DummyLongRunningCompiler subclass DummyCompiler

* Have a timeout of zero disable timeouts entirely

* Skip test_zero_timeout on windows

* black

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-21 03:04:27 +09:00
ConorB 721a08ccdf Make exception_on_timeout production-compatible, add more timeouts (#653)
* Force exception_on_timeout to use spawn to make gunicorn happy

* black

* Have test_fpr_reg_names_output and test_giant_compilation test for success as opposed to a lack of output

* Refactor timeouts for:
- compiling
- decompiling
- assembling
- disassembling

* Move m2c timeout wrapper to prevent interfering with StringIO

* Increase default timeouts by an order of magnitude to investigate failing CI tests

* Add timeout scale factor, have CI timeouts be 10x default

Co-authored-by: ConorBobbleHat <c.github@firstpartners.net>
2023-01-15 01:28:48 +09:00
ConorB 560a3d4455 Implement timeouts for m2c and compiler invocations (#628)
As this title suggests, this PR caps the runtime for all compiler / m2c
calls. Currently, the timeout is five seconds for both.

There may well be a better place to put the compile timeout; as ever,
happy to change :)

Co-authored-by: ConorBobbleHat <ConorBobbleHat>
2022-12-26 19:44:44 +09:00
Ethan Roseman 49b27db563 limit number of m2c asm lines that can be decompiled 2022-10-29 13:41:52 +09:00
Ethan Roseman db03a48ef9 Revert the reversion of the updates (#459)
* Revert "Revert "Dep updates (#457)" (#458)"

This reverts commit eb43c51586.

* ci changes

* Update almost everything, fix issues

* add jest-environment-jsdom

* fix to mwcc debug info option

* remove frontend tests

* black

* remove eslint-plugin-testing-library

* Do db migration

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-06-01 23:06:51 -04:00
Ethan Roseman eb43c51586 Revert "Dep updates (#457)" (#458)
This reverts commit 03ae189510.
2022-05-31 18:40:21 +09:00
Ethan Roseman 03ae189510 Dep updates (#457)
* Update python deps and remove extra stuff from mac compiler command

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "9b2b6ad5"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "9b2b6ad5"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "10184592"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "10184592"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* prep for mips_to_c -> m2c migration

* rename m2c directory

* update frontend deps
2022-05-31 18:33:26 +09:00
Ethan Roseman 6b1ee90acd Compiler/platform refactor (#396)
* foyst

* clang & agbcc

* more

* wii/gc

* more

* fix

* more

* references

* fixes

* CI fix

* nabbed em

* gcc2.7.2kmc

* meowp

* Tweak Dockerfile + other bits (#398)

* Tweak Dockerfile + other bits

* Capitalise

* Enable/disable compiler downloads via Environment variables

* appease black

* migration

* flags / presets in Compiler

* fixed tests

* /compilers

* mypy cheese

* upd8s

* name

* frontend goodness

* i18n

* cleaners

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Mark Street <streetster@gmail.com>
2022-03-14 02:33:19 +09:00
Ethan Roseman eb7534be0d Black (#380)
* Initial format

* action

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "ee239a2b"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "ee239a2b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "6704d61f"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "6704d61f"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* vscode

* fix

* .
2022-02-20 23:21:38 +09:00
Ethan Roseman 811aa89cc0 Update m2c and asm_differ, add support for decompiling ppc (#339)
* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "1e73cd4"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "1e73cd4"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "46c55a0"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "46c55a0"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* Update asm_differ and mips_to_c integration, add support and test for ppc

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "76597c6"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "76597c6"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2022-02-05 01:40:05 +09:00
Ethan Roseman 1a1639f214 Decompile endpoint (#302)
* work on decompile endpoint + refactoring

* Add decompile endpoint, tests, refactor tests a bit

* Fix winders
2022-01-08 11:04:07 +09:00