OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/runtime_entry.h" | 5 #include "vm/runtime_entry.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 const Bigint& big_left = Bigint::Handle(left); | 2305 const Bigint& big_left = Bigint::Handle(left); |
2306 const Bigint& big_right = Bigint::Handle(right); | 2306 const Bigint& big_right = Bigint::Handle(right); |
2307 return big_left.CompareWith(big_right); | 2307 return big_left.CompareWith(big_right); |
2308 } | 2308 } |
2309 END_LEAF_RUNTIME_ENTRY | 2309 END_LEAF_RUNTIME_ENTRY |
2310 | 2310 |
2311 | 2311 |
2312 double DartModulo(double left, double right) { | 2312 double DartModulo(double left, double right) { |
2313 double remainder = fmod_ieee(left, right); | 2313 double remainder = fmod_ieee(left, right); |
2314 if (remainder == 0.0) { | 2314 if (remainder == 0.0) { |
2315 // We explicitely switch to the positive 0.0 (just in case it was negative). | 2315 // We explicitly switch to the positive 0.0 (just in case it was negative). |
2316 remainder = +0.0; | 2316 remainder = +0.0; |
2317 } else if (remainder < 0.0) { | 2317 } else if (remainder < 0.0) { |
2318 if (right < 0) { | 2318 if (right < 0) { |
2319 remainder -= right; | 2319 remainder -= right; |
2320 } else { | 2320 } else { |
2321 remainder += right; | 2321 remainder += right; |
2322 } | 2322 } |
2323 } | 2323 } |
2324 return remainder; | 2324 return remainder; |
2325 } | 2325 } |
(...skipping 26 matching lines...) Expand all Loading... |
2352 const intptr_t new_size = 2 * old_size; | 2352 const intptr_t new_size = 2 * old_size; |
2353 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 2353 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
2354 const TypedData& new_data = | 2354 const TypedData& new_data = |
2355 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 2355 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
2356 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 2356 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
2357 typed_data_cell.SetAt(0, new_data); | 2357 typed_data_cell.SetAt(0, new_data); |
2358 arguments.SetReturn(new_data); | 2358 arguments.SetReturn(new_data); |
2359 } | 2359 } |
2360 | 2360 |
2361 } // namespace dart | 2361 } // namespace dart |
OLD | NEW |