Commit Graph
8 Commits
Author SHA1 Message Date
Marco Lizza 3cdc3dde84 fix: work around MSVC 2013 optimizer bug causing memory access violation in wrenPinObj and wrenUnpinObj
Disable optimization for wrenPinObj and wrenUnpinObj functions under Microsoft Visual Studio 2013 to prevent the compiler from incorrectly inlining them, which triggers a memory access violation. The pragma directives bracket only these two functions to minimize the impact on the rest of the compilation unit.
2015-01-21 10:01:09 +00:00
Marco Lizza cb62bcda8e feat: add Visual Studio 2013 solution and project files for building wren on Windows
Add MSVC 2013 project scaffolding under project/msvc2013/ including wren.sln solution file, wren.vcxproj with Debug/Release Win32 configurations using v120 toolset, and wren.vcxproj.filters organizing source and header files from ../src/ into Visual Studio filter categories.
2015-01-21 10:00:35 +00:00
Marco Lizza ff9625a80d chore: reorder include directives to place wren_common.h first across all source files
Enforce a consistent include ordering convention across the codebase: wren_common.h (as configuration header) first, followed by the module's own header, then other wren_*.h headers in lexicographic order, and finally standard library includes. Also add missing wren_common.h include to main.c and wren_io.c, and add _CRT_SECURE_NO_WARNINGS define for MSVC in wren_common.h.
2015-01-21 09:30:37 +00:00
Marco Lizza 80620957b3 fix: disable computed goto for MSVC due to lack of compiler support
The WREN_COMPUTED_GOTO macro is now conditionally set to 0 when
compiling with _MSC_VER, as Microsoft's compiler does not support
the computed-goto extension used by the VM dispatch loop.
2015-01-21 09:27:27 +00:00
Marco Lizza a70a23e03d fix: avoid returning void function result in for/while/class/var statements 2015-01-21 09:23:46 +00:00
Marco Lizza 19862a2959 fix: change readHexDigit return type from char to int to prevent sign extension bugs 2015-01-21 09:22:56 +00:00
Marco Lizza 25b6a37b2c fix: add _inline fallback for MSVC plain-C compilation in wren_common.h 2015-01-21 09:22:18 +00:00
Marco Lizza 9b350e3e7d fix: replace zero-length flexible array members with zero-sized arrays to suppress non-standard warnings
In `src/wren_value.h`, change three flexible array members (`char value[]`, `Upvalue* upvalues[]`, `Value fields[]`) to explicit zero-sized arrays (`char value[0]`, `Upvalue* upvalues[0]`, `Value fields[0]`) to resolve compiler warnings about non-standard zero-sized array usage in structs `ObjString`, `ObjClosure`, and `ObjInstance`.
2015-01-21 09:21:04 +00:00