Skip to content

Instantly share code, notes, and snippets.

View arnsholt's full-sized avatar

Arne Skjærholt arnsholt

View GitHub Profile
Test Summary Report
-------------------
t/spec/S02-types/isDEPRECATED.rakudo.jvm (Wstat: 0 Tests: 0 Failed: 0)
Parse errors: Bad plan. You planned 20 tests but ran 0.
t/spec/S02-types/mixhash.rakudo.jvm (Wstat: 0 Tests: 191 Failed: 1)
Failed test: 72
t/spec/S04-phasers/rvalue.rakudo.jvm (Wstat: 0 Tests: 16 Failed: 0)
TODO passed: 10-12
t/spec/S05-mass/properties-derived.rakudo.jvm (Wstat: 0 Tests: 256 Failed: 0)
TODO passed: 241-246
@arnsholt
arnsholt / test
Created November 11, 2014 18:06
QAST and bytecode dump
- QAST::CompUnit
- QAST::Block
- QAST::Stmts
- QAST::Var(local __args__ :decl(param))
- QAST::Stmts
- QAST::Stmts
- QAST::Op(say)
- QAST::Var(lexical x :decl())
MoarVM dump of binary compilation unit:
@arnsholt
arnsholt / sample.py
Created January 5, 2015 20:52
Should throw an exception
a=2
def foo():
if 0: a = 1
print(a)
foo()
class C:
def __new__(cls, *args):
print("C.__new__")
return super().__new__(cls)
class D:
pass
C(1,2,3)
D(1,2,3)
From 2c199b71040c8469d6ae204cd799f5c15047f8aa Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Arne=20Skj=C3=A6rholt?= <arnsholt@gmail.com>
Date: Tue, 8 Jun 2010 18:33:53 +0200
Subject: [PATCH] Mark test and clean targets as phony.
---
ufo | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ufo b/ufo
From 688c9cd76289ce72ce37ace500f33a2b001a2c9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Arne=20Skj=C3=A6rholt?= <arnsholt@gmail.com>
Date: Wed, 30 Jun 2010 17:41:08 +0200
Subject: [PATCH] Only print unique directories, and not their prefixes. v2.
---
ufo | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/ufo b/ufo
From e978a1e6a0c7377e68452b5165b8ce0214dbcce3 Mon Sep 17 00:00:00 2001
From: Arne <arnsholt@gmail.com>
Date: Sat, 3 Jul 2010 18:39:48 +0200
Subject: [PATCH] Fix bug(s) in unique-dir feature.
---
ufo | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ufo b/ufo
/* Helper for finding a slot number. */
static INTVAL try_get_slot(PARROT_INTERP, CStructREPRData *repr_data, PMC *class_key, STRING *name, PMC **attrptr) {
INTVAL slot = -1;
if (repr_data->name_to_index_mapping) {
CStructNameMap *cur_map_entry = repr_data->name_to_index_mapping;
while (cur_map_entry->class_key != NULL) {
if (cur_map_entry->class_key == class_key) {
PMC *slot_pmc = VTABLE_get_pmc_keyed_str(interp, cur_map_entry->name_map, name);
if (!PMC_IS_NULL(slot_pmc)) {
slot = VTABLE_get_integer(interp, slot_pmc);
@arnsholt
arnsholt / CStruct.c
Created April 17, 2012 08:30
P6int.c segfault
/* Binds the given value to the specified attribute. */
static void bind_attribute_boxed(PARROT_INTERP, STable *st, void *data, PMC *class_handle, STRING *name, INTVAL hint, PMC *value) {
CStructREPRData *repr_data = (CStructREPRData *)st->REPR_data;
CStructBody *body = (CStructBody *)data;
STRING *type_str = Parrot_str_new_constant(interp, "type");
STRING *carray_str = Parrot_str_new_constant(interp, "CArray");
INTVAL slot;
/* Try to find the slot. */
slot = hint >= 0 ? hint :
@arnsholt
arnsholt / valgrind.log
Created April 29, 2012 11:55
Valgrind log excerpt
==74142== Invalid read of size 1
==74142== at 0x7FFFFFE007D4: ???
==74142== by 0x10AE2A51F: sqlite3VdbeExec (in /usr/lib/libsqlite3.dylib)
==74142== by 0x10AE2B797: sqlite3_step (in /usr/lib/libsqlite3.dylib)
==74142== by 0x10516CB8C: dcCall_x64_sysv (in /Users/arne/programming/perl/nqp/install/lib/parrot/4.3.0-devel/dynext/nqp_dyncall_ops.bundle)
==74142== by 0x7FFF5FBFEE3F: ???
==74142== by 0x105159010: Parrot_nqp_native_call_p_p_p_p (nqp_dyncall_ops.c:3723)
==74142== by 0x10874A91F: ???
==74142== by 0x1B: ???
==74142== by 0x10771F3EF: ???