<commit_before>
var AST      = require('../ast'),
    types    = require('../types'),
    Scope    = require('../typesystem/scope'),
    LLVM     = require('../../../llvm2'),
    Builtins = require('./llvm/builtins'),
    slots    = require('./llvm/slots')

// Unbox the slots module
var Slots         = slots.Slots,
    ConstantSlots = slots.ConstantSlots

var Int8Type    = LLVM.Types.Int8Type,
    Int32Type   = LLVM.Types.Int32Type,
    VoidType    = LLVM.Types.VoidType,
    Int8PtrType = LLVM.Types.pointerType(LLVM.Types.Int8Type)

var Int32Zero = LLVM.Library.LLVMConstInt(Int32Type, 0, true)

AST.Root.prototype.emitToFile = function (outFile) {
  var ctx = {}
  ctx.module       = new LLVM.Module('test')
  ctx.builder      = new LLVM.Builder()
  ctx.pass_manager = new LLVM.FunctionPassManager(ctx.module)
  ctx.funcs        = {}
  // Slots for global values (eg. builtins)
  ctx.globalSlots  = new ConstantSlots()
  // Maps sets of Slots to their associated Scope by the scope's ID
  ctx.slotsMap     = {}
  // Add the root scope to the slots map<commit_msg>Setup proper class for LLVM compilation contexts<commit_after>
var AST      = require('../ast'),
    types    = require('../types'),
    Scope    = require('../typesystem/scope'),
    LLVM     = require('../../../llvm2'),
    Builtins = require('./llvm/builtins'),
    slots    = require('./llvm/slots')

// Unbox the slots module
var Slots         = slots.Slots,
    ConstantSlots = slots.ConstantSlots

var Int8Type    = LLVM.Types.Int8Type,
    Int32Type   = LLVM.Types.Int32Type,
    VoidType    = LLVM.Types.VoidType,
    Int8PtrType = LLVM.Types.pointerType(LLVM.Types.Int8Type)

var Int32Zero = LLVM.Library.LLVMConstInt(Int32Type, 0, true)

function Context () {}

AST.Root.prototype.emitToFile = function (outFile) {
  var ctx = new Context()
  ctx.module       = new LLVM.Module('test')
  ctx.builder      = new LLVM.Builder()
  ctx.pass_manager = new LLVM.FunctionPassManager(ctx.module)
  ctx.funcs        = {}
  // Slots for global values (eg. builtins)
  ctx.globalSlots  = new ConstantSlots()
  // Maps sets of Slots to their associated Scope by the scope's ID
  ctx.slotsMap     = {}
  // Add the root scope to the slots map
{'fraction_non_alphanumeric': 0.1339366515837104, 'fraction_numerical': 0.012669683257918552, 'mean_word_length': 2.7538200339558574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '614917', 'n_tokens_mistral': 741, 'n_tokens_neox': 725, 'n_words': 173}