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

Side by Side Diff: runtime/lib/simd128.cc

Issue 1318943005: Update range errors to agree on the numbers. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: More tests Created 5 years, 3 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h" 8 #include "vm/native_entry.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 static void ThrowMaskRangeException(int64_t m) { 14 static void ThrowMaskRangeException(int64_t m) {
15 if ((m < 0) || (m > 255)) { 15 if ((m < 0) || (m > 255)) {
16 Exceptions::ThrowRangeError( 16 Exceptions::ThrowRangeError(
17 "mask", Integer::Handle(Integer::New(m)), 0, 256); 17 "mask", Integer::Handle(Integer::New(m)), 0, 255);
18 } 18 }
19 } 19 }
20 20
21 21
22 DEFINE_NATIVE_ENTRY(Float32x4_fromDoubles, 5) { 22 DEFINE_NATIVE_ENTRY(Float32x4_fromDoubles, 5) {
23 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull()); 23 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull());
24 GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1)); 24 GET_NON_NULL_NATIVE_ARGUMENT(Double, x, arguments->NativeArgAt(1));
25 GET_NON_NULL_NATIVE_ARGUMENT(Double, y, arguments->NativeArgAt(2)); 25 GET_NON_NULL_NATIVE_ARGUMENT(Double, y, arguments->NativeArgAt(2));
26 GET_NON_NULL_NATIVE_ARGUMENT(Double, z, arguments->NativeArgAt(3)); 26 GET_NON_NULL_NATIVE_ARGUMENT(Double, z, arguments->NativeArgAt(3));
27 GET_NON_NULL_NATIVE_ARGUMENT(Double, w, arguments->NativeArgAt(4)); 27 GET_NON_NULL_NATIVE_ARGUMENT(Double, w, arguments->NativeArgAt(4));
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 873
874 874
875 DEFINE_NATIVE_ENTRY(Float64x2_sqrt, 1) { 875 DEFINE_NATIVE_ENTRY(Float64x2_sqrt, 1) {
876 GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0)); 876 GET_NON_NULL_NATIVE_ARGUMENT(Float64x2, self, arguments->NativeArgAt(0));
877 double _x = sqrt(self.x()); 877 double _x = sqrt(self.x());
878 double _y = sqrt(self.y()); 878 double _y = sqrt(self.y());
879 return Float64x2::New(_x, _y); 879 return Float64x2::New(_x, _y);
880 } 880 }
881 881
882 } // namespace dart 882 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698