Christoph Oelckers
179f5720cd
- moved the remaining exports from p_sectors.cpp to vmthunks.cpp
2019-04-16 14:58:39 +02:00
Magnus Norddahl
c8c671bbe0
- pass additional return values as the last args to a direct native call
2019-04-16 14:58:37 +02:00
Magnus Norddahl
0f27d0cd66
- use the OP_PARAM and OP_RESULT opcodes to build the function signature
2019-04-16 14:58:35 +02:00
Magnus Norddahl
4e5415d371
- fixed missing setRet call for REGT_POINTER return types
2019-04-16 14:58:34 +02:00
Magnus Norddahl
a557042bcc
- fix compile error
2019-04-16 14:58:32 +02:00
Magnus Norddahl
7c75776273
- annotate which function we are calling for better dumpjit info
2019-04-16 14:58:30 +02:00
Magnus Norddahl
ee7d6abdd3
- move the jit runtime to its own file
2019-04-16 14:58:27 +02:00
Christoph Oelckers
f3171c95cc
- fixed: Any direct native function may not use struct values as parameters, not even something as simple as an FName.
2019-04-16 14:58:25 +02:00
Christoph Oelckers
c0a26afab9
- free everything.
2019-04-16 14:58:24 +02:00
Christoph Oelckers
7c649a9f0c
- delete JIT data when shutting down.
2019-04-16 14:58:21 +02:00
Magnus Norddahl
8fc8dee090
- fix: float constants got their move instructions inserted after the call instruction
2019-04-16 14:58:19 +02:00
Christoph Oelckers
29eee14549
- declare builtins as static.
2019-04-16 14:58:18 +02:00
Christoph Oelckers
3f1c7bdbe8
- added a direct native variant for A_PlaySound because this function is relatively easy to test.
2019-04-16 14:58:15 +02:00
Magnus Norddahl
6289e0ad3d
- fix macro expansion error on gcc and clang
2019-04-16 12:41:21 +02:00
Christoph Oelckers
5efa21ad31
- finished adding direct native functions to vmthunks.cpp.
2019-04-16 12:40:48 +02:00
Christoph Oelckers
63575d22c0
- all sector exports done.
2019-04-16 12:40:46 +02:00
Christoph Oelckers
7f4ed65123
- another batch of direct native functions.
2019-04-16 12:40:43 +02:00
Christoph Oelckers
10588add9c
- continued work on adding direct native support.
2019-04-16 12:40:40 +02:00
Christoph Oelckers
178c1a41a6
- moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.
...
For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.
# Conflicts:
# src/p_sectors.cpp
2019-04-16 12:37:04 +02:00
Christoph Oelckers
c01981d08a
- define the built-in functions defined in codegen.cpp through the regular interface instead uf just hacking them into the symbol table with incompletely set up data.
...
- added direct native variants to these builtins and fixed problems with builtin processing.
2019-04-15 22:30:01 +02:00
Christoph Oelckers
20ec6ddce4
- removed AStateProvider from native code.
...
The only place still referencing it was CallStateChain, so this has been made a static function now instead of a class method.
2019-04-15 22:29:58 +02:00
Christoph Oelckers
376c47bef6
- fixed handling of dummy flags.
2019-04-15 22:29:55 +02:00
Christoph Oelckers
96e9dbd967
- removed all remaining native components of the weapon class.
2019-04-15 22:29:52 +02:00
Christoph Oelckers
d871072f28
- allow defining flags in the script declaration of a class and do that for Weapon.
2019-04-15 22:29:47 +02:00
Christoph Oelckers
309cc57504
- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
...
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2019-04-15 22:29:43 +02:00
Christoph Oelckers
ce5792242c
- moved the 'Finalize' methods back into a single function in the parser code.
...
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.
This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
2019-04-15 22:29:39 +02:00
Christoph Oelckers
7caa6a922d
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 22:29:35 +02:00
Christoph Oelckers
ac754b5e96
- some cleanup on the weapon slot interface.
...
This really shouldn't make any decisions from directly reading weapon class defaults.
2019-04-15 22:29:32 +02:00
Christoph Oelckers
f9dfdace16
- scriptified cht_Takeweaps.
2019-04-15 22:29:30 +02:00
Christoph Oelckers
dadf0394c0
- removed the less-parameters versions of P_SpawnPlayerMissile, because there was only one native call left to them.
2019-04-15 22:29:28 +02:00
Christoph Oelckers
94b0338c31
- scriptified ApplyKickback.
2019-04-15 22:29:26 +02:00
Christoph Oelckers
2145db9fbd
- moved the kickback code in P_DamageMobj into a subfunction.
...
This is a first attempt to reduce the complexity of that 600+ lines monstrosity, and also a good first target for scriptification.
2019-04-15 22:29:24 +02:00
Christoph Oelckers
59bffe2f55
- scriptified A_WeaponReady and its subfunctions.
2019-04-15 22:29:22 +02:00
Christoph Oelckers
951ed466b3
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2019-04-15 22:29:19 +02:00
Christoph Oelckers
04cd432159
- a little bit of cleanup on some code that repeatedly accessed some fields in AWeapon and produced far too many search results when looking for this.
2019-04-15 22:29:17 +02:00
Christoph Oelckers
0515af2bd3
- removed the bot related properties from AWeapon.
...
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
2019-04-15 22:29:15 +02:00
Christoph Oelckers
d31f67cb43
- consolidated the 3 nearly identical code fragments handling the weapon's YAdjust for the different renderers into a utility function in DPSprite.
...
# Conflicts:
# src/hwrenderer/scene/hw_weapon.cpp
# src/polyrenderer/scene/poly_playersprite.cpp
# src/swrenderer/things/r_playersprite.cpp
2019-04-15 22:07:45 +02:00
Christoph Oelckers
681009e1ea
- exported the blood spawning part of P_LineAttack as a virtual ZScript function.
2019-04-15 21:59:08 +02:00
Christoph Oelckers
82ffdd5e6b
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2019-04-15 21:59:07 +02:00
Christoph Oelckers
af4c37471e
- took the weapon selection logic out of the WeaponSlots data and blocked all direct access to the weapon slots internals
...
This seriously needs to be independent from the data store and better abstracted. More work to come to move this to its proper place.
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:05 +02:00
Christoph Oelckers
27c67716df
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:03 +02:00
Christoph Oelckers
7c1416cb6f
- scriptified BecomeItem and BecomePickup
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2019-04-15 21:59:01 +02:00
Christoph Oelckers
08059f718b
- scriptified FilterCoopRespawnInventory.
2019-04-15 21:59:00 +02:00
Christoph Oelckers
1ecada388c
- scriptified some simple sound functions.
2019-04-15 21:58:58 +02:00
Christoph Oelckers
d123230fb1
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2019-04-15 21:58:56 +02:00
Christoph Oelckers
0eec8b293a
- scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children.
2019-04-15 21:58:54 +02:00
Christoph Oelckers
f1c7815b16
- scriptified A_Explode and relatives.
2019-04-15 21:58:52 +02:00
Christoph Oelckers
e234d450aa
- scriptified GetDefaultInventory.
2019-04-15 21:58:50 +02:00
Christoph Oelckers
864796a6a2
- removed MeleeWeapon flag from the tomed PhoenixRod and the fighterhammer.
...
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
2019-04-15 21:58:48 +02:00
Christoph Oelckers
beae232f83
- exported one FraggleScript function for testing.
2019-04-15 21:58:46 +02:00
Christoph Oelckers
c326c4c521
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2019-04-15 21:58:45 +02:00
Christoph Oelckers
53b41cf32f
- let player_t::Resurrect use P_BringUpWeapon to raise the weapon again instead of doing it directly.
...
This seems a bit safer.
2019-04-15 21:58:43 +02:00
Christoph Oelckers
c1442fae0d
- scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState.
2019-04-15 21:58:41 +02:00
Christoph Oelckers
8c2c888d82
- scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
...
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2019-04-15 21:58:39 +02:00
Christoph Oelckers
1b225588d1
- scriptified 3 more functions in stateprovider.
2019-04-15 21:58:37 +02:00
Christoph Oelckers
05e8a6c62d
- scriptified A_RailAttack.
2019-04-15 21:58:35 +02:00
Christoph Oelckers
394d8e414f
- scriptified A_CustomPunch
2019-04-15 21:58:33 +02:00
Christoph Oelckers
54ba5b4829
- scriptified A_FireProjectile
2019-04-15 21:58:31 +02:00
Christoph Oelckers
d99b46c861
- scriptified A_FireBullets and A_CustomBulletAttack.
2019-04-15 21:58:30 +02:00
Christoph Oelckers
f794cab92f
- deleted redundant native ActivateMorphWeapon method.
2019-04-15 21:58:28 +02:00
Christoph Oelckers
4c7096ffac
- started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
...
So far 3 functions for testing implemented.
# Conflicts:
# src/p_acs.cpp
2019-04-15 21:58:26 +02:00
Christoph Oelckers
1b6af10f38
- scriptified Weapon.CheckAmmo and Weapon.DepleteAmmo
2019-04-15 21:56:30 +02:00
Christoph Oelckers
9e6279ed5b
- scriptified the rest of the morph code.
2019-04-15 21:56:28 +02:00
Christoph Oelckers
5f5410e35f
- fixed: Since out types cannot be marked as such in a function prototype (as it'd cause parameter mismatches in the resolving pass) it is necessary to check the argflags as well when determining the register type.
2019-04-15 21:56:26 +02:00
Christoph Oelckers
b886219f53
- scriptified P_MorphMonster.
2019-04-15 21:56:23 +02:00
Christoph Oelckers
d4ff49e110
- fixed message output.
2019-04-15 21:56:22 +02:00
Christoph Oelckers
02f785f794
- testing and cleanup of scripted morph code.
2019-04-15 21:56:20 +02:00
Christoph Oelckers
9b1e96262c
- P_UndoPlayerMorph scriptified.
...
Not tested yet and still missing a new native interface.
2019-04-15 21:56:18 +02:00
Christoph Oelckers
395413fc9a
- scriptified P_MorphPlayer and dependencies.
...
It still needs its counterpart scriptified as well before it can work.
# Conflicts:
# src/gi.cpp
# wadsrc/static/zscript/base.txt
2019-04-15 21:56:16 +02:00
Christoph Oelckers
8669dbdcfe
- removed test and debug code.
...
# Conflicts:
# src/gl/scene/gl_scenedrawer.h
2019-04-15 21:50:57 +02:00
drfrag
60e667f732
- Fixed compilation.
2019-04-15 21:48:55 +02:00
Magnus Norddahl
5f7aeb3186
- fix missing include statement
2019-04-15 16:09:14 +02:00
Christoph Oelckers
1fd23f5228
- fixed initialization of default parameters in dynamically created function calls like in the MENUDEF parser
2019-04-15 16:09:13 +02:00
Magnus Norddahl
31f524fd6b
- inline VBTL opcode
...
- remove old META and CLSS implementations
2019-04-15 16:09:11 +02:00
Magnus Norddahl
d4e3bee7c6
- add return type to CreateFuncSignature
2019-04-15 16:09:10 +02:00
Magnus Norddahl
1aebbfb3b5
- fix typo
2019-04-15 16:09:08 +02:00
Magnus Norddahl
815b7d8b7e
- add support in the jit compiler to do direct native calls using the x64 calling convention
2019-04-15 16:09:07 +02:00
Christoph Oelckers
f00892e06d
- exported ADecal to ZScript as a non-native class.
...
Its one function is still native but this was by far the easiest of the remaining actor classes to export.
2019-04-15 16:09:05 +02:00
Christoph Oelckers
cc8e390dce
removed the quite redundant GetStateForButtonName function
...
Since it forwards directly to FindState and has no script bindings there is no need to keep it, it'd only complicate the full scriptification of the weapon class if it stuck around.
2019-04-15 16:09:04 +02:00
Christoph Oelckers
95767fb63a
- fixed some issues with the bodyque and moved this variable into FLevelLocals
...
* it was never saved in savegames, leaving the state of dead bodies undefined
* it shouldn't be subjected to pointer substitution because all it contains is old dead bodies, not live ones.
# Conflicts:
# src/r_data/r_translate.cpp
2019-04-15 16:08:18 +02:00
Christoph Oelckers
edfe8b36c6
- cleaned up the PointerSubstitution code
...
Since the only thing it gets used for is swapping out PlayerPawns it can safely skip all global variables that never point to a live player, which allowed to remove quite a bit of code here that stood in the way of scriptifying more content
2019-04-15 16:06:22 +02:00
Christoph Oelckers
f2fe079ddb
- fixed the reginfo checks for the Draw... functions.
...
They need to be offset by the same amount as the arguments so that the values are properly matched.
# Conflicts:
# src/v_draw.cpp
2019-04-15 16:03:51 +02:00
Christoph Oelckers
5e63252fdc
- moved the type infomation entirely out of VMValue.
...
For the varargs functions that used the Type field to validate their parameters, now a hidden additional argument is passed which contains a byte array with the type info for the current call's arguments. Since this is static per call location it can be better prepared once when the code is being compiled instead of being put in a runtime created array for each invocation. Everything else uses the per-function instance of the same data.
The only thing that still needed the type field with a VMValue is the defaults array, so this uses a different struct type now to store its data.
# Conflicts:
# src/v_draw.cpp
2019-04-15 16:02:17 +02:00
Christoph Oelckers
cb9c1f021c
- generate register type info for the parameter lists of all functions.
...
Currently used for loading parameters into registers.
For checking parameters of native functions some more work is needed to get the info to the function. Currently it doesn't receive the function descriptor.
2019-04-15 15:52:22 +02:00
Magnus Norddahl
a277137d85
- add missing CheckVMFrame call
2019-04-15 15:52:21 +02:00
Magnus Norddahl
0fe213765b
- only allocate stack space for vmframe and call returns when we need them
2019-04-15 15:52:20 +02:00
Magnus Norddahl
03258d1334
- improve dumpjit output slightly
2019-04-15 15:52:19 +02:00
Magnus Norddahl
ec3b491f19
- don't emit VMValue.Type information when we know the receiver isn't going to read it anyway
2019-04-15 15:52:18 +02:00
Magnus Norddahl
fe64de28d4
- delay emitting PARAM and VTBL instructions until CALL/CALL_K
2019-04-15 15:52:16 +02:00
alexey.lysiuk
5d0bf48e22
- use custom offsetof() macro
...
src/scripting/vm/jit_call.cpp:164:38: warning: offset of on non-standard-layout type 'VMScriptFunction' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:87:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:96:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:257:53: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
2019-04-15 15:52:15 +02:00
alexey.lysiuk
4edcb06a9d
- fixed compilation of POSIX targets
...
src/scripting/backend/vmbuilder.h:169:19: error: no member named 'function' in namespace 'std'
2019-04-15 15:52:14 +02:00
Christoph Oelckers
b33fd19fa2
- missed one OP_RESULT.
2019-04-15 15:52:13 +02:00
Christoph Oelckers
6727301330
- moved all code related to function calls into the helper class so that all future work on the calling convention is in one place only.
2019-04-15 15:52:12 +02:00
Christoph Oelckers
a900390683
- moved all handling for the simple calls into EmitterArray to have it in one place only.
...
The main case of FxVmFunctionCall is not done yet, though.
2019-04-15 15:52:11 +02:00
Christoph Oelckers
054640ce41
- removed OP_TAIL.
...
The amount of support code for this minor optimization was quite large and this stood in the way of streamlining the VM's calling convention, so it was preferable to remove it before moving on.
2019-04-15 15:52:10 +02:00
Magnus Norddahl
33bef2183e
- fix compile errors
2019-04-15 15:52:08 +02:00
Christoph Oelckers
ab689c0984
- fixed TArray's Append methods.
...
I mistakenly assumed that Grow would incease the array's reserved space.
2019-04-15 15:52:07 +02:00
Christoph Oelckers
e9a5f094c9
- changed OP_PARAM handling so that all registers remain allocated until the call instruction and reordered instruction emission so that the param instructions all directly precede the call instruction.
2019-04-15 15:48:37 +02:00
Christoph Oelckers
9380ccb922
- completed the Dehacked fix.
...
I missed some arguments that were specified but set to 'not given'.
2019-04-15 15:48:35 +02:00
Christoph Oelckers
f10c927850
- fixed: The Dehacked function wrappers now need full parameter lists.
2019-04-15 15:48:32 +02:00
Magnus Norddahl
783adc7be1
- disabled code that shows how a thunk function and native setup would look like
2019-04-15 15:48:31 +02:00
Christoph Oelckers
03001991f1
- fixed IJMP code generation for the JIT compiler.
...
With a proper count value available this can be done properly. The only relevant targets are the jumps immediately succeeding the IJMP instructions, nothing else.
2019-04-15 15:48:30 +02:00
Christoph Oelckers
f557c77602
- do not use instructions from too recent instruction set extensions.
...
andn is part of BMI1 which was introduced in 2012, which is far too recent to be used unchecked.
2019-04-15 15:48:29 +02:00
Christoph Oelckers
9456c877d4
- deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
...
This also adds the number of available choices to OP_IJMP.
2019-04-15 15:48:27 +02:00
Magnus Norddahl
44b89bba96
- inline ReadBarrier, GetClass and GetClassMeta
2019-04-15 15:48:25 +02:00
Christoph Oelckers
05fd4d8b62
- fixed RNG setup in FxRandom.
2019-04-15 15:48:24 +02:00
Christoph Oelckers
9d126954d1
- removed the default parameter handling from all native script functions because it is no longer needed.
...
# Conflicts:
# src/p_actionfunctions.cpp
# Conflicts:
# src/hwrenderer/postprocessing/hw_postprocessshader.cpp
# src/v_2ddrawer.cpp
2019-04-15 14:59:00 +02:00
Christoph Oelckers
6d8cf38cef
- fixed FxFRandom setup which used a path in FxRandom that is no longer supported.
2019-04-15 14:37:46 +02:00
Magnus Norddahl
075a666c75
- stop using lambda functions for CreateCall because MSVC lambas use a different calling convention and "converts" them to the right one by generating a thunk function
2019-04-15 14:37:44 +02:00
Magnus Norddahl
51900d5d98
- removed the SetupSimpleFrameMissingArgs logic as the number of args are now guaranteed
2019-04-15 14:37:43 +02:00
Magnus Norddahl
66a970059b
- add warning text when falling back to the VM
2019-04-15 14:37:41 +02:00
Christoph Oelckers
7d2c4a05e2
- removed the unused 'no arguments' cases from the BuiltinRandom functions and split off BuiltinRandom2 into its own function.
...
This removes the last non-vararg cases where a native VM function checks 'numparam'. As of this commit all function calls will pass the complete list of arguments.
2019-04-15 14:37:40 +02:00
Magnus Norddahl
ac01af3ef0
- make functions using too many registers (more than 200) fall back to the VM
2019-04-15 14:37:38 +02:00
Christoph Oelckers
a0b4f5ad68
- always pass complete argument lists in the VM.
2019-04-15 14:37:37 +02:00
Christoph Oelckers
44eee13aa7
- build full argument lists for action function calls.
...
This uses one static global array to avoid frequent reallocations.
2019-04-15 14:37:35 +02:00
Christoph Oelckers
a371a8456a
- implemented VMCallWithDefaults and used it for all calls with variable arguments.
...
This isn't used for the 3 action function calls because it requires an array allocation which would be a bit too costly for something as frequently called as action functions.
They will need a different approach.
2019-04-15 14:37:34 +02:00
Christoph Oelckers
29d7e11937
- fixed last commit.
2019-04-15 14:37:31 +02:00
Christoph Oelckers
28461de6ec
- marked all places where an incomplete parameter list may be passed to the VM by a native call by redirecting VMCall to an intermediate VMCallWithDefaults. This function must later fill in the missing arguments from the default.
2019-04-15 14:37:30 +02:00
Christoph Oelckers
7fe33d336c
Avoid using argument count for any kind of decision making in native VM functions.
...
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.
# Conflicts:
# src/r_data/r_sections.h
2019-04-15 14:37:28 +02:00
Magnus Norddahl
2dd03270b2
- remove unused argument
2019-04-15 14:37:26 +02:00
Magnus Norddahl
fd955249fd
- avoid calling VMFillParams for simple stack frames
...
- split Setup into more functions
2019-04-15 14:37:24 +02:00
Magnus Norddahl
5181106264
- add dword store to memset code
2019-04-15 14:37:23 +02:00
Magnus Norddahl
43cfedbd23
- disable jit in 32-bit builds
2019-04-15 14:37:21 +02:00
Magnus Norddahl
18258c6cd5
- fix wrong offsets
2019-04-15 14:37:20 +02:00
Magnus Norddahl
c9a20d56d1
- generate a memset for the allocated stack memory because that's what the VM does
...
(this really shouldn't be done by the VM either - the compiler backend should clear its registers if it wants them to be zero!)
2019-04-15 14:37:19 +02:00
Magnus Norddahl
8fd2bd1d51
- fix operand size mismatch error
2019-04-15 14:37:17 +02:00
Chronos Ouroboros
104f49e589
Fix the code for MODF_RK in the JIT compiler.
2019-04-15 14:37:16 +02:00
Chronos Ouroboros
c8e56f4dda
Fixed the Vector2/3 != operator.
2019-04-15 14:37:14 +02:00
Chronos Ouroboros
c3c100bf9f
Added support for CMP_APPROX to EQV_R and moved the code to a template.
2019-04-15 14:37:13 +02:00
Magnus Norddahl
b4db05a7ff
- modify exception checks to jump ahead if the exception is to be thrown as it limits static misprediction
2019-04-15 14:37:11 +02:00
Magnus Norddahl
3504f48bfa
- fix a typo
2019-04-15 14:37:10 +02:00
Magnus Norddahl
3f952e94cd
- fix the throw messages
2019-04-15 14:37:09 +02:00
Christoph Oelckers
74d02811c7
- fixed vector math instructions to use the same order of operations as the VM.
2019-04-15 14:37:07 +02:00
Magnus Norddahl
64387abcce
- add vm_jit cvar to control JIT compilation
2019-04-15 14:37:05 +02:00
Magnus Norddahl
87744b22ab
- update JIT PARAM handling to match the VM instruction change
2019-04-15 14:37:04 +02:00
Magnus Norddahl
43a6fc7227
- RUNTIME_FUNCTION only exists in 64-bit Windows
2019-04-15 14:37:02 +02:00
Magnus Norddahl
a54dbec73a
- fix wrong shift direction
2019-04-15 14:37:01 +02:00
Magnus Norddahl
bd1f529574
- build enough of the unwind opcodes for visual studio's debugger to produce the correct call stack
2019-04-15 14:36:59 +02:00
Magnus Norddahl
ea8725f03b
- construct our own runtime as the one provided by asmjit is too primitive
2019-04-15 14:36:58 +02:00
Magnus Norddahl
89bf3f0455
- add more names to asmjit objects
2019-04-15 14:36:56 +02:00
Magnus Norddahl
7e9e823674
- remove the frameX registers as they were just constant offsets to vmframe that could be merged into other constant offsets
2019-04-15 14:36:55 +02:00
Magnus Norddahl
475510c8ea
- give the remaining virtual registers names
2019-04-15 14:36:53 +02:00
Magnus Norddahl
68c05a424b
- give temp registers names and reuse the FString object for formatting names
2019-04-15 14:36:52 +02:00
Magnus Norddahl
d48738437b
- skip RESULT opcodes when outputting assembly
2019-04-15 14:36:51 +02:00
Magnus Norddahl
77850c1ec5
- clean up assembly output slightly by only generating labels for the opcodes jumped to
2019-04-15 14:36:49 +02:00
Magnus Norddahl
316010378d
- fix CASTB opcode implementation
2019-04-15 14:36:48 +02:00
Magnus Norddahl
2c89d1e694
- fix missing convert from float to double in LSP and LSP_R opcodes
...
- fix missing convert from double to float in SSP and SSP_R opcodes
2019-04-15 14:36:46 +02:00
Magnus Norddahl
9b9113d0c4
- fix debug build compile error
2019-04-15 14:36:44 +02:00
Magnus Norddahl
7230974c1e
- remove the need to do any VARF_Native runtime checks by making native functions use the same calling convention as the script version
2019-04-15 14:36:43 +02:00
Magnus Norddahl
ae6c7e541c
- do script calls directly from asmjit without using a lambda wrapper
...
- do VARF_Native check at compile time when possible
2019-04-15 14:36:41 +02:00