Skip to content

Instantly share code, notes, and snippets.

...
bind | split-window -h
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind ` select-window -t 0
Starting test-runner.js...
---
>>> 00-runtime
>>> L׊
>>> X׊
>>> ]׊
>>> s
>>> h
>>> r׊
>>>
c.cdef(`
typedef int size_t;
typedef struct _IO_FILE FILE;
FILE *fopen( const char *filename, const char *mode );
FILE *fdopen( int fildes, const char *mode );
int fflush( FILE *stream );
int fclose( FILE *stream );
paulfryzel@ao:~/github/vendor/Higgs/source(master+)$ make test
python runtime/layout.py
dmd -m64 -O -L-ldl -J./ -unittest -debug -ofhiggs-test util/error.d util/id.d util/string.d util/misc.d util/bitset.d util/os.d parser/lexer.d parser/ast.d parser/vars.d parser/parser.d ir/ir.d ir/ops.d ir/iir.d ir/ast.d ir/peephole.d ir/slotalloc.d ir/livevars.d ir/inlining.d ir/typeprop.d runtime/vm.d runtime/layout.d runtime/string.d runtime/object.d runtime/gc.d jit/x86.d jit/codeblock.d jit/util.d jit/moves.d jit/ops.d jit/jit.d repl.d options.d stats.d main.d jit/tests.d parser/tests.d runtime/tests.d runtime/ffitests.d
time ./higgs-test test-runner.js
bit set
machine code generation
machine code execution
simple expression parsing
source file parsing
JIT core
// make objectprint=on disassembler=on -j4 ia32
// d8 --trace-hydrogen --print-opt-code --trace-phase=Z --trace-deopt --code-comments --emit-opt-code-positions --redirect-code-traces --redirect-code-traces-to=code.asm vector3.js
// d8 --prof vector3.js
// v8/tools/mac-tick-processor v8.log
// https://gist.github.com/trevnorris/7712539
// eager: Occurs with unexpected element transitions.
// lazy: Occurs when an assumption is made on a global which no longer holds true.
// soft: As v8 collects type information on functions it will mark dead subgraphs of the
// AST (abstract syntax tree). If one of those marked graphs is called this will cause the
function Foo(obj) {
this.obj = obj;
this.time = Date.now();
}
function create() {
for (var i = 0; i < 1e6; i++) {
var f = new Foo({ foo: 42 });
}
}
Concurrent recompilation has been disabled for tracing.
[marking 0x3e1853b6e1b1 <JS Function IsPrimitive (SharedFunctionInfo 0x3e1853b38c39)> for recompilation, reason: small function, ICs with typeinfo: 0/0 (100%)]
-----------------------------------------------------------
Compiling method IsPrimitive using hydrogen
[optimizing 0x3e1853b6e1b1 <JS Function IsPrimitive (SharedFunctionInfo 0x3e1853b38c39)> - took 0.026, 123.850, 8.967 ms]
[marking 0x3e1853b68f91 <JS Function Instantiate (SharedFunctionInfo 0x3e1853b39121)> for recompilation, reason: small function, ICs with typeinfo: 6/8 (75%)]
[marking 0x3db4d560e649 <JS Function valueOf (SharedFunctionInfo 0x3e1853b30899)> for recompilation, reason: small function, ICs with typeinfo: 1/1 (100%)]
[marking 0x3db4d560ce51 <JS Function toString (SharedFunctionInfo 0x3e1853b336f1)> for recompilation, reason: small function, ICs with typeinfo: 1/1 (100%)]
-----------------------------------------------------------
Compiling method valueOf using hydrogen
@paulfryzel
paulfryzel / foo.js
Last active December 23, 2015 13:29
var parse = require('esprima').parse;
var generate = require('escodegen').generate;
function foo() {
var a = 1;
(function () {
var b = 2;
console.log(a);
})();
test('POST /photos', function (t) {
var payload = JSON.stringify(sample);
var route = { method: 'POST', url: '/photos', payload: payload};
server.inject(route, function (res) {
t.equal(200, res.statusCode, 'Should respond with 200');
t.ok(res.result, 'Should return a result');
sample._id = res.result.fields._id;
t.end();
});
});
".editorconfig
root = true
bundle/vim-jsbeautify/plugin/lib/beautify.js
[**.js]
; Path to the external file format
; The default is taken from the lib folder inside the folder extension.
path=~/.vim/bundle/vim-jsbeautify/plugin/lib/beautify.js
; Javascript interpreter to be invoked by default 'node'
bin=node