| 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); | |
| 402 } | 401 } |
| 403 | 402 |
| 404 | 403 |
| 405 RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) { | 404 RUNTIME_FUNCTION(Runtime_IsSharedInteger32TypedArray) { |
| 406 HandleScope scope(isolate); | 405 HandleScope scope(isolate); |
| 407 DCHECK(args.length() == 1); | 406 DCHECK(args.length() == 1); |
| 408 if (!args[0]->IsJSTypedArray()) { | 407 if (!args[0]->IsJSTypedArray()) { |
| 409 return isolate->heap()->false_value(); | 408 return isolate->heap()->false_value(); |
| 410 } | 409 } |
| 411 | 410 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 DATA_VIEW_SETTER(Uint16, uint16_t) | 626 DATA_VIEW_SETTER(Uint16, uint16_t) |
| 628 DATA_VIEW_SETTER(Int16, int16_t) | 627 DATA_VIEW_SETTER(Int16, int16_t) |
| 629 DATA_VIEW_SETTER(Uint32, uint32_t) | 628 DATA_VIEW_SETTER(Uint32, uint32_t) |
| 630 DATA_VIEW_SETTER(Int32, int32_t) | 629 DATA_VIEW_SETTER(Int32, int32_t) |
| 631 DATA_VIEW_SETTER(Float32, float) | 630 DATA_VIEW_SETTER(Float32, float) |
| 632 DATA_VIEW_SETTER(Float64, double) | 631 DATA_VIEW_SETTER(Float64, double) |
| 633 | 632 |
| 634 #undef DATA_VIEW_SETTER | 633 #undef DATA_VIEW_SETTER |
| 635 } // namespace internal | 634 } // namespace internal |
| 636 } // namespace v8 | 635 } // namespace v8 |
| OLD | NEW |