Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8189,11 +8189,9 @@ export class Compiler extends DiagnosticEmitter {
let arrayInstance = <Class>element;
let arrayType = arrayInstance.type;
let elementType = arrayInstance.getTypeArgumentsTo(program.arrayPrototype)![0];
let arrayBufferInstance = assert(program.arrayBufferInstance);

// block those here so compiling expressions doesn't conflict
let tempThis = flow.getTempLocal(this.options.usizeType);
let tempDataStart = flow.getTempLocal(arrayBufferInstance.type);

// compile value expressions and find out whether all are constant
let expressions = expression.elementExpressions;
Expand Down Expand Up @@ -8269,16 +8267,6 @@ export class Compiler extends DiagnosticEmitter {
let dataStartProperty = (<PropertyPrototype>dataStartMember).instance;
if (!dataStartProperty) return module.unreachable();
assert(dataStartProperty.isField && dataStartProperty.memoryOffset >= 0);
stmts.push(
module.local_set(tempDataStart.index,
module.load(arrayType.byteSize, false,
module.local_get(tempThis.index, arrayTypeRef),
arrayTypeRef,
dataStartProperty.memoryOffset
),
true // ArrayBuffer
)
);
for (let i = 0; i < length; ++i) {
// this[i] = value
stmts.push(
Expand Down
2 changes: 0 additions & 2 deletions tests/compiler/bindings/noExportRuntime.debug.wat
Original file line number Diff line number Diff line change
Expand Up @@ -2361,8 +2361,6 @@
(func $start:bindings/noExportRuntime
(local $0 i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
memory.size
i32.const 16
i32.shl
Expand Down
Loading