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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 } | 1028 } |
1029 return isolate->heap()->undefined_value(); | 1029 return isolate->heap()->undefined_value(); |
1030 } | 1030 } |
1031 | 1031 |
1032 | 1032 |
1033 // Initializes a typed array from an array-like object. | 1033 // Initializes a typed array from an array-like object. |
1034 // If an array-like object happens to be a typed array of the same type, | 1034 // If an array-like object happens to be a typed array of the same type, |
1035 // initializes backing store using memove. | 1035 // initializes backing store using memove. |
1036 // | 1036 // |
1037 // Returns true if backing store was initialized or false otherwise. | 1037 // Returns true if backing store was initialized or false otherwise. |
| 1038 // Work around for GCC 4.4.6 |
| 1039 #pragma GCC diagnostic ignored "-Wuninitialized" |
1038 RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) { | 1040 RUNTIME_FUNCTION(Runtime_TypedArrayInitializeFromArrayLike) { |
1039 HandleScope scope(isolate); | 1041 HandleScope scope(isolate); |
1040 DCHECK(args.length() == 4); | 1042 DCHECK(args.length() == 4); |
1041 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); | 1043 CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, holder, 0); |
1042 CONVERT_SMI_ARG_CHECKED(arrayId, 1); | 1044 CONVERT_SMI_ARG_CHECKED(arrayId, 1); |
1043 CONVERT_ARG_HANDLE_CHECKED(Object, source, 2); | 1045 CONVERT_ARG_HANDLE_CHECKED(Object, source, 2); |
1044 CONVERT_NUMBER_ARG_HANDLE_CHECKED(length_obj, 3); | 1046 CONVERT_NUMBER_ARG_HANDLE_CHECKED(length_obj, 3); |
1045 | 1047 |
1046 RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST && | 1048 RUNTIME_ASSERT(arrayId >= Runtime::ARRAY_ID_FIRST && |
1047 arrayId <= Runtime::ARRAY_ID_LAST); | 1049 arrayId <= Runtime::ARRAY_ID_LAST); |
(...skipping 14573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15621 } | 15623 } |
15622 return NULL; | 15624 return NULL; |
15623 } | 15625 } |
15624 | 15626 |
15625 | 15627 |
15626 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15628 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15627 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15629 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15628 } | 15630 } |
15629 | 15631 |
15630 } } // namespace v8::internal | 15632 } } // namespace v8::internal |
OLD | NEW |