Skip to content

Commit 1f4fcf9

Browse files
committed
sync on 2026/05/23, rev 6552bf3b2222466802e0ac7b4a550752cfbac036
1 parent 67facf6 commit 1f4fcf9

3,241 files changed

Lines changed: 26960 additions & 104644 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DagorEngine.rev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b5a188ca1b45a3e49ac6629ea9ab82cb98e60fbf
1+
6552bf3b2222466802e0ac7b4a550752cfbac036

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Restart the command line console to make the new environment variables available
4949

5050
## How to Build: Prebuilt Binaries
5151

52-
You will need to download and extract additional binary files (as of 2026/04/30) from the CDN into the X:\develop\DagorEngine folder:
53-
* [tools-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/tools-base.7z) - contains initial data for tools
52+
You will need to download and extract additional binary files (as of 2026/05/23) from the CDN into the X:\develop\DagorEngine folder:
53+
* [tools-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.05.23/tools-base.7z) - contains initial data for tools
5454
* [samples-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/samples-base.7z) - contains initial assets that will be compiled into binary files that will be loaded by the game (samples)
5555
* [outerSpace-devsrc.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/outerSpace-devsrc.7z) - contains initial assets for OuterSpace sample project
5656
* [dngSceneViewer.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/dngSceneViewer.7z) - contains binary data for east_district sample with dngSceneViewer (windows-x86_64 executables also included)
@@ -80,7 +80,7 @@ X:\develop\DagorEngine\samples\testGI\game
8080

8181
## How to Build: Build from Source Code
8282

83-
First unpack [tools-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/tools-base.7z) to DagorEngine root to get mandatory binary files in their place.
83+
First unpack [tools-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.05.23/tools-base.7z) to DagorEngine root to get mandatory binary files in their place.
8484

