New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

turboscript

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turboscript - npm Package Compare versions

Comparing version 1.0.3-alpha to 1.0.3-beta

_config.yml

109

lib/tc.js

@@ -1,30 +0,4 @@

#! /usr/bin/env node
var debug = true;
var stdlib = {};
global["stdlib"] = stdlib;
stdlib["assert"] = function (truth) {
if (!truth) {
if (debug) {
debugger;
}
console.error(new Error('Assertion failed'));
process.exit(1);
}
};
global["assert"] = stdlib["assert"];
stdlib["Profiler_begin"] = function (name) {
console.time(name);
};
stdlib["Profiler_end"] = function (name) {
console.timeEnd(name);
};
stdlib["StringBuilder_append"] = function (a, b) {
return a + b;
};
stdlib["StringBuilder_appendChar"] = function (a, b) {
return a + String.fromCharCode(b);
};
stdlib["Uint8Array_new"] = function (x) {
return new Uint8Array(x);
};
#! /usr/bin/env ts-node
"use strict";
const debug = true;
Math["imul"] = Math["imul"] || function (a, b) {

@@ -36,3 +10,3 @@ return (a * (b >>> 16) << 16) + a * (b & 65535) | 0;

throw "Error: log2: " + x;
var i = 0;
let i = 0;
while (x > 1) {

@@ -44,67 +18,12 @@ i++;

};
var fs = require('fs');
var path = require('path');
var SystemJS = require('systemjs');
SystemJS.defaultJSExtensions = true;
if (!process.env.TURBO_PATH) {
process.env.TURBO_PATH = path.resolve(__dirname, "../");
const fs = require('fs');
const path = require('path');
//Import compiler
const turbo = require("./turboscript.js");
const Color = turbo.Color;
const turboMain = turbo.main;
for (let i = 2; i < process.argv.length; i++) {
turboMain.addArgument(process.argv[i]);
}
global["TURBO_PATH"] = process.env.TURBO_PATH;
console.log("TURBO_PATH:" + global["TURBO_PATH"]);
//Import compiler
require("./turbo.js");
SystemJS["import"]("main").then(function (mod) {
var Color = mod.Color;
var turboMain = mod.main;
stdlib["Terminal_setColor"] = Terminal_setColor;
stdlib["Terminal_write"] = Terminal_write;
stdlib["IO_readTextFile"] = IO_readTextFile;
stdlib["IO_writeTextFile"] = IO_writeTextFile;
stdlib["IO_writeBinaryFile"] = IO_writeBinaryFile;
function Terminal_setColor(color) {
if (process.stdout.isTTY) {
var code = color === Color.BOLD ? 1 :
color === Color.RED ? 91 :
color === Color.GREEN ? 92 :
color === Color.MAGENTA ? 95 :
0;
process.stdout.write('\x1B[0;' + code + 'm');
}
}
function Terminal_write(text) {
process.stdout.write(text);
}
function IO_readTextFile(path) {
try {
return fs.readFileSync(path, 'utf8').replace(/\r\n/g, '\n');
}
catch (e) {
return null;
}
}
function IO_writeTextFile(path, contents) {
try {
fs.writeFileSync(path, contents);
return true;
}
catch (e) {
return false;
}
}
function IO_writeBinaryFile(path, contents) {
try {
fs.writeFileSync(path, new Buffer(contents.array.subarray(0, contents.length)));
return true;
}
catch (e) {
return false;
}
}
function main() {
for (var i = 2; i < process.argv.length; i++) {
turboMain.addArgument(process.argv[i]);
}
process.exit(turboMain.entry());
}
main();
});
process.exit(turboMain.entry());
//# sourceMappingURL=tc.js.map

@@ -1,31 +0,4 @@

#! /usr/bin/env node
#! /usr/bin/env ts-node
var debug = true;
var stdlib = {};
global["stdlib"] = stdlib;
stdlib["assert"] = function (truth) {
if (!truth) {
if(debug){
debugger;
}
console.error(new Error('Assertion failed'));
process.exit(1);
}
};
global["assert"] = stdlib["assert"];
stdlib["Profiler_begin"] = function (name: string) {
console.time(name)
};
stdlib["Profiler_end"] = function (name: string) {
console.timeEnd(name)
};
stdlib["StringBuilder_append"] = function (a, b) {
return a + b;
};
stdlib["StringBuilder_appendChar"] = function (a, b) {
return a + String.fromCharCode(b);
};
stdlib["Uint8Array_new"] = function (x) {
return new Uint8Array(x);
};
const debug = true;

@@ -46,80 +19,15 @@ Math["imul"] = Math["imul"] || function (a, b) {

var fs = require('fs');
var path = require('path');
var SystemJS = require('systemjs');
SystemJS.defaultJSExtensions = true;
const fs = require('fs');
const path = require('path');
if(!process.env.TURBO_PATH){
process.env.TURBO_PATH = path.resolve(__dirname, "../");
}
global["TURBO_PATH"] = process.env.TURBO_PATH;
console.log("TURBO_PATH:"+global["TURBO_PATH"]);
//Import compiler
require("./turbo.js");
const turbo = require("./turboscript.js");
SystemJS.import("main").then(function (mod) {
var Color = mod.Color;
var turboMain = mod.main;
const Color = turbo.Color;
const turboMain = turbo.main;
stdlib["Terminal_setColor"] = Terminal_setColor;
stdlib["Terminal_write"] = Terminal_write;
stdlib["IO_readTextFile"] = IO_readTextFile;
stdlib["IO_writeTextFile"] = IO_writeTextFile;
stdlib["IO_writeBinaryFile"] = IO_writeBinaryFile;
for (let i = 2; i < process.argv.length; i++) {
turboMain.addArgument(process.argv[i]);
}
function Terminal_setColor(color) {
if (process.stdout.isTTY) {
var code =
color === Color.BOLD ? 1 :
color === Color.RED ? 91 :
color === Color.GREEN ? 92 :
color === Color.MAGENTA ? 95 :
0;
process.stdout.write('\x1B[0;' + code + 'm');
}
}
function Terminal_write(text) {
process.stdout.write(text);
}
function IO_readTextFile(path) {
try {
return fs.readFileSync(path, 'utf8').replace(/\r\n/g, '\n');
} catch (e) {
return null;
}
}
function IO_writeTextFile(path, contents) {
try {
fs.writeFileSync(path, contents);
return true;
} catch (e) {
return false;
}
}
function IO_writeBinaryFile(path, contents) {
try {
fs.writeFileSync(path, new Buffer(contents.array.subarray(0, contents.length)));
return true;
} catch (e) {
return false;
}
}
function main() {
for (var i = 2; i < process.argv.length; i++) {
turboMain.addArgument(process.argv[i]);
}
process.exit(turboMain.entry());
}
main();
});
process.exit(turboMain.entry());
{
"name": "turboscript",
"version": "1.0.3-alpha",
"version": "1.0.3-beta",
"description": "Super charged JavaScript for parallel programming and WebAssembly",

@@ -9,10 +9,23 @@ "main": "index.js",

},
"dependencies": {
"systemjs": "^0.19.41"
},
"dependencies": {},
"devDependencies": {
"@types/node": "^6.0.52",
"lite-server": "^2.2.2",
"ts-node": "^1.7.2",
"typescript": "^2.1.4"
"@types/debug": "^0.0.29",
"@types/fs-extra": "^2.1.0",
"@types/jest": "^19.2.2",
"@types/node": "^7.0.12",
"@types/webassembly-js-api": "^0.0.0",
"babel-jest": "^19.0.0",
"debug": "^2.6.3",
"fs": "^0.0.1-security",
"fs-extra": "^2.1.2",
"jest": "^19.0.2",
"raw-loader": "^0.5.1",
"request": "^2.81.0",
"ts-jest": "^19.0.9",
"ts-loader": "^2.1.0",
"ts-node": "^3.0.2",
"typescript": "^2.3.4",
"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22",
"uglifyjs-webpack-plugin": "^0.4.3",
"webpack": "^2.6.1"
},

@@ -23,7 +36,20 @@ "bin": {

"scripts": {
"post-install": "npm run build",
"build": "tsc -p ./src && tsc lib/tc.ts",
"watch": "tsc -w -p ./src",
"watch-lib": "tsc -w lib/tc.ts"
"build": "webpack --config webpack.config.js && tsc -p ./lib",
"watch-build": "NODE_ENV='dev' webpack --progress --colors --watch",
"test": "node ./node_modules/jest/bin/jest.js",
"watch-test": "node ./node_modules/jest/bin/jest.js --watch"
},
"jest": {
"globals": {
"__TS_CONFIG__": "tsconfig.base.json"
},
"transform": {
".(ts|tsx)": "./node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(\\.(test|spec))\\.(ts)$",
"moduleFileExtensions": [
"ts",
"js"
]
},
"repository": {

@@ -33,3 +59,7 @@ "type": "git",

},
"author": "Nidin Vinayakan",
"author": "Nidin Vinayakan <01@01alchemist.com> (https://01alchemist.com)",
"contributors": [
"Max Graey <maxgraey@gmail.com> (https://github.com/MaxGraey)",
"Wink Saville <wink@saville.com> (https://github.com/winksaville)"
],
"license": "MIT",

@@ -36,0 +66,0 @@ "bugs": {

@@ -151,3 +151,3 @@ "use strict";

{path: TURBO_PATH + '/src/library/wasm/malloc.tbs', code: ""},
{path: TURBO_PATH + '/src/library/wasm/array.tbs', code: ""},
{path: TURBO_PATH + '/src/library/wasm/f32-array.tbs', code: ""},
{path: TURBO_PATH + '/src/library/wasm/math.tbs', code: ""},

@@ -158,3 +158,3 @@

{path: TURBO_PATH + '/src/library/asmjs/malloc.tbs', code: ""},
{path: TURBO_PATH + '/src/library/asmjs/array.tbs', code: ""},
{path: TURBO_PATH + '/src/library/asmjs/f32-array.tbs', code: ""},
{path: TURBO_PATH + '/src/library/asmjs/math.tbs', code: ""},

@@ -161,0 +161,0 @@ {path: TURBO_PATH + '/src/library/asmjs/runtime.js', code: ""},

@@ -93,7 +93,6 @@ /**

' ',
' constructor(x: float32, y: float32, z: float32): Vec3 {',
' constructor(x: float32, y: float32, z: float32) {',
' this.x = x;',
' this.y = y;',
' this.z = z;',
' return this;',
' }',

@@ -379,23 +378,22 @@ ' ',

SystemJS.import("main").then(function (exports) {
backendWebAssembly.onchange = compile;
backendJavaScript.onchange = compile;
targetWebAssembly.onchange = compile;
targetJavaScript.onchange = compile;
terminal.oninput = updateTerminalContent;
targetAsmJs.onchange = compile;
input.oninput = compile;
outputButton.onclick = function () {
triggerDownload(outputName, outputContents);
};
secondaryOutputButton.onclick = function () {
triggerDownload(secondaryOutputName, secondaryOutputContents);
};
terminalButton.onclick = runOrDownloadShim;
clear.onclick = clearLog;
backendWebAssembly.onchange = compile;
backendJavaScript.onchange = compile;
targetWebAssembly.onchange = compile;
targetJavaScript.onchange = compile;
terminal.oninput = updateTerminalContent;
targetAsmJs.onchange = compile;
input.oninput = compile;
outputButton.onclick = function () {
triggerDownload(outputName, outputContents);
};
secondaryOutputButton.onclick = function () {
triggerDownload(secondaryOutputName, secondaryOutputContents);
};
terminalButton.onclick = runOrDownloadShim;
clear.onclick = clearLog;
compiledJavaScript = compileJavaScript(exports, libs);
input.value = samples[selectedSample].content;
input.selectionStart = input.selectionEnd = 0;
compile();
compiledJavaScript = compileJavaScript(exports, libs);
input.value = samples[selectedSample].content;
input.selectionStart = input.selectionEnd = 0;
compile();

@@ -413,3 +411,2 @@ // if (supportsWebAssembly()) {

});
});

@@ -416,0 +413,0 @@ }

# TurboScript
Super charged JavaScript for parallel programming and WebAssembly
[![Build Status](https://travis-ci.org/01alchemist/TurboScript.svg?branch=master)](https://travis-ci.org/01alchemist/TurboScript) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/01alchemist/TurboScript?branch=master&svg=true)]() [![Stories in Ready](https://badge.waffle.io/01alchemist/TurboScript.png?label=ready&title=Ready)](https://waffle.io/01alchemist/TurboScript) [![Greenkeeper badge](https://badges.greenkeeper.io/01alchemist/TurboScript.svg)](https://greenkeeper.io/)
Super charged JavaScript for parallel programming and WebAssembly
[![Throughput Graph](https://graphs.waffle.io/01alchemist/TurboScript/throughput.svg)](https://waffle.io/01alchemist/TurboScript/metrics/throughput)
<pre>

@@ -13,11 +18,179 @@ @ _________

</pre>
TurboScript is an experimental programming language for parallel programming for web which compiles to JavaScript (asm.js) and WebAssembly (targeting post-MVP). The syntax is similar to TypeScript (Hardly trying to fill the gaps) and the compiler is open source and written in TypeScript.
This is still an experiment and isn't intended for real use yet. ~~The biggest issue is that the generated code currently doesn't delete anything~~ (basic manual memory management is added). Also the WebAssembly specification is still being developed and the current binary format may stop working when WebAssembly is officially released. WebAssembly binary format is up-to-date, please feel free to open issues if it stop working or need a new feature.
TurboScript is an experimental programming language for parallel programming for web which compiles to JavaScript ~~(asm.js)~~ and WebAssembly (targeting post-MVP). The syntax is similar to TypeScript ~~(Hardly trying to fill the gaps)~~ and the compiler is open source and written in TypeScript. TurboScript has zero dependencies.
TurboScript is forked from ThinScript and changed a lot, so there will be no going back.
This is still an experiment and isn't intended for real use yet but we are working towards an MVP release. Please feel free to open issues if it stop working or need a new feature.
#Roadmap
## Install
`npm install -g turboscript`
## Types
Type | Native type | Description
----------|-------------|-------------
`int8` | i32 | An 8-bit signed integer.
`uint8` | i32 | An 8-bit unsigned integer.
`int16` | i32 | A 16-bit signed integer.
`uint16` | i32 | A 16-bit unsigned integer.
`int32` | i32 | A 32-bit signed integer.
`uint32` | i32 | A 32-bit unsigned integer.
`int64` | i64 | A 64-bit signed integer.
`uint64` | i64 | A 64-bit unsigned integer.
`boolean` | i32 | A 1-bit unsigned integer.
`float32` | f32 | A 32-bit floating point number.
`float64` | f64 | A 64-bit floating point number.
`void` | none | No return type.
`string` | i32 | A utf-8 encoded textual data type.
`Array<T>` | i32 | A generic array data type.
## Syntax
### variables
```typescript
var myGlobal:int32 = 1;
let evaluatedVar:int32 = myGlobal + 1;
// let is same as var.
```
### Number Literals
```typescript
let integer:int32 = 1234;
let integer64bit:int64 = 1234;
let floatingPoint:float32 = 1.234f;
let floatingPoint64bit:float64 = 1.234; // default floating point number is 64 bit
// You can also omit type since compiler infer type from the literal
let integer = 1234; // default integer is 32 bit, use type :int64 for 64 bit integer
let floatingPoint = 1.234f;
let floatingPoint64bit = 1.234;
```
### function
```typescript
// add.tbs
export function add(a:int32, b:int32):int32 {
return a + b;
}
```
### class
```typescript
// vector3D.tbs
export class Vector3D {
   x:float32;
   y:float32;
   z:float32;
   constructor(x:float32, y:float32, z:float32){
       this.x = x;
       this.y = y;
       this.z = z;
   }
}
```
### Generic
```typescript
class Foo<T> {
value:T;
constructor(value:T){
this.value = value;
}
getValue():T {
return this.value;
}
}
export function testI32(value:int32):int32 {
let instance = new Foo<int32>(value);
return instance.getValue();
}
export function testI64(value:int32):int32 {
let value2 = value as int64;
let instance = new Foo<int64>(value2);
return instance.getValue() as int32;
}
export function testF32(value:float32):float32 {
let instance = new Foo<float32>(value);
return instance.getValue();
}
export function testF64(value:float64):float64 {
let instance = new Foo<float64>(value);
return instance.getValue();
}
```
### Operator overload
```typescript
class Vector3D {
x:float32;
y:float32;
z:float32;
constructor(x:float32, y:float32, z:float32){
this.x = x;
this.y = y;
this.z = z;
}
operator + (other:Vector3D):Vector3D {
return new Vector3D(this.x + other.x, this.y + other.y, this.z + other.z);
}
operator - (other:Vector3D):Vector3D {
return new Vector3D(this.x - other.x, this.y - other.y, this.z - other.z);
}
}
export function test():boolean {
let a = new Vector3D(1.0f,1.0f,1.0f);
let b = new Vector3D(1.0f,1.0f,1.0f);
let c = a + b;
return c.x == 2.0f && c.y == 2.0f && c.z == 2.0f;
}
```
### Array
```typescript
// f64-array.tbs
var a: Array<float64> = null;
export function test(num:int32): Array<float64> {
a = new Array<float64>(num);
let i:int32 = 0;
while (i < num) {
a[i] = 0.0;
i = i + 1;
}
return a;
}
export function getArrayByteLength(value:Array<float64>):int32 {
return value.bytesLength;
}
export function getArrayElementSize(value:Array<float64>):int32 {
return value.elementSize;
}
export function getArray(): Array<float64> {
return a;
}
export function getData(index:int32):float64 {
return a[index];
}
export function setData(index:int32, value:float64):void {
a[index] = value;
}
```
#### Compile to wasm
`tc add.tbs --wasm --out add.wasm`
## Join ![Slack](https://01alchemist.com/images/slack-logo-small.png)
You need an invitation to join slack. open a ticket with your email address. I will make it happen.
# Roadmap
* ~~Parallel JavaScript~~

@@ -28,11 +201,20 @@ * ~~WebAssembly Emitter~~

* ~~Import external functions with namespace~~
* Array Data Type
* ~~Array Data Type~~
* Parallel WebAssembly (post-MVP)
#Useful links
* [Future WebHPC & Parallel Programming with JavaScript] (https://dump.01alchemist.com/2016/12/31/future-webhpc-parallel-programming-with-javascript-the-new-era-about-to-begin/)
* [TurboScript playground] (https://01alchemist.com/projects/turboscript/playground/)
# Wiki
Documentations can be found at [wiki](../../wiki) (under construction :construction:)
# Useful links
* [Future WebHPC & Parallel Programming with JavaScript](https://dump.01alchemist.com/2016/12/31/future-webhpc-parallel-programming-with-javascript-the-new-era-about-to-begin/)
* [TurboScript playground](https://01alchemist.com/projects/turboscript/playground/)
* [Assembleash playground](https://github.com/MaxGraey/Assembleash/#TurboScript)
#Credit
# Credit
Lexical analysis, Parsing, Checking codes are borrowed from Evan Wallace's thinscript
# Now enjoy - Wow! this snail is fast
<a href="http://www.youtube.com/watch?feature=player_embedded&v=w-SDeBoDLTg
" target="_blank"><img src="https://01alchemist.com/images/Turbo-630x354.jpg"
alt="Wow! this snail is fast" width="630" height="354" border="10" /></a>

@@ -111,6 +111,6 @@ // combine kernel modules and compile

console.log("TURBO_PATH:" + global["TURBO_PATH"])
console.log("TURBO_PATH:" + global["TURBO_PATH"]);
//Import compiler
require(path.resolve(process.env.TURBO_PATH, "bin/turbo.js"));
require(path.resolve(process.env.TURBO_PATH, "lib/turbo.js"));

@@ -117,0 +117,0 @@ System.import("main").then(function (mod) {

@@ -87,3 +87,3 @@ /**

if (this.flags[this.id] === 2) {//thread locked
console.log("exit:1");
Terminal.write("exit:1");
this.lock();

@@ -106,3 +106,3 @@ return;

if (this.locked) {
console.log("restarted:" + this.iterations, "samples:" + this.checkSamples());
Terminal.write("restarted:" + this.iterations, "samples:" + this.checkSamples());
this.locked = false;

@@ -160,3 +160,3 @@ }

if (this.flags[this.id] === 2) {//thread locked
console.log("exit:3");
Terminal.write("exit:3");
this.lock();

@@ -229,3 +229,3 @@ return;

//console.time("render");
//Terminal.time("render");
/*for (var y:number = this.yoffset; y < this.yoffset + this.height; y++) {

@@ -236,3 +236,3 @@

if (this.flags[this.id] === 2) {//thread locked
console.log("exit:3");
Terminal.write("exit:3");
this.lock();

@@ -272,3 +272,3 @@ return;

if (this.flags[this.id] === 2) {//thread locked
console.log("exit:7");
Terminal.write("exit:7");
this.lock();

@@ -283,3 +283,3 @@ return;

}*/
//console.timeEnd("render");
//Terminal.timeEnd("render");
}

@@ -290,3 +290,3 @@

if (this.flags[this.id] === 2) {//thread locked
console.log("exit:8");
Terminal.write("exit:8");
this.lock();

@@ -293,0 +293,0 @@ return;

@@ -26,29 +26,2 @@ type byte = number;

declare class ByteArray {
}
declare var assert:Function;
declare var TURBO_PATH:string;
declare namespace stdlib {
var assert;
function Profiler_begin(name: string);
function Profiler_end(name: string);
function StringBuilder_append(a, b);
function StringBuilder_appendChar(a, b);
function Uint8Array_new(x);
function Terminal_setColor(color: any): void;
function Terminal_write(text: string): void;
function IO_readTextFile(path: string): string;
function IO_writeTextFile(path: string, contents: string): boolean;
function IO_writeBinaryFile(path: string, contents: ByteArray): boolean;
}

@@ -1,35 +0,34 @@

import {CompileTarget} from "../compiler";
import {CompileTarget} from "../compiler/compile-target";
// library files
const math = require('./common/math.tbs');
const types = require('./common/types.tbs');
const array = require('./common/array.tbs');
const jstypes = require('./turbo/types.tbs');
const runtime = require('raw-loader!./turbo/runtime.js');
const wrapper = require('raw-loader!./turbo/wrapper.js');
const malloc = require('./common/malloc.tbs');
const builtins = require('./webassembly/builtins.tbs');
const initializer = require('./webassembly/initializer.tbs');
export class Library {
static get(target: CompileTarget) {
let lib;
switch (target) {
/*case CompileTarget.WEBASSEMBLY:
lib = stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/types.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/foreign.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/malloc.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/math.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/array.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/wasm/typedarray/float64array.tbs") + "\n";
return lib;*/
case CompileTarget.TURBO_JAVASCRIPT:
lib = stdlib.IO_readTextFile(TURBO_PATH + "/src/library/turbo/types.tbs") + "\n";
return lib;
case CompileTarget.JAVASCRIPT:
lib = jstypes + "\n";
break;
case CompileTarget.WEBASSEMBLY:
lib = stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/types.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/foreign.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/math.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/malloc.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/array.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/typedarray/float64array.tbs") + "\n";
return lib;
case CompileTarget.ASMJS:
lib = stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/types.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/foreign.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/math.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/malloc.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/array.tbs") + "\n";
lib += stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/typedarray/float64array.tbs") + "\n";
return lib;
lib = [
types,
initializer,
builtins,
math,
malloc,
array
].join('\n');
break;
}
return lib;
}

@@ -39,6 +38,4 @@

switch (target) {
case CompileTarget.TURBO_JAVASCRIPT:
return stdlib.IO_readTextFile(TURBO_PATH + "/src/library/turbo/runtime.js") + "\n";
case CompileTarget.ASMJS:
return stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/runtime.js") + "\n";
case CompileTarget.JAVASCRIPT:
return runtime + "\n";
default:

@@ -51,6 +48,4 @@ return "";

switch (target) {
case CompileTarget.TURBO_JAVASCRIPT:
return stdlib.IO_readTextFile(TURBO_PATH + "/src/library/turbo/wrapper.js") + "\n";
case CompileTarget.ASMJS:
return stdlib.IO_readTextFile(TURBO_PATH + "/src/library/asmjs/wrapper.js") + "\n";
case CompileTarget.JAVASCRIPT:
return wrapper + "\n";
default:

@@ -60,3 +55,2 @@ return "";

}
}
}
{
"compilerOptions": {
"module": "system",
"target": "es6",
"module": "commonjs",
"target": "es5",
"sourceMap": true,

@@ -11,6 +11,6 @@ "emitDecoratorMetadata": true,

],
"outFile": "../lib/turbo.js"
"outDir": "../.turbo"
},
"files": [
"main.ts"
"index.ts"
],

@@ -22,2 +22,2 @@ "exclude": [

]
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc