Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AssemblyScript/assemblyscript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.13.4
Choose a base ref
...
head repository: AssemblyScript/assemblyscript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jul 9, 2020

  1. Copy the full SHA
    1d86695 View commit details

Commits on Jul 10, 2020

  1. Copy the full SHA
    fbba2e4 View commit details

Commits on Jul 11, 2020

  1. Copy the full SHA
    3f97e1a View commit details

Commits on Jul 13, 2020

  1. Copy the full SHA
    8941652 View commit details

Commits on Jul 15, 2020

  1. Copy the full SHA
    ec86d41 View commit details
  2. Copy the full SHA
    1b38b2a View commit details

Commits on Jul 16, 2020

  1. feat: Support asconfig.json (#1238)

    Co-authored-by: Max Graey <maxgraey@gmail.com>
    Co-authored-by: Willem Wyndham <willem@cs.umd.edu>
    3 people authored Jul 16, 2020
    Copy the full SHA
    5207bcb View commit details
  2. chore: Rename anyref to externref to match proposal change (#1319)

    BREAKING CHANGE: The `anyref` type has been renamed to `externref` and support for externref `null` values has been temporarily disabled.
    jayphelps authored Jul 16, 2020
    Copy the full SHA
    0234c8b View commit details
  3. Copy the full SHA
    f131785 View commit details
  4. Copy the full SHA
    8a175df View commit details
  5. feat: Implement first-class functions (#1384)

    BREAKING CHANGE: Functions are now represented by a managed `Function` object, and are no longer just function table indexes under the hood. As such, returning a function reference to JS now returns a memory address. External functions imported as part of the function table can be called by index with the re-added `call_indirect` builtin, but typical AS functions must now be called idiomatically.
    dcodeIO authored Jul 16, 2020
    Copy the full SHA
    7de4745 View commit details

Commits on Jul 19, 2020

  1. Copy the full SHA
    2f9673b View commit details

Commits on Jul 21, 2020

  1. Copy the full SHA
    87d361b View commit details
  2. Copy the full SHA
    46c06da View commit details

Commits on Jul 22, 2020

  1. Copy the full SHA
    5eb99ee View commit details

Commits on Jul 24, 2020

  1. Update Binaryen (#1401)

    dcodeIO authored Jul 24, 2020
    Copy the full SHA
    ed2490b View commit details
  2. Copy the full SHA
    df40407 View commit details

Commits on Jul 25, 2020

  1. Add more tests for asconfig (#1412)

    Willem Wyndham authored Jul 25, 2020
    Copy the full SHA
    c8a150c View commit details
  2. Copy the full SHA
    0472909 View commit details
  3. Copy the full SHA
    2bc0302 View commit details

Commits on Jul 26, 2020

  1. Copy the full SHA
    348c42b View commit details

Commits on Jul 30, 2020

  1. Copy the full SHA
    b622400 View commit details
  2. Copy the full SHA
    c286e06 View commit details
  3. Copy the full SHA
    a73141f View commit details

Commits on Aug 5, 2020

  1. Copy the full SHA
    5b910e3 View commit details
  2. Copy the full SHA
    176e932 View commit details

Commits on Aug 13, 2020

  1. Update dependencies (#1434)

    dcodeIO authored Aug 13, 2020
    Copy the full SHA
    e2f5ad9 View commit details

Commits on Aug 20, 2020

  1. Copy the full SHA
    61df707 View commit details
  2. Copy the full SHA
    a6e5da6 View commit details
  3. Copy the full SHA
    45bfe04 View commit details
  4. Copy the full SHA
    6df63c4 View commit details

Commits on Aug 24, 2020

  1. Copy the full SHA
    ed7570f View commit details

Commits on Sep 4, 2020

  1. Build and shim improvements (#1446)

    * Use parallel mode for Terser
    * Improve hrtime shim code
    MaxGraey authored Sep 4, 2020
    Copy the full SHA
    1355ae7 View commit details
  2. Copy the full SHA
    b463346 View commit details

Commits on Sep 5, 2020

  1. Copy the full SHA
    6254c67 View commit details
  2. Copy the full SHA
    543ce1a View commit details
  3. Copy the full SHA
    87f20fa View commit details

Commits on Sep 8, 2020

  1. Copy the full SHA
    c474db4 View commit details

Commits on Sep 11, 2020

  1. Update Binaryen to latest

    Also adds bindings for `BinaryenGetAllowInliningFunctionsWithLoops` and `BinaryenSetAllowInliningFunctionsWithLoops`.
    dcodeIO authored Sep 11, 2020
    Copy the full SHA
    c76eb81 View commit details

Commits on Sep 19, 2020

  1. Copy the full SHA
    9f38cc4 View commit details

Commits on Sep 25, 2020

  1. Copy the full SHA
    9948f41 View commit details

Commits on Sep 27, 2020

  1. Copy the full SHA
    125865a View commit details

Commits on Sep 29, 2020

  1. Copy the full SHA
    c0eb3bb View commit details

Commits on Oct 5, 2020

  1. feat: Add bultins: i32/i64/f32/f64.add/sub/mul (#1484)

    Co-authored-by: Max Graey <maxgraey@gmail.com>
    ValeriaVG and MaxGraey authored Oct 5, 2020
    Copy the full SHA
    3223f76 View commit details

Commits on Oct 6, 2020

  1. Copy the full SHA
    de022c9 View commit details
  2. Add RTrace shadow memory and instrumentation (#1476)

    BREAKING CHANGE: RTrace is now a class and the onrealloc callback has been split into onresize and onmove.
    dcodeIO authored Oct 6, 2020
    Copy the full SHA
    5b2d529 View commit details
  3. Copy the full SHA
    97dcab6 View commit details

Commits on Oct 8, 2020

  1. Copy the full SHA
    a373d93 View commit details

Commits on Oct 12, 2020

  1. Copy the full SHA
    041d35b View commit details
  2. Copy the full SHA
    a5d11ed View commit details
Showing 1,614 changed files with 1,163,675 additions and 656,516 deletions.
17 changes: 17 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"reporter": ["html", "text"],
"reportsDirectory": "./coverage",
"src": ["src"],
"exclude": [
"std/**/*",
"tests/**/*",
"dist/**/*",
"bin/asinit.js",
"lib/**/*",
"scripts/**/*",
"src/glue/wasm/**/*",
"util/browser/**/*"
],
"clean": true,
"exclude-after-remap": true
}
7 changes: 5 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
dist/
docs/
lib/binaryen.js
lib/parse/index.js
out/
build/
raw/
tests/parser/

# FIXME: Tagged template literal tests with invalid escapes
tests/compiler/templateliteral.ts
268 changes: 268 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
/* global module */

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: [
"@typescript-eslint",
],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {}
},
globals: {
"globalThis": "readonly",
"BigInt64Array": "readonly",
"BigUint64Array": "readonly",
"WebAssembly": "readonly",
"FinalizationRegistry": "readonly",
"fetch": "readonly",
"URL": "readonly",
"console": "readonly"
},

// === General rules =========================================================

rules: {
// Omitted semicolons are hugely popular, yet within the compiler it makes
// sense to be better safe than sorry.
"semi": "error",

// Our code bases uses 2 spaces for indentation, and we enforce it here so
// files don't mix spaces, tabs or different indentation levels.
"indent": ["error", 2, {
"SwitchCase": 1,
"VariableDeclarator": "first",
"offsetTernaryExpressions": true,
"ignoredNodes": [ // FIXME: something's odd here
"ConditionalExpression > *",
"ConditionalExpression > * > *",
"ConditionalExpression > * > * > *"
]
}],

// This is mostly visual style, making comments look uniform.
"spaced-comment": ["error", "always", {
"markers": ["/"], // triple-slash
"exceptions": ["/"] // all slashes
}],

// This tends to be annoying as it encourages developers to make everything
// that is never reassigned a 'const', sometimes semantically incorrect so,
// typically leading to huge diffs in follow-up PRs modifying affected code.
"prefer-const": "off",

// It is perfectly fine to declare top-level variables with `var`, yet this
// rule doesn't provide configuration options that would help.
"no-var": "off",

// Quite often, dealing with multiple related cases at once or otherwise
// falling through is exactly the point of using a switch.
"no-fallthrough": "off",

// Typical false-positives here are `do { ... } while (true)` statements or
// similar, but the only option provided here is not checking any loops.
"no-constant-condition": ["error", { checkLoops: false }],

// Functions are nested in blocks occasionally, and there haven't been any
// problems with this so far, so turning the check off.
"no-inner-declarations": "off",

// Quite common in scenarios where an iteration starts at `current = this`.
"@typescript-eslint/no-this-alias": "off",

// Interferes with tests and 64-bit literals
"@typescript-eslint/no-loss-of-precision": "off",

// Disabled here, but enabled again for JavaScript files.
"no-unused-vars": "off",

// Disabled here, but enabled again for TypeScript files.
"@typescript-eslint/no-unused-vars": "off"
},
overrides: [

// === JavaScript rules ====================================================

{
env: {
"browser": true,
"amd": true,
"node": true,
"es6": true
},
files: [
"**/*.js",
"bin/*"
],
rules: {
// We are testing both ESM and UMD, so don't limit us.
"@typescript-eslint/no-var-requires": "off",

// This rule does not behave well in JS files.
"@typescript-eslint/explicit-module-boundary-types": "off",

// Enforcing to remove function parameters on stubs makes code less
// maintainable, so we instead allow unused function parameters.
"no-unused-vars": [
"warn", {
"vars": "local",
"args": "none",
"ignoreRestSiblings": false
}
],

"@typescript-eslint/no-loss-of-precision": "error",
}
},

// === TypeScript rules ====================================================

{
files: [
"**/*.ts"
],
rules: {
// Enforcing to remove function parameters on stubs makes code less
// maintainable, so we instead allow unused function parameters.
"@typescript-eslint/no-unused-vars": [
"warn", {
"vars": "local",
"varsIgnorePattern": "^[A-Z](?:From|To)?$", // ignore type params
"args": "none",
"ignoreRestSiblings": false
}
]
}
},

// === AssemblyScript rules (extends TypeScript rules) =====================

{
files: [
"**/assembly/**/*.ts",
"src/**/*.ts",
"lib/parse/src/**/*.ts"
],
rules: {
// Namespaces are quite useful in AssemblyScript
"@typescript-eslint/no-namespace": "off",

// There is actually codegen difference here
"@typescript-eslint/no-array-constructor": "off",

// Sometimes it can't be avoided to add a @ts-ignore
"@typescript-eslint/ban-ts-comment": "off",

// Utilized to achieve portability in some cases
"@typescript-eslint/no-non-null-assertion": "off",
}
},

// === Compiler rules (extends AssemblyScript rules) =======================

{
files: [
"src/**/*.ts",
"std/assembly/**/*.ts"
],
rules: {
// There is an actual codegen difference here - TODO: revisit
"no-cond-assign": "off",

// Not all types can be omitted in AS yet - TODO: revisit
"@typescript-eslint/no-inferrable-types": "off",

// Used rarely to reference internals that are not user-visible
"@typescript-eslint/triple-slash-reference": "off",

// The compiler has its own `Function` class for example
"no-shadow-restricted-names": "off",
"@typescript-eslint/ban-types": "off"
}
},

// === Standard Library rules (extends AssemblyScript rules) ===============

{
files: [
"std/assembly/**/*.ts"
],
rules: {
// We are implementing with --noLib, so we shadow all the time
"no-shadow-restricted-names": "off",

// Similarly, sometimes we need the return type to be String, not string
"@typescript-eslint/ban-types": "off"
}
},

// === Standard Definition rules (extends TypeScript rules) ================

{
files: [
"std/**/*.d.ts"
],
rules: {
// Often required to achieve compatibility with TypeScript
"@typescript-eslint/no-explicit-any": "off",

// Interfaces can be stubs here, i.e. not yet fully implemented
"@typescript-eslint/no-empty-interface": "off",

// Definitions make use of `object` to model rather unusual constraints
"@typescript-eslint/ban-types": "off"
}
},

// === Compiler Definition rules (extends TypeScript rules) ================

{
files: [
"./dist/*.d.ts"
],
rules: {
// Our definitions are complicated, and all attempts to describe them
// as modules have failed so far. As such, we re-export namespaces.
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/triple-slash-reference": "off"
}
},

// === Test rules (extends TypeScript rules) ===============================

{
files: [
"./tests/compiler/**/*.ts",
"./lib/loader/tests/assembly/**/*.ts"
],
rules: {
// Tests typically include unusual code patterns on purpose. This is
// very likely not an extensive list, but covers what's there so far.
"no-empty": "off",
"no-cond-assign": "off",
"no-compare-neg-zero": "off",
"no-inner-declarations": "off",
"no-constant-condition": "off",
"use-isnan": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-extra-non-null-assertion": "off",
"@typescript-eslint/no-empty-interface": "off"
}
},
]
};
Loading