Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 676643002: [turbofan] Currently we cannot handle typed arrays bigger than 2GiB. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index cc8d6ce79f94bea083b6f59672deea137c6fd086..fb510e07ce941efcc831a2e82de599d652e7abc4 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -566,7 +566,8 @@ Reduction JSTypedLowering::ReduceJSLoadProperty(Node* node) {
if (IsExternalArrayElementsKind(array->map()->elements_kind())) {
ExternalArrayType type = array->type();
uint32_t byte_length;
- if (array->byte_length()->ToUint32(&byte_length)) {
+ if (array->byte_length()->ToUint32(&byte_length) &&
+ byte_length <= static_cast<uint32_t>(kMaxInt)) {
Handle<ExternalArray> elements =
Handle<ExternalArray>::cast(handle(array->elements()));
Node* pointer = jsgraph()->IntPtrConstant(
@@ -603,7 +604,8 @@ Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) {
if (IsExternalArrayElementsKind(array->map()->elements_kind())) {
ExternalArrayType type = array->type();
uint32_t byte_length;
- if (array->byte_length()->ToUint32(&byte_length)) {
+ if (array->byte_length()->ToUint32(&byte_length) &&
+ byte_length <= static_cast<uint32_t>(kMaxInt)) {
Handle<ExternalArray> elements =
Handle<ExternalArray>::cast(handle(array->elements()));
Node* pointer = jsgraph()->IntPtrConstant(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698