<commit_before>/**
 * Created by Epsirom on 14-5-30.
 */

console.log("配置成功了耶~");

var C2LLVM  = require('../index');

var compiler = new C2LLVM('SimpleCv4');
var result = compiler.compile("tests/data/arraylist.c");

var fs = require('fs');

fs.writeFileSync('tests/data/result.ll', result);<commit_msg>增加测试的提示信息。<commit_after>/**
 * Created by Epsirom on 14-5-30.
 */

var t, ts;

ts = new Date().getTime();
console.log('开始载入C2LLVM包。');
t = new Date().getTime();
var C2LLVM  = require('../index');
console.log('已载入C2LLVM包。用时：' + (new Date().getTime() - t) + 'ms');

console.log('----------------------');

console.log('开始载入SimpleCv4。');
t = new Date().getTime();
var compiler = new C2LLVM('SimpleCv4');
console.log('已载入SimpleCv4。用时：' + (new Date().getTime() - t) + 'ms');

console.log('----------------------');

console.log('开始编译tests/data/arraylist.c。');
t = new Date().getTime();
var result = compiler.compile("tests/data/arraylist.c");
console.log('编译完成。用时：' + (new Date().getTime() - t) + 'ms');

console.log('----------------------');

console.log('开始将结果写入tests/data/result.ll');
t = new Date().getTime();
var fs = require('fs');
fs.writeFileSync('tests/data/result.ll', result);
console.log('已将结果写入tests/data/result.ll。用时：' + (new Date().getTime() - t) + 'ms');

console.log('----------------------');

console.log('结束。合计用时：' + (new Date().getTime() - ts) + 'ms');
{'fraction_non_alphanumeric': 0.29081632653061223, 'fraction_numerical': 0.014577259475218658, 'mean_word_length': 3.5164473684210527, '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': '2713374', 'n_tokens_mistral': 548, 'n_tokens_neox': 556, 'n_words': 93}