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

Unified Diff: src/runtime.cc

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Self-review Created 7 years 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
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 4d84a153fc68cdba17ce52bf9295e65abfcd3df4..1e846bc7cafba069cf382a1683eb6cc9c334f164 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5225,7 +5225,8 @@ Handle<Object> Runtime::SetObjectProperty(Isolate* isolate,
}
js_object->ValidateElements();
- if (js_object->HasExternalArrayElements()) {
+ if (js_object->HasExternalArrayElements() ||
+ js_object->HasFixedTypedArrayElements()) {
if (!value->IsNumber() && !value->IsUndefined()) {
bool has_exception;
Handle<Object> number =
@@ -10024,6 +10025,15 @@ static uint32_t EstimateElementCount(Handle<JSArray> array) {
case EXTERNAL_FLOAT_ELEMENTS:
case EXTERNAL_DOUBLE_ELEMENTS:
case EXTERNAL_PIXEL_ELEMENTS:
+ case UINT8_ELEMENTS:
+ case INT8_ELEMENTS:
+ case UINT16_ELEMENTS:
+ case INT16_ELEMENTS:
+ case UINT32_ELEMENTS:
+ case INT32_ELEMENTS:
+ case FLOAT32_ELEMENTS:
+ case FLOAT64_ELEMENTS:
+ case UINT8_CLAMPED_ELEMENTS:
// External arrays are always dense.
return length;
}

Powered by Google App Engine
This is Rietveld 408576698