| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <limits> | 6 #include <limits> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 } | 1015 } |
| 1016 return isolate->heap()->undefined_value(); | 1016 return isolate->heap()->undefined_value(); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 | 1019 |
| 1020 // Initializes a typed array from an array-like object. | 1020 // Initializes a typed array from an array-like object. |
| 1021 // If an array-like object happens to be a typed array of the same type, | 1021 // If an array-like object happens to be a typed array of the same type, |
| 1022 // initializes backing store using memove. | 1022 // initializes backing store using memove. |
| 1023 // | 1023 // |
| 1024 // Returns true if backing store was initialized or false otherwise. | 1024 // Returns true if backing store was initialized or false otherwise. |
| 1025 // Work around for GCC 4.4.6 |
| 1026 #pragma GCC diagnostic ignored "-Wuninitialized" |
| 1025 RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) { | 1027 RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) { |
| 1026 HandleScope scope(isolate); | 1028 HandleScope scope(isolate); |
| 1027 ASSERT(args.length() == 4); | 1029 ASSERT(args.length() == 4); |
| 1028 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); | 1030 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); |
| 1029 CONVERT_SMI_ARG_CHECKED(arrayId, 1); | 1031 CONVERT_SMI_ARG_CHECKED(arrayId, 1); |
| 1030 CONVERT_ARG_HANDLE_CHECKED(Object, source, 2); | 1032 CONVERT_ARG_HANDLE_CHECKED(Object, source, 2); |
| 1031 CONVERT_NUMBER_ARG_HANDLE_CHECKED(length_obj, 3); | 1033 CONVERT_NUMBER_ARG_HANDLE_CHECKED(length_obj, 3); |
| 1032 | 1034 |
| 1033 RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST && | 1035 RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST && |
| 1034 arrayId <= Runtime::ARRAY_ID_LAST); | 1036 arrayId <= Runtime::ARRAY_ID_LAST); |
| (...skipping 13960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14995 } | 14997 } |
| 14996 return NULL; | 14998 return NULL; |
| 14997 } | 14999 } |
| 14998 | 15000 |
| 14999 | 15001 |
| 15000 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15002 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15001 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15003 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15002 } | 15004 } |
| 15003 | 15005 |
| 15004 } } // namespace v8::internal | 15006 } } // namespace v8::internal |
| OLD | NEW |