1
- import { red } from "https://deno.land/std@0.128 .0/fmt/colors.ts" ;
1
+ import { red } from "https://deno.land/std@0.134 .0/fmt/colors.ts" ;
2
2
let wasm ;
3
3
4
4
const heap = new Array ( 32 ) . fill ( undefined ) ;
@@ -9,23 +9,7 @@ function getObject(idx) {
9
9
return heap [ idx ] ;
10
10
}
11
11
12
- let heap_next = heap . length ;
13
-
14
- function dropObject ( idx ) {
15
- if ( idx < 36 ) return ;
16
- heap [ idx ] = heap_next ;
17
- heap_next = idx ;
18
- }
19
-
20
- function takeObject ( idx ) {
21
- const ret = getObject ( idx ) ;
22
- dropObject ( idx ) ;
23
- return ret ;
24
- }
25
-
26
- let cachedTextDecoder = new TextDecoder ( "utf-8" , { ignoreBOM : true , fatal : true } ) ;
27
-
28
- cachedTextDecoder . decode ( ) ;
12
+ let WASM_VECTOR_LEN = 0 ;
29
13
30
14
let cachegetUint8Memory0 = null ;
31
15
function getUint8Memory0 ( ) {
@@ -35,22 +19,7 @@ function getUint8Memory0() {
35
19
return cachegetUint8Memory0 ;
36
20
}
37
21
38
- function getStringFromWasm0 ( ptr , len ) {
39
- return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
40
- }
41
-
42
- function addHeapObject ( obj ) {
43
- if ( heap_next === heap . length ) heap . push ( heap . length + 1 ) ;
44
- const idx = heap_next ;
45
- heap_next = heap [ idx ] ;
46
-
47
- heap [ idx ] = obj ;
48
- return idx ;
49
- }
50
-
51
- let WASM_VECTOR_LEN = 0 ;
52
-
53
- let cachedTextEncoder = new TextEncoder ( "utf-8" ) ;
22
+ const cachedTextEncoder = new TextEncoder ( "utf-8" ) ;
54
23
55
24
const encodeString = ( typeof cachedTextEncoder . encodeInto === "function"
56
25
? function ( arg , view ) {
@@ -109,6 +78,37 @@ function getInt32Memory0() {
109
78
}
110
79
return cachegetInt32Memory0 ;
111
80
}
81
+
82
+ let heap_next = heap . length ;
83
+
84
+ function dropObject ( idx ) {
85
+ if ( idx < 36 ) return ;
86
+ heap [ idx ] = heap_next ;
87
+ heap_next = idx ;
88
+ }
89
+
90
+ function takeObject ( idx ) {
91
+ const ret = getObject ( idx ) ;
92
+ dropObject ( idx ) ;
93
+ return ret ;
94
+ }
95
+
96
+ const cachedTextDecoder = new TextDecoder ( "utf-8" , { ignoreBOM : true , fatal : true } ) ;
97
+
98
+ cachedTextDecoder . decode ( ) ;
99
+
100
+ function getStringFromWasm0 ( ptr , len ) {
101
+ return cachedTextDecoder . decode ( getUint8Memory0 ( ) . subarray ( ptr , ptr + len ) ) ;
102
+ }
103
+
104
+ function addHeapObject ( obj ) {
105
+ if ( heap_next === heap . length ) heap . push ( heap . length + 1 ) ;
106
+ const idx = heap_next ;
107
+ heap_next = heap [ idx ] ;
108
+
109
+ heap [ idx ] = obj ;
110
+ return idx ;
111
+ }
112
112
/**
113
113
* @param {string } specifier
114
114
* @param {string } code
@@ -118,10 +118,10 @@ function getInt32Memory0() {
118
118
export function fastTransform ( specifier , code , options ) {
119
119
try {
120
120
const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
121
- var ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
122
- var len0 = WASM_VECTOR_LEN ;
123
- var ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
124
- var len1 = WASM_VECTOR_LEN ;
121
+ const ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
122
+ const len0 = WASM_VECTOR_LEN ;
123
+ const ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
124
+ const len1 = WASM_VECTOR_LEN ;
125
125
wasm . fastTransform ( retptr , ptr0 , len0 , ptr1 , len1 , addHeapObject ( options ) ) ;
126
126
var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
127
127
var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
@@ -143,10 +143,10 @@ export function fastTransform(specifier, code, options) {
143
143
export function parseExportNames ( specifier , code ) {
144
144
try {
145
145
const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
146
- var ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
147
- var len0 = WASM_VECTOR_LEN ;
148
- var ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
149
- var len1 = WASM_VECTOR_LEN ;
146
+ const ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
147
+ const len0 = WASM_VECTOR_LEN ;
148
+ const ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
149
+ const len1 = WASM_VECTOR_LEN ;
150
150
wasm . parseExportNames ( retptr , ptr0 , len0 , ptr1 , len1 ) ;
151
151
var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
152
152
var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
@@ -169,10 +169,10 @@ export function parseExportNames(specifier, code) {
169
169
export function transform ( specifier , code , options ) {
170
170
try {
171
171
const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
172
- var ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
173
- var len0 = WASM_VECTOR_LEN ;
174
- var ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
175
- var len1 = WASM_VECTOR_LEN ;
172
+ const ptr0 = passStringToWasm0 ( specifier , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
173
+ const len0 = WASM_VECTOR_LEN ;
174
+ const ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
175
+ const len1 = WASM_VECTOR_LEN ;
176
176
wasm . transform ( retptr , ptr0 , len0 , ptr1 , len1 , addHeapObject ( options ) ) ;
177
177
var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
178
178
var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
@@ -195,10 +195,10 @@ export function transform(specifier, code, options) {
195
195
export function transformCSS ( filename , code , config_val ) {
196
196
try {
197
197
const retptr = wasm . __wbindgen_add_to_stack_pointer ( - 16 ) ;
198
- var ptr0 = passStringToWasm0 ( filename , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
199
- var len0 = WASM_VECTOR_LEN ;
200
- var ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
201
- var len1 = WASM_VECTOR_LEN ;
198
+ const ptr0 = passStringToWasm0 ( filename , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
199
+ const len0 = WASM_VECTOR_LEN ;
200
+ const ptr1 = passStringToWasm0 ( code , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
201
+ const len1 = WASM_VECTOR_LEN ;
202
202
wasm . transformCSS ( retptr , ptr0 , len0 , ptr1 , len1 , addHeapObject ( config_val ) ) ;
203
203
var r0 = getInt32Memory0 ( ) [ retptr / 4 + 0 ] ;
204
204
var r1 = getInt32Memory0 ( ) [ retptr / 4 + 1 ] ;
@@ -248,29 +248,29 @@ async function init(input) {
248
248
}
249
249
const imports = { } ;
250
250
imports . wbg = { } ;
251
+ imports . wbg . __wbindgen_json_serialize = function ( arg0 , arg1 ) {
252
+ const obj = getObject ( arg1 ) ;
253
+ const ret = JSON . stringify ( obj === undefined ? null : obj ) ;
254
+ const ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
255
+ const len0 = WASM_VECTOR_LEN ;
256
+ getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
257
+ getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
258
+ } ;
251
259
imports . wbg . __wbindgen_object_drop_ref = function ( arg0 ) {
252
260
takeObject ( arg0 ) ;
253
261
} ;
254
262
imports . wbg . __wbindgen_json_parse = function ( arg0 , arg1 ) {
255
- var ret = JSON . parse ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
263
+ const ret = JSON . parse ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
256
264
return addHeapObject ( ret ) ;
257
265
} ;
258
- imports . wbg . __wbindgen_json_serialize = function ( arg0 , arg1 ) {
259
- const obj = getObject ( arg1 ) ;
260
- var ret = JSON . stringify ( obj === undefined ? null : obj ) ;
261
- var ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
262
- var len0 = WASM_VECTOR_LEN ;
263
- getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
264
- getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
265
- } ;
266
266
imports . wbg . __wbg_new_693216e109162396 = function ( ) {
267
- var ret = new Error ( ) ;
267
+ const ret = new Error ( ) ;
268
268
return addHeapObject ( ret ) ;
269
269
} ;
270
270
imports . wbg . __wbg_stack_0ddaca5d1abfb52f = function ( arg0 , arg1 ) {
271
- var ret = getObject ( arg1 ) . stack ;
272
- var ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
273
- var len0 = WASM_VECTOR_LEN ;
271
+ const ret = getObject ( arg1 ) . stack ;
272
+ const ptr0 = passStringToWasm0 ( ret , wasm . __wbindgen_malloc , wasm . __wbindgen_realloc ) ;
273
+ const len0 = WASM_VECTOR_LEN ;
274
274
getInt32Memory0 ( ) [ arg0 / 4 + 1 ] = len0 ;
275
275
getInt32Memory0 ( ) [ arg0 / 4 + 0 ] = ptr0 ;
276
276
} ;
@@ -287,8 +287,8 @@ async function init(input) {
287
287
wasm . __wbindgen_free ( arg0 , arg1 ) ;
288
288
}
289
289
} ;
290
- imports . wbg . __wbg_new_55259b13834a484c = function ( arg0 , arg1 ) {
291
- var ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
290
+ imports . wbg . __wbg_new_3047bf4b4f02b802 = function ( arg0 , arg1 ) {
291
+ const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
292
292
return addHeapObject ( ret ) ;
293
293
} ;
294
294
imports . wbg . __wbindgen_throw = function ( arg0 , arg1 ) {
0 commit comments