fix: remove unneeded LOAD_REGEX instruction
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { object, setGlobalPrototypes, target } from "./primordials.ts";
|
||||
import { object, setGlobalPrototypes, setIntrinsic, target } from "./primordials.ts";
|
||||
import { Error, RangeError, SyntaxError, TypeError } from "./values/errors.ts";
|
||||
import { Boolean } from "./values/boolean.ts";
|
||||
import { Function } from "./values/function.ts";
|
||||
@@ -87,5 +87,5 @@ setGlobalPrototypes({
|
||||
type: TypeError.prototype,
|
||||
uint8: Uint8Array.prototype,
|
||||
int32: Int32Array.prototype,
|
||||
regex: RegExp,
|
||||
});
|
||||
setIntrinsic("regex", RegExp);
|
||||
@@ -110,6 +110,7 @@ export interface Primordials {
|
||||
now(): number;
|
||||
next(func: () => void): void;
|
||||
schedule(func: () => void, delay: number): () => void;
|
||||
setIntrinsic(key: string, val: any): void;
|
||||
}
|
||||
|
||||
// prevent optimization to "undefined", which doesn't exist yet
|
||||
@@ -132,6 +133,7 @@ export const {
|
||||
now,
|
||||
next,
|
||||
schedule,
|
||||
setIntrinsic,
|
||||
} = primordials;
|
||||
|
||||
export type regex = InstanceType<typeof regex>;
|
||||
Reference in New Issue
Block a user