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
// Run using: ldc2 --run format_timetrace.d <your .time-trace file> | |
// Outputs timetrace.txt in current dir | |
import std.stdio; | |
import std.file; | |
import std.json; | |
import std.range; | |
import std.conv; | |
import std.algorithm; |
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
// Test importC bitfields. | |
// Generates random bitfield structure type, generates the C code and header file, generates D file that tests reading/writing from bitfields in C-land and D-land. | |
/+ | |
struct Test { | |
{<empty>|some __alignment...} {<empty>|signed|unsigned} {int|char|long|size_t|float|...} member1 {<empty>|:<some number 0..bitwidth of the storage type}; | |
... repeat for member2, member3, random number of members | |
} | |
void resetMember1_C(Test* t) |
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
#!/bin/bash | |
set -e | |
# Grab CE's GCC 6.3.0 for its binutils (which is what the site uses to link currently) | |
mkdir -p /opt/compiler-explorer | |
pushd /opt/compiler-explorer | |
curl -sL https://s3.amazonaws.com/compiler-explorer/opt/gcc-6.3.0.tar.xz | tar Jxf - | |
popd |