зеркало из https://github.com/mozilla/pluotsorbet.git
fix and optimize typed array loads in Frame
This commit is contained in:
Родитель
fe1dddf424
Коммит
e7ade3c1f0
13
context.ts
13
context.ts
|
@ -46,22 +46,19 @@ module J2ME {
|
|||
}
|
||||
|
||||
read32(): number {
|
||||
return this.read16() << 16 | this.read16();
|
||||
return this.read32signed() >>> 0;
|
||||
}
|
||||
|
||||
read8signed(): number {
|
||||
var x = this.read8();
|
||||
return (x > 0x7f) ? (x - 0x100) : x;
|
||||
return this.read8() << 24 >> 24;
|
||||
}
|
||||
|
||||
read16signed(): number {
|
||||
var x = this.read16();
|
||||
return (x > 0x7fff) ? (x - 0x10000) : x;
|
||||
return this.read16() << 16 >> 16;
|
||||
}
|
||||
|
||||
read32signed(): number {
|
||||
var x = this.read32();
|
||||
return (x > 0x7fffffff) ? (x - 0x100000000) : x;
|
||||
return this.read16() << 16 | this.read16();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -474,4 +471,4 @@ module J2ME {
|
|||
}
|
||||
|
||||
var Context = J2ME.Context;
|
||||
var Frame = J2ME.Frame;
|
||||
var Frame = J2ME.Frame;
|
||||
|
|
Загрузка…
Ссылка в новой задаче