Closed
Bug 878505
Opened 12 years ago
Closed 12 years ago
OdinMonkey: reading from float view gives doublish but writing requires double?
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: jruderman, Assigned: luke)
References
Details
(Keywords: testcase)
Attachments
(1 file)
|
2.30 KB,
patch
|
bbouvier
:
review+
|
Details | Diff | Splinter Review |
function g(stdlib, foreign, heap)
{
"use asm"
var Float32ArrayView = new stdlib.Float32Array(heap)
function f()
{
Float32ArrayView[0] = Float32ArrayView[1];
}
return f;
}
/Users/jruderman/Desktop/asmjs/e.js:7:0 warning: asm.js type error: doublish is not double
(Is this an intentional deviation from the spec?)
| Reporter | ||
Comment 1•12 years ago
|
||
In contrast, intish works fine:
function g(stdlib, foreign, heap)
{
"use asm"
var Int32ArrayView = new stdlib.Int32Array(heap)
function f()
{
Int32ArrayView[0] = Int32ArrayView[1];
}
return f;
}
My reading of the spec is that both intish heaps and doublish heaps should work, and both of these examples validate in http://turtlescript.github.cscott.net/docco/asm-llvm.html
(Maybe I should make asm-llvm an online checker?)
| Assignee | ||
Comment 3•12 years ago
|
||
Yeah, we talked about it on irc and I think this is just a simple bug in Odin.
| Assignee | ||
Comment 4•12 years ago
|
||
| Reporter | ||
Comment 5•12 years ago
|
||
> return f.failf(lhs, "%s is not a subtype of intish", rhsType.toChars());
vs
>+ return f.failf(lhs, "%s is not doublish", rhsType.toChars());
seems like a minor inconsistency.
Comment 6•12 years ago
|
||
Comment on attachment 760095 [details] [diff] [review]
fix and test
Review of attachment 760095 [details] [diff] [review]:
-----------------------------------------------------------------
Nice! As Jesse pointed out, it would be also nice that the messages have the same form.
And still for the purposes of consistency, should we change the enum element |ArrayStore_Double| to |ArrayStore_Doublish|?
Attachment #760095 -
Flags: review?(bbouvier) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
Mmm, by sense of style seems weak at 2am. Thanks guys
| Assignee | ||
Comment 8•12 years ago
|
||
Comment 9•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•