Bug 164806
| Summary: | tryAppendLea doesn't consider that something representable as an int32_t might actually be a Const64Value | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> |
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, oliver, ticaiolima, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Saam Barati
There is code like this:
```
if (value->child(1)->isRepresentableAs<int32_t>()
&& canBeInternal(value->child(0))
&& value->child(0)->opcode() == Add) {
innerAdd = value->child(0);
offset = value->child(1)->asInt32();
value = value->child(0);
}
```
It calls asInt32(). It should be calling static_cast<int32_t>(asInt()).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Saam Barati
I'm doing this in the other bug where I found this.
*** This bug has been marked as a duplicate of bug 163865 ***