mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
Make sure that contextual type arguments are passed when resolving the target of a new
expression; Fix decoding of UTF8 strings with more than two code units in the Binaryen interface
This commit is contained in:
parent
bde13b12cf
commit
05117f9ee3
2
dist/assemblyscript.js
vendored
2
dist/assemblyscript.js
vendored
File diff suppressed because one or more lines are too long
2
dist/assemblyscript.js.map
vendored
2
dist/assemblyscript.js.map
vendored
File diff suppressed because one or more lines are too long
@ -5847,7 +5847,7 @@ export class Compiler extends DiagnosticEmitter {
|
||||
var classPrototype = <ClassPrototype>target;
|
||||
var classInstance = classPrototype.resolveUsingTypeArguments( // reports
|
||||
expression.typeArguments,
|
||||
null,
|
||||
currentFunction.flow.contextualTypeArguments,
|
||||
expression
|
||||
);
|
||||
if (!classInstance) return module.createUnreachable();
|
||||
|
@ -1195,6 +1195,7 @@ function stringLengthUTF8(str: string): usize {
|
||||
function allocString(str: string | null): usize {
|
||||
if (str == null) return 0;
|
||||
var ptr = allocate_memory(stringLengthUTF8(str) + 1);
|
||||
// the following is based on Emscripten's stringToUTF8Array
|
||||
var idx = ptr;
|
||||
for (let i = 0, k = str.length; i < k; ++i) {
|
||||
let u = str.charCodeAt(i);
|
||||
@ -1284,6 +1285,7 @@ export function readString(ptr: usize): string | null {
|
||||
}
|
||||
}
|
||||
}
|
||||
arr.push(cp);
|
||||
// if (cp < 0x10000) {
|
||||
// arr.push(cp);
|
||||
// } else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user