8585
If you are going to run samples unpack [samples-base.7z](https://dagorenginedata.cdn.gaijin.net/head-2026.04.30/samples-base.7z) to DagorEngine root (if you plan to only build EXE and shaders these binary data are not mandatory).
8686

_docs/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
sys.path.insert(0, os.path.abspath('source/'))
1414
sys.path.insert(0, os.path.abspath('.'))
1515
sys.path.insert(0, os.path.abspath('..'))
16-
dagor_prog_root = os.path.abspath('../prog')
17-
sys.path.append(os.path.join(dagor_prog_root, "1stPartyLibs/daScript/doc/source"))
1816

1917
# ==============================================================================
2018
# General configuration

outerSpace/prog/build.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@
6363
run([FONTGEN_EXE, 'fontgenPC.blk', '-fullDynamic', '-quiet'], cwd='../develop/gui/fonts')
6464
run([VROMFS_PACKER_EXE, 'skin.vromfs.blk', '-quiet'], cwd='../develop/gui')
6565
run([VROMFS_PACKER_EXE, 'fonts.vromfs.blk', '-quiet'], cwd='../develop/gui')
66+
67+
if 'shaders' in BUILD_COMPONENTS and 'vromfs' in BUILD_COMPONENTS:
68+
run([sys.executable, './update_snapshot.py', '--no-cvs-update'], cwd='./tools')

prog/1stPartyLibs/daScript/daslib/aot_cpp.das

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ options unsafe_table_lookup = false
1919

2020
def aotFieldName(name : string) : string {
2121
var result = replace(name, "`", "__");
22-
// Escape names that clash with Windows SDK macros (e.g. DELETE from winnt.h)
23-
if (result == "DELETE") {
22+
// Escape names that clash with C++ keywords (e.g. `char`, `register`, `extern`)
23+
// or with Windows SDK macros (e.g. `DELETE` from winnt.h).
24+
if (is_cpp_keyword(result) || result == "DELETE") {
2425
result = "_f_" + result;
2526
}
2627
return result;
@@ -223,10 +224,14 @@ def hex_char(var Ch : int) {
223224
}
224225

225226
def aotSuffixNameEx(funcName : das_string; suffix : string) {
226-
var prefix = false;
227+
return aotSuffixNameEx(string(funcName), suffix);
228+
}
229+
230+
def aotSuffixNameEx(funcName : string; suffix : string) {
231+
var prefix = is_cpp_keyword(funcName);
227232

228233
let name = build_string() $(var writer) {
229-
for (ch in string(funcName)) {
234+
for (ch in funcName) {
230235
if (is_alnum(ch) || ch == '_') {
231236
writer |> write_char(ch);
232237
} else {
@@ -269,7 +274,21 @@ def aotSuffixNameEx(funcName : das_string; suffix : string) {
269274
}
270275

271276
def aotStructName(st : Structure?) {
272-
return aotSuffixNameEx(st.name, "");
277+
// Suffix "_S" is prepended only when `st.name` is a C++ keyword (or contains
278+
// a non-alnum char, which the parser disallows for struct names — so in
279+
// practice: keyword names only). Non-keyword struct names emit unchanged.
280+
return aotSuffixNameEx(st.name, "_S");
281+
}
282+
283+
def aotEnumName(enu : Enumeration?) {
284+
// Same shape as aotStructName but for enums.
285+
return aotSuffixNameEx(enu.name, "_E");
286+
}
287+
288+
def aotEnumValueName(name : das_string) {
289+
// Used for enum value identifiers inside `enum class { ... }` body and at access sites
290+
// (`EnumName::ValueName`). Prepended `_V` only for C++ keyword names.
291+
return aotSuffixNameEx(name, "_V");
273292
}
274293

275294

@@ -370,9 +389,9 @@ def describeCppTypeEx(typeDecl : TypeDeclPtr;
370389
if (typeDecl.enumType.external) {
371390
write(writer, "DAS_COMMENT(bound_enum) {typeDecl.enumType.cppName}");
372391
} elif (typeDecl.enumType._module.name.empty()) {
373-
write(writer, "DAS_COMMENT(enum) {typeDecl.enumType.name}");
392+
write(writer, "DAS_COMMENT(enum) {aotEnumName(typeDecl.enumType)}");
374393
} else {
375-
write(writer, "DAS_COMMENT(enum) {aotModuleName(typeDecl.enumType._module)}::{typeDecl.enumType.name}")
394+
write(writer, "DAS_COMMENT(enum) {aotModuleName(typeDecl.enumType._module)}::{aotEnumName(typeDecl.enumType)}")
376395
}
377396
} else {
378397
write(writer, "DAS_COMMENT(unspecified enumeration)")
@@ -723,7 +742,9 @@ class public AotDebugInfoHelper {
723742
writeArgTypes(writer, fld, suffix);
724743
writeArgNames(writer, fld, suffix);
725744
let prefix = (info.module_name |> length() > 0) ? "{info.module_name}::" : "";
726-
write(*writer, "VarInfo {structInfoName(info)}_field_{fi} = \{ {describeCppVarInfo(prefix + info.name, fld,suffix)} \};\n");
745+
// info.name is the struct's daslang name; mangle if C++ keyword so offsetof()
746+
// in describeCppVarInfo sees the same identifier the struct decl emitted.
747+
write(*writer, "VarInfo {structInfoName(info)}_field_{fi} = \{ {describeCppVarInfo(prefix + aotSuffixNameEx(info.name, "_S"), fld,suffix)} \};\n");
727748
if (fld.annotation_arguments != null) {
728749
if (length(*fld.annotation_arguments) > 0) {
729750
let annArgs = build_string() $(var sb) {
@@ -1177,10 +1198,10 @@ class public CppAot : AstVisitor {
11771198
write(*ss, "#if 0 // external enum\n");
11781199
}
11791200
write(*ss, "namespace {aotModuleName(enu._module)} \{\n\n");
1180-
write(*ss, "enum class {enu.name} : {das_to_cppString(enu.baseType)} \{\n");
1201+
write(*ss, "enum class {aotEnumName(enu)} : {das_to_cppString(enu.baseType)} \{\n");
11811202
}
11821203
def override preVisitEnumerationValue(enu : EnumerationPtr; name : das_string; value : ExpressionPtr; last : bool) {
1183-
write(*ss, " {name} = {das_to_cppString(enu.baseType)}(");
1204+
write(*ss, " {aotEnumValueName(name)} = {das_to_cppString(enu.baseType)}(");
11841205
}
11851206
def override visitEnumerationValue(enu : EnumerationPtr; name : das_string; value : ExpressionPtr; last : bool) {
11861207
write(*ss, ")");
@@ -2081,7 +2102,7 @@ class public CppAot : AstVisitor {
20812102
write(*ss, ", {vtype.get_variant_field_offset(field.fieldIndex)}, {field.fieldIndex}>::get(");
20822103
} else {
20832104
let mod_name = (vtype.structType._module.name.empty() ? "" : string(vtype.structType._module.name) + "::");
2084-
write(*ss, ",&{mod_name}{vtype.structType.name}::{aotFieldName(string(field.name))}>::get(");
2105+
write(*ss, ",&{mod_name}{aotStructName(vtype.structType)}::{aotFieldName(string(field.name))}>::get(");
20852106
}
20862107
}
20872108
def override visitExprSafeField(var field : ExprSafeField?) : ExpressionPtr {
@@ -2264,7 +2285,7 @@ class public CppAot : AstVisitor {
22642285
let cfg = DescribeConfig(skip_ref = true, skip_const = true, redundant_const = false, cross_platform = cross_platform);
22652286
let type_str = describeCppType(c._type, cfg);
22662287
write(*ss, type_str);
2267-
var ctext = string(c.value);
2288+
var ctext = aotEnumValueName(c.value);
22682289
for (ee in c.enumType.list) {
22692290
if (ee.name == c.value) {
22702291
if (!ee.cppName.empty()) {

prog/1stPartyLibs/daScript/doc/getting_started.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)