Skip to content

Instantly share code, notes, and snippets.

@pcwalton
pcwalton / backtrace.pre-ap.s
Created November 6, 2022 00:12
backtrace::symbolize::gimli::macho::Object::parse codegen, NO argument promotion
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 7
.intel_syntax noprefix
.p2align 4, 0x90 ## -- Begin function _ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E
__ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E: ## @"_ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E"
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, _rust_eh_personality
.cfi_lsda 16, Lexception0
## %bb.0:
@pcwalton
pcwalton / backtrace.post-ap.s
Created November 6, 2022 00:10
backtrace::symbolize::gimli::macho::Object::parse codegen, max elements = 99
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 7
.intel_syntax noprefix
.p2align 4, 0x90 ## -- Begin function _ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E
__ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E: ## @"_ZN4core3ptr108drop_in_place$LT$alloc..collections..btree..map..BTreeMap$LT$u64$C$gimli..read..abbrev..Abbreviation$GT$$GT$17hb552a67d31141ef1E"
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, _rust_eh_personality
.cfi_lsda 16, Lexception0
## %bb.0:
@pcwalton
pcwalton / backtrace.post-ap.ll
Created November 6, 2022 00:05
backtrace::symbolize::gimli::macho::Object::parse, 99 elements of argument promotion
; ModuleID = '/Users/pcwalton/Desktop/backtrace.preap.ll'
source_filename = "backtrace.e3abbc31-cgu.0"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"
%0 = type { [1 x i64], ptr, [1 x i64] }
%1 = type { %2, %3, i64 }
%2 = type {}
%3 = type { %4, %4 }
%4 = type { i64, [3 x i64] }
@pcwalton
pcwalton / backtrace.pre-ap.ll
Created November 6, 2022 00:03
backtrace::symbolize::gimli::macho::Object::parse, NO argument promotion
; ModuleID = '<stdin>'
source_filename = "backtrace.e3abbc31-cgu.0"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"
%0 = type { [1 x i64], ptr, [1 x i64] }
%1 = type { %2, %3, i64 }
%2 = type {}
%3 = type { %4, %4 }
%4 = type { i64, [3 x i64] }
<!DOCTYPE html>
<html>
<style>
body {
font-size: 18px;
}
#a {
float: left;
width: 64px;
height: 32px;
diff --git a/gulpfile.js b/gulpfile.js
index a850f717..ba7cf4ad 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -211,7 +211,7 @@ function createWebpackConfig(defines, output) {
// `web-streams-polyfill` (already using a transpiled file), and
// `src/core/{glyphlist,unicode}.js` (Babel is too slow for those)
// should be excluded from processing.
- exclude: /(node_modules[\\\/]core-js|node_modules[\\\/]web-streams-polyfill|src[\\\/]core[\\\/](glyphlist|unicode))/,
+ exclude: /(node_modules[\\\/]core-js|node_modules[\\\/]web-streams-polyfill|src[\\\/]core[\\\/](glyphlist|unicode))|(\.wasm$)/,
#version 430
precision highp float;
precision highp sampler2D;
uniform sampler2D uBSPTree;
uniform sampler2D uSDF;
uniform vec4 uBGColor;
uniform vec4 uFGColor;
// pathfinder/examples/canvas_nanovg/src/main.rs
//
// Copyright © 2020 The Pathfinder Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@pcwalton
pcwalton / gist:60ff97c2353feda11638be10118851f2
Last active January 7, 2020 18:03
hello world rust syscalls
[startup] execve("./hello", ["./hello"], 0x7fffb6636328 /* 40 vars */) = 0
[ld.so] brk(NULL) = 0x559fd931a000
[ld.so] arch_prctl(0x3001 /* ARCH_??? */, 0x7ffec2e57b80) = -1 EINVAL (Invalid argument)
[ld.so] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[ld.so] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[ld.so] fstat(3, {st_mode=S_IFREG|0644, st_size=182567, ...}) = 0
[ld.so] mmap(NULL, 182567, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe17c3ef000
[ld.so] close(3) = 0
[ld.so] openat(AT_FDCWD, "/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[ld.so] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\22\0\0\0\0\0\0"..., 832) = 832
@pcwalton
pcwalton / tagarena.rs
Created September 5, 2019 20:51
TagArena strawman proposal
// tagarena strawman
// pcwalton, 9/5/2019
// Allocate memory freely within a TagArena and get back Tags, which you can
// use to fetch the object later.
struct TagArena {
// Globally unique ID for this arena, to prevent looking up a tag in the
// wrong arena.
id: u32,
...