file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/swc_node_bundler/tests/pass/reexport/named-2-nested/input/a.js | JavaScript | export { b } from "./b";
console.log("a");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-2-nested/input/b.js | JavaScript | export { c as b } from "./c";
console.log("b");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-2-nested/input/c.js | JavaScript | export const c = 1;
console.log("c", c);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-2-nested/input/entry.js | JavaScript | export { b as a } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-2-nested/output/entry.js | JavaScript | const c = 1;
console.log("c", c);
console.log("b");
console.log("a");
export { c as a };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-3-var/input/a.js | JavaScript | export { b as a } from "./b";
console.log("a");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-3-var/input/b.js | JavaScript | export { c as b } from "./c";
console.log("b");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-3-var/input/c.js | JavaScript | export const c = 1;
console.log("c", c);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-3-var/input/entry.js | JavaScript | export { a } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-3-var/output/entry.js | JavaScript | const c = 1;
console.log("c", c);
console.log("b");
console.log("a");
export { c as a };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-4-fn/input/a.js | JavaScript | export { b } from "./b";
console.log("a");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-4-fn/input/b.js | JavaScript | export function b() {
console.log(b);
}
console.log("b", b);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-4-fn/input/entry.js | JavaScript | export { b as a } from "./a";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-4-fn/output/entry.js | JavaScript | function b() {
console.log(b);
}
console.log("b", b);
console.log("a");
export { b as a };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-5-class/input/a.js | JavaScript | export { b } from "./b";
console.log("a");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-5-class/input/b.js | JavaScript | export class b {}
console.log("b", b);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-5-class/input/entry.js | JavaScript | export { b as a } from "./a";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/named-5-class/output/entry.js | JavaScript | class b {
}
console.log("b", b);
console.log("a");
export { b as a };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-mini/input/a.js | JavaScript | export { d as b } from "./b";
console.log("a.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-mini/input/b.js | JavaScript | const d = 1;
export { d };
console.log("d");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-mini/input/entry.js | JavaScript | export { b } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-mini/output/entry.js | JavaScript | const d = 1;
console.log("d");
console.log("a.js");
export { d as b };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step1/input/a.js | JavaScript | export { default as b } from "./b";
console.log("a.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step1/input/b.js | JavaScript | import { c as b } from "./c";
export default b;
console.log("b");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step1/input/c.js | JavaScript | export const c = "c";
console.log("c");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step1/input/entry.js | JavaScript | export { b } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step1/output/entry.js | JavaScript | const c = "c";
console.log("c");
console.log("b");
console.log("a.js");
export { c as b };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/input/a.js | JavaScript | export { default as b } from "./b";
console.log("a.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/input/b.js | JavaScript | import { c as b } from "./c";
export default b;
console.log("b");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/input/c.js | JavaScript | export { d as c } from "./d";
console.log("c");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/input/d.js | JavaScript | const d = 1;
export { d };
console.log("d");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/input/entry.js | JavaScript | export { b } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive-step2/output/entry.js | JavaScript | const d = 1;
console.log("d");
console.log("c");
console.log("b");
console.log("a.js");
export { d as b };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/a.js | JavaScript | export { default as b } from "./b";
console.log("a.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/b.js | JavaScript | import { c as b } from "./c";
export default b;
console.log("b");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/c.js | JavaScript | export { d as c } from "./d";
console.log("c");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/d.js | JavaScript | import { e as d } from "./e";
export { d };
console.log("d");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/e.js | JavaScript | export const e = "e";
console.log("e");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/input/entry.js | JavaScript | export { b } from "./a";
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/reexport/recursive/output/entry.js | JavaScript | const e = "e";
console.log("e");
console.log("d");
console.log("c");
console.log("b");
console.log("a.js");
export { e as b };
console.log("entry");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/regenerator/1/input/entry.js | JavaScript | async function foo() {}
async function main() {
await foo();
}
console.log(main());
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/regenerator/1/output/entry.js | JavaScript | function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next,... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/resolve-name-fix/input/entry.js | JavaScript | import assign from "core-js";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/swcrc/jsx/issue-884/input/entry.jsx | JavaScript (JSX) | /**
* Don't ask why it is named as divider.
*/
export const Divider = <div />;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/swcrc/jsx/issue-884/output/entry.js | JavaScript | var Divider = React.createElement("div", null);
export { Divider as Divider };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/swcrc/jsx/issue-884/output/entry.jsx | JavaScript (JSX) | /**
* Don't ask why it is named as divider.
*/ export var Divider = React.createElement("div", null);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/a.js | JavaScript | export { c } from "./c";
export { d } from "./d";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/b.js | JavaScript | export const b = 1;
export { e } from "./e";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/c.js | JavaScript | export const c = 3;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/d.js | JavaScript | export const d = 4;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/e.js | JavaScript | export const e = 5;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/input/entry.js | JavaScript | export * from "./a";
export * from "./b";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-1/output/entry.js | JavaScript | const c = 3;
const d = 4;
export { c as c };
export { d as d };
const e = 5;
const b = 1;
export { e as e };
export { b as b };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/a.js | JavaScript | export { c as d } from "./c";
export { d as c } from "./d";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/b.js | JavaScript | export const b = 1;
export { e as a } from "./e";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/c.js | JavaScript | export const c = 3;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/d.js | JavaScript | export const d = 4;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/e.js | JavaScript | export const e = 5;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/input/entry.js | JavaScript | export * from "./a";
export * from "./b";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-all-2/output/entry.js | JavaScript | const c = 3;
const d = 4;
export { c as d };
export { d as c };
const e = 5;
const b = 1;
export { e as a };
export { b as b };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-named/input/a.js | JavaScript | export { foo, bar } from "./common";
export const baz = "from a.js";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-named/input/b.js | JavaScript | export { foo, baz } from "./common";
export const bar = "from b.js";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-named/input/common.js | JavaScript | const foo = 1;
const bar = 1;
const baz = 1;
export { foo, bar, baz };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-named/input/entry.js | JavaScript | export { foo, bar } from "./a";
export { baz } from "./b";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/export-named/output/entry.js | JavaScript | const foo = 1;
const bar = 1;
const baz = 1;
export { foo as foo, bar as bar };
export { baz as baz };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-1/input/a.js | JavaScript | import { common } from "./common";
console.log(common, "a.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-1/input/b.js | JavaScript | import { common } from "./common";
console.log(common, "b.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-1/input/common.js | JavaScript | export const common = 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-1/input/entry.js | JavaScript | import "./a";
import "./b";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-1/output/entry.js | JavaScript | const common = 1;
console.log(common, "a.js");
console.log(common, "b.js");
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/a.js | JavaScript | import { common1 } from "./common1";
import { common2 } from "./common2";
console.log("a", common1, common2);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/b.js | JavaScript | import { common3 } from "./common3";
import { common1 } from "./common1";
console.log("b", common3, common1);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/c.js | JavaScript | import { common4 } from "./common4";
import { common2 } from "./common2";
import { common3 } from "./common3";
console.log("c", common4, common2, common3);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/common1.js | JavaScript | export const common1 = 1;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/common2.js | JavaScript | const common = 2;
export { common as common2 };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/common3.js | JavaScript | export const common1 = "Test failed :(";
const common3 = 3;
export { common3 };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/common4.js | JavaScript | var common4;
try {
common4 = 4;
} catch (e) {}
export { common4 };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/input/entry.js | JavaScript | import "./a";
import "./b";
import "./c";
import "./common3";
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/transitive/import/simple-2/output/entry.js | JavaScript | const common1 = 1;
const common = 2;
console.log("a", common1, common);
const common3 = 3;
console.log("b", common3, common1);
var common4;
try {
common4 = 4;
} catch (e) {}
console.log("c", common4, common, common3);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/in-module-export/input/entry.js | JavaScript | const a = 1;
const b = 1;
export const foo = b;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/in-module-export/output/entry.js | JavaScript | const b = 1;
const foo = b;
export { foo as foo };
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/in-module/input/entry.js | JavaScript | const foo = 1;
let a = 2;
{
let a = 3;
}
console.log(a);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/in-module/output/entry.js | JavaScript | let a = 2;
console.log(a);
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/preserve-import/input/b.js | JavaScript | export function b() {}
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/preserve-import/input/entry-a.js | JavaScript | import { b } from "./b";
b();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_bundler/tests/pass/tree-shaking/preserve-import/output/entry-a.js | JavaScript | function b() {}
b();
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_node_comments/src/lib.rs | Rust | #![cfg_attr(test, deny(warnings))]
use std::sync::Arc;
use dashmap::DashMap;
use rustc_hash::FxBuildHasher;
use swc_atoms::atom;
use swc_common::{
comments::{Comment, CommentKind, Comments},
BytePos, DUMMY_SP,
};
type CommentMap = Arc<DashMap<BytePos, Vec<Comment>, FxBuildHasher>>;
/// Multi-threaded implem... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_nodejs_common/src/lib.rs | Rust | #![deny(warnings)]
use std::any::type_name;
use anyhow::Context;
use napi::Status;
use serde::de::DeserializeOwned;
pub trait MapErr<T>: Into<Result<T, anyhow::Error>> {
fn convert_err(self) -> napi::Result<T> {
self.into()
.map_err(|err| napi::Error::new(Status::GenericFailure, format!("{:?}... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_parallel/src/items.rs | Rust | use self::private::Sealed;
mod private {
pub trait Sealed {}
impl<T> Sealed for Vec<T> {}
impl<T> Sealed for &mut Vec<T> {}
impl<T> Sealed for &mut [T] {}
impl<T> Sealed for &[T] {}
}
pub trait IntoItems: Sealed {
type Elem;
type Items: Items<Elem = Self::Elem>;
fn into_items(self) ->... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_parallel/src/lib.rs | Rust | #![cfg_attr(not(feature = "parallel"), allow(unused_variables))]
use std::{cell::RefCell, mem::transmute};
pub mod items;
pub mod merge;
#[derive(Default)]
pub struct MaybeScope<'a>(ScopeLike<'a>);
enum ScopeLike<'a> {
Scope(Scope<'a>),
#[cfg(feature = "parallel")]
Global(Option<chili::Scope<'a>>),
}
i... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_parallel/src/merge.rs | Rust | use std::{
collections::{hash_map, HashMap},
hash::{BuildHasher, Hash},
};
use crate::join;
pub fn merge_in_parallel<T: Merge>(mut items: Vec<T>) -> T {
assert!(!items.is_empty());
if items.len() == 1 {
return items.into_iter().next().unwrap();
}
let b = items.split_off(items.len() /... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_parallel/tests/simulate.rs | Rust | use std::{
sync::{Arc, Mutex},
thread::{self, sleep},
time::Duration,
};
use swc_parallel::{items::Items, join};
#[derive(Default)]
struct Context {
sum: usize,
atoms: Vec<hstr::Atom>,
}
impl Parallel for Context {
fn create(&self) -> Self {
Context::default()
}
fn merge(&mut ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin/scripts/cli.sh | Shell | #!/usr/bin/env bash
set -eu
cargo install --path ./cli
(cd plugins && swc-dev $@) | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin/scripts/test.sh | Shell | #!/usr/bin/env bash
## This script assumes `plugins` is in `$CDPATH`
set -eu
(cd plugins && cargo build && ls -al target/debug)
export PLUGINS_DIR=$(cd plugins > /dev/null && pwd)
echo "Using plugins at $PLUGINS_DIR"
(cd runner && cargo test) | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin/src/allocation.rs | Rust | use std::alloc::{alloc as global_alloc, dealloc as global_dealloc, Layout};
/// Allocate bytes that won't be dropped by the allocator.
/// Return the pointer to the leaked allocation so the host can write to it.
///
/// Note: Can be bit confusing but alloc / free should be called in host even
/// though this fn is exp... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin/src/lib.rs | Rust | #![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(target_arch = "wasm32")]
pub mod allocation;
pub mod pseudo_scoped_key;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin/src/pseudo_scoped_key.rs | Rust | use once_cell::sync::OnceCell;
/// Simple substitution for scoped_thread_local with limited interface parity.
///
/// The only available fn in this struct is `with`, which is being used for the
/// consumers when they need to access global scope handler (HANDLER.with()).
/// Any other interfaces to support thread loca... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin_macro/src/lib.rs | Rust | extern crate proc_macro;
use proc_macro::TokenStream;
use proc_macro2::{Ident, Span};
use quote::quote;
use syn::{Item as SynItem, ItemFn};
#[proc_macro_attribute]
pub fn plugin_transform(
_args: proc_macro::TokenStream,
input: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
let token = proc_macro2... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin_proxy/src/comments/host_comments_storage.rs | Rust | /// A struct to internally store current file's comments for the
/// transform plugins.
///
/// This storage is introduced to conform with existing design to the comments,
/// specifically `SingleThreadedComments`. It doesn't support thread-safety
/// which does not allow to be passed into wasmerEnv (HostEnvironment). ... | willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University | |
crates/swc_plugin_proxy/src/comments/mod.rs | Rust | mod host_comments_storage;
mod plugin_comments_proxy;
#[cfg(feature = "__plugin_rt")]
pub use host_comments_storage::{HostCommentsStorage, COMMENTS};
#[cfg(feature = "__plugin_mode")]
pub use plugin_comments_proxy::PluginCommentsProxy;
| willcrichton/ilc-swc | 1 | Rust | willcrichton | Will Crichton | Brown University |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.