This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "ponybench" | |
primitive A | |
primitive B | |
primitive C | |
primitive D | |
actor Main is BenchmarkList | |
new create(env: Env) => | |
PonyBench(env, this) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/src/libponyc/codegen/codegen.c w/src/libponyc/codegen/codegen.c | |
index 0aa8de7fb..484f3948a 100644 | |
--- i/src/libponyc/codegen/codegen.c | |
+++ w/src/libponyc/codegen/codegen.c | |
@@ -336,12 +336,13 @@ static void init_runtime(compile_t* c) | |
# endif | |
#endif | |
- // void pony_sendv(i8*, __object*, $message*, $message*) | |
+ // void pony_sendv(i8*, __object*, $message*, $message*, i1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git i/src/libponyc/codegen/gencall.c w/src/libponyc/codegen/gencall.c | |
index 06f62ec92..f2007da29 100644 | |
--- i/src/libponyc/codegen/gencall.c | |
+++ w/src/libponyc/codegen/gencall.c | |
@@ -271,8 +271,12 @@ static void set_descriptor(compile_t* c, reach_type_t* t, LLVMValueRef value) | |
LLVMValueRef desc_ptr = LLVMBuildStructGEP(c->builder, value, 0, ""); | |
LLVMValueRef store = LLVMBuildStore(c->builder, | |
((compile_type_t*)t->c_type)->desc, desc_ptr); | |
+#if PONY_LLVM >= 400 | |
+ tbaa_tag(c, c->tbaa_descptr, store); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor Main | |
new create(env: Env) => | |
let x = String | |
x.reserve(USize(-1)) | |
while true do | |
x.recalc() | |
x.push(1) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use "collections" | |
use "files" | |
actor Main | |
new create(env: Env) => | |
try | |
let auth = env.root as AmbientAuth | |
let dir_path = FilePath(auth, "traits_bench") | |
if not dir_path.mkdir() then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actor A | |
let _array: Array[U8] = Array[U8] | |
be send(b: B) => | |
let array_copy = recover trn Array[U8] end | |
array_copy.reserve(_array.size()) | |
for i in _array.values() do | |
array_copy.push(i) | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
var i: USize = 0 | |
fun ref boom() => i = 3 | |
actor Main | |
new create(env: Env) => | |
let a: Foo val = Foo | |
env.out.print(a.i.string()) | |
bla[Foo val](a) | |
env.out.print(a.i.string()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void* ponyint_mpmcq_pop(mpmcq_t* q) | |
{ | |
size_t my_ticket = atomic_fetch_add_explicit(&q->ticket, 1, | |
memory_order_relaxed); | |
while(my_ticket != atomic_load_explicit(&q->waiting_for, | |
memory_order_relaxed)) | |
ponyint_cpu_relax(); | |
atomic_thread_fence(memory_order_acquire); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <benchmark/benchmark.h> | |
static void BM_clz(benchmark::State& state) | |
{ | |
unsigned long x = 5; | |
while (state.KeepRunning()) | |
{ | |
benchmark::DoNotOptimize(&x); | |
unsigned long t = x - 1; | |
if (t == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <benchmark/benchmark.h> | |
extern "C" | |
{ | |
void* ponyint_pool_alloc(size_t index); | |
void ponyint_pool_free(size_t index, void* p); | |
} | |
struct PreAlloc | |
{ |
NewerOlder