<commit_before>// Dependencies ---------------------------------------------------------------
// ----------------------------------------------------------------------------
var fs = require('fs'),
    path = require('path'),
    Parser = require('./parser/Parser'),
    Lexer = require('./parser/Lexer'),

    // Linking
    BuiltinMacro = require('./linker/Macro'),
    Linker = require('./linker/Linker'),

    // Entries
    Section = require('./data/Section'),
    Label = require('./data/Label'),
    Constant = require('./data/Constant'),
    Variable = require('./data/Variable'),
    DataBlock = require('./data/DataBlock'),
    Binary = require('./data/Binary'),
    Instruction = require('./data/Instruction'),
    Macro = require('./data/Macro'),

    // Errors
    Errors = require('./Errors');


// Assembly Source File Abstraction -------------------------------------------
// ----------------------------------------------------------------------------
function SourceFile(compiler, parent, file, section, index) {

    this.compiler = compiler;
    this.name = file.substring(compiler.base.length + 1);
    this.parent = parent;
    this.parentIndex = index;
    this.path = file;
    this.buffer = fs.readFileSync(this.path);

    // Code
    this.currentSection = section;
    this.instructions = [];
    this.relativeJumpTargets = [];
    this.sections = [];
    this.labels = [];
    this.variables = [];
    this.binaryIncludes = [];
    this.dataBlocks = [];
    this.unresolvedSizes = [];
    this.names = new Object();

}

SourceFile.prototype = {

    parse: function() {
        this.parser = new Parser(this, new Lexer(this));
        this.parser.parse();
    },

    include: function(file, index) {

        // Relative includes
        if (file.substring(0, 1) === '/') {
            file = path.join(this.compiler.base, file.substring(1));

        } else {
            file = path.join(path.dirname(this.path), file);
        }

        // Check for circular includes<commit_msg>Replace new Object() call with literal<commit_after>// Dependencies ---------------------------------------------------------------
// ----------------------------------------------------------------------------
var fs = require('fs'),
    path = require('path'),
    Parser = require('./parser/Parser'),
    Lexer = require('./parser/Lexer'),

    // Linking
    BuiltinMacro = require('./linker/Macro'),
    Linker = require('./linker/Linker'),

    // Entries
    Section = require('./data/Section'),
    Label = require('./data/Label'),
    Constant = require('./data/Constant'),
    Variable = require('./data/Variable'),
    DataBlock = require('./data/DataBlock'),
    Binary = require('./data/Binary'),
    Instruction = require('./data/Instruction'),
    Macro = require('./data/Macro'),

    // Errors
    Errors = require('./Errors');


// Assembly Source File Abstraction -------------------------------------------
// ----------------------------------------------------------------------------
function SourceFile(compiler, parent, file, section, index) {

    this.compiler = compiler;
    this.name = file.substring(compiler.base.length + 1);
    this.parent = parent;
    this.parentIndex = index;
    this.path = file;
    this.buffer = fs.readFileSync(this.path);

    // Code
    this.currentSection = section;
    this.instructions = [];
    this.relativeJumpTargets = [];
    this.sections = [];
    this.labels = [];
    this.variables = [];
    this.binaryIncludes = [];
    this.dataBlocks = [];
    this.unresolvedSizes = [];
    this.names = {};

}

SourceFile.prototype = {

    parse: function() {
        this.parser = new Parser(this, new Lexer(this));
        this.parser.parse();
    },

    include: function(file, index) {

        // Relative includes
        if (file.substring(0, 1) === '/') {
            file = path.join(this.compiler.base, file.substring(1));

        } else {
            file = path.join(path.dirname(this.path), file);
        }

        // Check for circular includes
{'fraction_non_alphanumeric': 0.27603264902300273, 'fraction_numerical': 0.001978728666831561, 'mean_word_length': 1.6483300589390963, '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': '5240818', 'n_tokens_mistral': 1057, 'n_tokens_neox': 1018, 'n_words': 204}