Skip to content

Commit 2b4e28f

Browse files
author
Aidan Lee
committed
Merge branch 'master' into faster-hxcpp-h
2 parents c2a9b45 + e3d16f0 commit 2b4e28f

94 files changed

Lines changed: 1993 additions & 1061 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.

.github/workflows/test.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,30 @@ jobs:
196196
steps:
197197
- name: checkout
198198
uses: actions/checkout@v4
199+
- name: setup
200+
uses: ./.github/workflows/setup
201+
with:
202+
haxe: ${{ inputs.haxe }}
203+
- name: Get Haxe commit SHA
204+
if: inputs.haxe == 'latest'
205+
id: haxe_sha
206+
shell: bash
207+
working-directory:
208+
${{github.workspace}}
209+
env:
210+
GH_TOKEN: ${{ github.token }}
211+
run: |
212+
version=$(haxe --version)
213+
short_sha=${version##*+}
214+
full_sha=$(gh api repos/HaxeFoundation/haxe/commits/$short_sha --jq '.sha')
215+
echo "Haxe version: $version"
216+
echo "sha=$full_sha" >> "$GITHUB_OUTPUT"
217+
echo "Commit SHA: $short_sha, Full SHA: $full_sha"
199218
- name: checkout haxe (latest)
200219
if: inputs.haxe == 'latest'
201220
uses: actions/checkout@v4
202221
with:
222+
ref: ${{ steps.haxe_sha.outputs.sha }}
203223
repository: HaxeFoundation/haxe
204224
path: haxe
205225
- name: checkout haxe (stable)
@@ -209,10 +229,6 @@ jobs:
209229
repository: HaxeFoundation/haxe
210230
path: haxe
211231
ref: ${{ inputs.haxe }}
212-
- name: setup
213-
uses: ./.github/workflows/setup
214-
with:
215-
haxe: ${{ inputs.haxe }}
216232
- name: install haxe libs
217233
run: haxelib install compile-cpp.hxml --always
218234
# haxe 4 tests don't build with latest utest

include/cpp/Pointer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ class Pointer_obj
503503
}
504504

505505
template<typename T>
506-
inline static AutoCast ofArray(::Array<T> array) { return AutoCast(&array[0]); }
506+
inline static AutoCast ofArray(::Array<T> array) { return AutoCast(array->Pointer()); }
507507
inline static AutoCast ofArray(Dynamic inVal)
508508
{
509509
if (inVal==null() || !inVal->__IsArray())

include/cpp/encoding/Utf16.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ namespace cpp
99
static bool isEncoded(const String& string);
1010

1111
static int getByteCount(const null&);
12-
static int getByteCount(const char32_t& codepoint);
12+
static int getByteCount(char32_t codepoint);
1313
static int64_t getByteCount(const String& string);
1414

1515
static int getCharCount(const null&);
16-
static int getCharCount(const char32_t& codepoint);
16+
static int getCharCount(char32_t codepoint);
1717
static int64_t getCharCount(const String& string);
1818

1919
static int encode(const null&, const cpp::marshal::View<uint8_t>& buffer);
20-
static int encode(const char32_t& codepoint, const cpp::marshal::View<uint8_t>& buffer);
20+
static int encode(char32_t codepoint, const cpp::marshal::View<uint8_t>& buffer);
2121
static int64_t encode(const String& string, const cpp::marshal::View<uint8_t>& buffer);
2222

2323
static char32_t codepoint(const cpp::marshal::View<uint8_t>& buffer);

include/cpp/encoding/Utf8.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ namespace cpp
77
struct Utf8 final
88
{
99
static int getByteCount(const null&);
10-
static int getByteCount(const char32_t& codepoint);
10+
static int getByteCount(char32_t codepoint);
1111
static int64_t getByteCount(const String& string);
1212

1313
static int getCharCount(const null&);
14-
static int getCharCount(const char32_t& codepoint);
14+
static int getCharCount(char32_t codepoint);
1515
static int64_t getCharCount(const String& string);
1616

1717
static int encode(const null&, const cpp::marshal::View<uint8_t>& buffer);
18-
static int encode(const char32_t& codepoint, const cpp::marshal::View<uint8_t>& buffer);
18+
static int encode(char32_t codepoint, const cpp::marshal::View<uint8_t>& buffer);
1919
static int64_t encode(const String& string, const cpp::marshal::View<uint8_t>& buffer);
20+
static Array<uint8_t> encode(const String& string);
2021

2122
static char32_t codepoint(const cpp::marshal::View<uint8_t>& buffer);
2223
static String decode(const cpp::marshal::View<uint8_t>& buffer);

include/hx/TelemetryTracy.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#define TRACY_ENABLE
99
#include <hxcpp.h>
10-
#include "../../project/thirdparty/tracy-0.12.0/tracy/TracyC.h"
11-
#include "../../project/thirdparty/tracy-0.12.0/tracy/Tracy.hpp"
10+
#include "../../project/thirdparty/tracy-0.13.1/tracy/TracyC.h"
11+
#include "../../project/thirdparty/tracy-0.13.1/tracy/Tracy.hpp"
1212

1313
#ifdef HXCPP_TRACY_MEMORY
1414
#ifdef HXCPP_GC_MOVING

project/thirdparty/tracy-0.12.0/TracyClient.cpp renamed to project/thirdparty/tracy-0.13.1/TracyClient.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,11 @@
3232
#include "client/TracyOverride.cpp"
3333
#include "client/TracyKCore.cpp"
3434

35-
#if defined(TRACY_HAS_CALLSTACK)
36-
# if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
37-
# include "libbacktrace/alloc.cpp"
38-
# include "libbacktrace/dwarf.cpp"
39-
# include "libbacktrace/fileline.cpp"
40-
# include "libbacktrace/mmapio.cpp"
41-
# include "libbacktrace/posix.cpp"
42-
# include "libbacktrace/sort.cpp"
43-
# include "libbacktrace/state.cpp"
44-
# if TRACY_HAS_CALLSTACK == 4
45-
# include "libbacktrace/macho.cpp"
46-
# else
47-
# include "libbacktrace/elf.cpp"
48-
# endif
49-
# include "common/TracyStackFrames.cpp"
50-
# endif
35+
#ifdef TRACY_ROCPROF
36+
# include "client/TracyRocprof.cpp"
5137
#endif
52-
5338
#ifdef _MSC_VER
5439
# pragma comment(lib, "ws2_32.lib")
55-
# pragma comment(lib, "dbghelp.lib")
5640
# pragma comment(lib, "advapi32.lib")
5741
# pragma comment(lib, "user32.lib")
5842
# pragma warning(pop)
File renamed without changes.

project/thirdparty/tracy-0.12.0/client/TracyArmCpuTable.hpp renamed to project/thirdparty/tracy-0.13.1/client/TracyArmCpuTable.hpp

File renamed without changes.

0 commit comments

Comments
 (0)