Commit 18beb500 authored by jochen's avatar jochen Committed by Commit bot

Add support for on-heap typed arrays to HLoadKeyed::InferRange

BUG=v8:3996
R=bmeurer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1126413005

Cr-Commit-Position: refs/heads/master@{#28319}
parent 6e6d956e
......@@ -3198,13 +3198,18 @@ Range* HLoadNamedField::InferRange(Zone* zone) {
Range* HLoadKeyed::InferRange(Zone* zone) {
switch (elements_kind()) {
case EXTERNAL_INT8_ELEMENTS:
case INT8_ELEMENTS:
return new(zone) Range(kMinInt8, kMaxInt8);
case EXTERNAL_UINT8_ELEMENTS:
case EXTERNAL_UINT8_CLAMPED_ELEMENTS:
case UINT8_ELEMENTS:
case UINT8_CLAMPED_ELEMENTS:
return new(zone) Range(kMinUInt8, kMaxUInt8);
case EXTERNAL_INT16_ELEMENTS:
case INT16_ELEMENTS:
return new(zone) Range(kMinInt16, kMaxInt16);
case EXTERNAL_UINT16_ELEMENTS:
case UINT16_ELEMENTS:
return new(zone) Range(kMinUInt16, kMaxUInt16);
default:
return HValue::InferRange(zone);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment