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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 19662003: Refactor resolution code in the vm to properly handle ambiguity errors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 return false; // Compile method for slow case. 1343 return false; // Compile method for slow case.
1344 } 1344 }
1345 1345
1346 1346
1347 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64; 1347 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64;
1348 // _state[kSTATE_LO] = state & _MASK_32; 1348 // _state[kSTATE_LO] = state & _MASK_32;
1349 // _state[kSTATE_HI] = state >> 32; 1349 // _state[kSTATE_HI] = state >> 32;
1350 bool Intrinsifier::Random_nextState(Assembler* assembler) { 1350 bool Intrinsifier::Random_nextState(Assembler* assembler) {
1351 const Library& math_lib = Library::Handle(Library::MathLibrary()); 1351 const Library& math_lib = Library::Handle(Library::MathLibrary());
1352 ASSERT(!math_lib.IsNull()); 1352 ASSERT(!math_lib.IsNull());
1353 const Class& random_class = 1353 const Class& random_class = Class::Handle(
1354 Class::Handle(math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1354 math_lib.LookupClassAllowPrivate(Symbols::_Random(), NULL));
1355 ASSERT(!random_class.IsNull()); 1355 ASSERT(!random_class.IsNull());
1356 const Field& state_field = Field::ZoneHandle( 1356 const Field& state_field = Field::ZoneHandle(
1357 random_class.LookupInstanceField(Symbols::_state())); 1357 random_class.LookupInstanceField(Symbols::_state()));
1358 ASSERT(!state_field.IsNull()); 1358 ASSERT(!state_field.IsNull());
1359 const Field& random_A_field = Field::ZoneHandle( 1359 const Field& random_A_field = Field::ZoneHandle(
1360 random_class.LookupStaticField(Symbols::_A())); 1360 random_class.LookupStaticField(Symbols::_A()));
1361 ASSERT(!random_A_field.IsNull()); 1361 ASSERT(!random_A_field.IsNull());
1362 ASSERT(random_A_field.is_const()); 1362 ASSERT(random_A_field.is_const());
1363 const Instance& a_value = Instance::Handle(random_A_field.value()); 1363 const Instance& a_value = Instance::Handle(random_A_field.value());
1364 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1364 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 __ Bind(&fall_through); 1689 __ Bind(&fall_through);
1690 return false; 1690 return false;
1691 } 1691 }
1692 1692
1693 1693
1694 #undef __ 1694 #undef __
1695 1695
1696 } // namespace dart 1696 } // namespace dart
1697 1697
1698 #endif // defined TARGET_ARCH_X64 1698 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698