OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/messages.h" | 9 #include "src/messages.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 RUNTIME_FUNCTION(Runtime_IsSharedIntegerTypedArray) { | 390 RUNTIME_FUNCTION(Runtime_IsSharedIntegerTypedArray) { |
391 HandleScope scope(isolate); | 391 HandleScope scope(isolate); |
392 DCHECK(args.length() == 1); | 392 DCHECK(args.length() == 1); |
393 if (!args[0]->IsJSTypedArray()) { | 393 if (!args[0]->IsJSTypedArray()) { |
394 return isolate->heap()->false_value(); | 394 return isolate->heap()->false_value(); |
395 } | 395 } |
396 | 396 |
397 Handle<JSTypedArray> obj(JSTypedArray::cast(args[0])); | 397 Handle<JSTypedArray> obj(JSTypedArray::cast(args[0])); |
398 return isolate->heap()->ToBoolean(obj->GetBuffer()->is_shared() && | 398 return isolate->heap()->ToBoolean(obj->GetBuffer()->is_shared() && |
399 obj->type() != kExternalFloat32Array && | 399 obj->type() != kExternalFloat32Array && |
400 obj->type() != kExternalFloat64Array); | 400 obj->type() != kExternalFloat64Array && |
| 401 obj->type() != kExternalUint8ClampedArray); |
401 } | 402 } |
402 | 403 |
403 | 404 |
404 RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) { | 405 RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) { |
405 HandleScope scope(isolate); | 406 HandleScope scope(isolate); |
406 DCHECK(args.length() == 1); | 407 DCHECK(args.length() == 1); |
407 if (!args[0]->IsJSTypedArray()) { | 408 if (!args[0]->IsJSTypedArray()) { |
408 return isolate->heap()->false_value(); | 409 return isolate->heap()->false_value(); |
409 } | 410 } |
410 | 411 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 DATA_VIEW_SETTER(Uint16, uint16_t) | 627 DATA_VIEW_SETTER(Uint16, uint16_t) |
627 DATA_VIEW_SETTER(Int16, int16_t) | 628 DATA_VIEW_SETTER(Int16, int16_t) |
628 DATA_VIEW_SETTER(Uint32, uint32_t) | 629 DATA_VIEW_SETTER(Uint32, uint32_t) |
629 DATA_VIEW_SETTER(Int32, int32_t) | 630 DATA_VIEW_SETTER(Int32, int32_t) |
630 DATA_VIEW_SETTER(Float32, float) | 631 DATA_VIEW_SETTER(Float32, float) |
631 DATA_VIEW_SETTER(Float64, double) | 632 DATA_VIEW_SETTER(Float64, double) |
632 | 633 |
633 #undef DATA_VIEW_SETTER | 634 #undef DATA_VIEW_SETTER |
634 } // namespace internal | 635 } // namespace internal |
635 } // namespace v8 | 636 } // namespace v8 |
OLD | NEW |