Skip to content

Commit 31d344a

Browse files
author
Aidan Lee
committed
Merge branch 'master' into gc-std-atomic
2 parents e2e5e0a + e3d16f0 commit 31d344a

103 files changed

Lines changed: 2123 additions & 1141 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/StdLibs.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,14 @@ double __hxcpp_time_stamp();
299299

300300
// --- vm/threading --------------------------------------------------------------------
301301

302-
#if (HXCPP_API_LEVEL>=500)
303-
Dynamic __hxcpp_thread_create(hx::Callable<void()> inFunc);
304-
#else
302+
#if (HXCPP_API_LEVEL<500)
303+
305304
Dynamic __hxcpp_thread_create(Dynamic inFunc);
306-
#endif
305+
307306
Dynamic __hxcpp_thread_current();
308307
void __hxcpp_thread_send(Dynamic inThread, Dynamic inMessage);
309308
Dynamic __hxcpp_thread_read_message(bool inBlocked);
310-
bool __hxcpp_is_current_thread(hx::Object *inThread);
309+
bool __hxcpp_is_current_thread(hx::Object* inThread);
311310

312311
Dynamic __hxcpp_mutex_create();
313312
void __hxcpp_mutex_acquire(Dynamic);
@@ -324,21 +323,23 @@ void __hxcpp_condition_acquire(Dynamic);
324323
bool __hxcpp_condition_try_acquire(Dynamic);
325324
void __hxcpp_condition_release(Dynamic);
326325
void __hxcpp_condition_wait(Dynamic);
327-
bool __hxcpp_condition_timed_wait(Dynamic,double);
326+
bool __hxcpp_condition_timed_wait(Dynamic, double);
328327
void __hxcpp_condition_signal(Dynamic);
329328
void __hxcpp_condition_broadcast(Dynamic);
330329

331330
Dynamic __hxcpp_lock_create();
332-
bool __hxcpp_lock_wait(Dynamic inlock,double inTime);
331+
bool __hxcpp_lock_wait(Dynamic inlock, double inTime);
333332
void __hxcpp_lock_release(Dynamic inlock);
334333

335334
Dynamic __hxcpp_deque_create();
336-
void __hxcpp_deque_add(Dynamic q,Dynamic inVal);
337-
void __hxcpp_deque_push(Dynamic q,Dynamic inVal);
338-
Dynamic __hxcpp_deque_pop(Dynamic q,bool block);
335+
void __hxcpp_deque_add(Dynamic q, Dynamic inVal);
336+
void __hxcpp_deque_push(Dynamic q, Dynamic inVal);
337+
Dynamic __hxcpp_deque_pop(Dynamic q, bool block);
339338

340339
Dynamic __hxcpp_tls_get(int inID);
341-
void __hxcpp_tls_set(int inID,Dynamic inVal);
340+
void __hxcpp_tls_set(int inID, Dynamic inVal);
341+
342+
#endif
342343

343344
bool _hx_atomic_exchange_if(::cpp::Pointer<cpp::AtomicInt> inPtr, int test, int newVal );
344345
int _hx_atomic_inc(::cpp::Pointer<cpp::AtomicInt> inPtr );

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

include/hx/thread/Thread.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ namespace hx
2525

2626
virtual String getName() = 0;
2727
virtual void setName(const String& name) = 0;
28-
29-
virtual String toString() override = 0;
30-
31-
virtual void __Mark(HX_MARK_PARAMS) override = 0;
32-
#ifdef HXCPP_VISIT_ALLOCS
33-
virtual void __Visit(HX_VISIT_PARAMS) override = 0;
34-
#endif
3528
};
3629
}
3730
}

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.

0 commit comments

Comments
 (0)