TEST=mjsunit/compiler/regress-444508.js
BUG=chromium:444508
LOG=y
R=machenbach@chromium.org
Review URL: https://codereview.chromium.org/
794013004
Cr-Commit-Position: refs/heads/master@{#25916}
double const byte_length = array->byte_length()->Number();
CHECK_LT(k, arraysize(shifted_int32_ranges_));
if (IsExternalArrayElementsKind(array->map()->elements_kind()) &&
- access.external_array_type() != kExternalUint8ClampedArray &&
key_type->Is(shifted_int32_ranges_[k]) && byte_length <= kMaxInt) {
// JSLoadProperty(typed-array, int32)
Handle<ExternalArray> elements =
MachineType BufferAccess::machine_type() const {
switch (external_array_type_) {
case kExternalUint8Array:
+ case kExternalUint8ClampedArray:
return kMachUint8;
case kExternalInt8Array:
return kMachInt8;
return kMachFloat32;
case kExternalFloat64Array:
return kMachFloat64;
- case kExternalUint8ClampedArray:
- break;
}
UNREACHABLE();
return kMachNone;
--- /dev/null
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function Module(stdlib, foreign, heap) {
+ "use asm";
+ // This is not valid asm.js, but should nevertheless work.
+ var MEM = new Uint8ClampedArray(heap);
+ function foo(i) { MEM[0] = 1; }
+ return {foo: foo};
+})(this, {}, new ArrayBuffer(64 * 1024)).foo();