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
// | |
// Collector.cpp | |
// Dev | |
// | |
// Created by Taylor Holliday on 6/14/13. | |
// This file is in the public domain. | |
// | |
#include "gc2/Collector.hpp" |
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
#[derive(Debug)] | |
struct Node { } | |
#[derive(Copy, Clone, Debug)] | |
struct Wire { | |
from: u32, // node index | |
to: u32, // node index | |
} |
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
#pragma once | |
template<typename> | |
class func; | |
// Alternative to std::function for when compile time is | |
// more important than runtime performance. Doesn't pull in | |
// any headers. | |
template<typename Result, typename... Arguments> | |
class func<Result (Arguments...)> { |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <iostream> | |
#include <type_traits> | |
// Big stack. | |
static size_t stackSize = 1024*1024*10; | |
static thread_local uint8_t* start = nullptr; |