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

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

Issue 23484020: Update handling of ambiguous name references (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 167
168 void Intrinsifier::ImmutableArray_getIndexed(Assembler* assembler) { 168 void Intrinsifier::ImmutableArray_getIndexed(Assembler* assembler) {
169 return Array_getIndexed(assembler); 169 return Array_getIndexed(assembler);
170 } 170 }
171 171
172 172
173 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { 173 static intptr_t ComputeObjectArrayTypeArgumentsOffset() {
174 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 174 const Library& core_lib = Library::Handle(Library::CoreLibrary());
175 const Class& cls = Class::Handle( 175 const Class& cls = Class::Handle(
176 core_lib.LookupClassAllowPrivate(Symbols::ObjectArray(), NULL)); 176 core_lib.LookupClassAllowPrivate(Symbols::ObjectArray()));
177 ASSERT(!cls.IsNull()); 177 ASSERT(!cls.IsNull());
178 ASSERT(cls.HasTypeArguments()); 178 ASSERT(cls.HasTypeArguments());
179 ASSERT(cls.NumTypeArguments() == 1); 179 ASSERT(cls.NumTypeArguments() == 1);
180 const intptr_t field_offset = cls.type_arguments_field_offset(); 180 const intptr_t field_offset = cls.type_arguments_field_offset();
181 ASSERT(field_offset != Class::kNoTypeArguments); 181 ASSERT(field_offset != Class::kNoTypeArguments);
182 return field_offset; 182 return field_offset;
183 } 183 }
184 184
185 185
186 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 186 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 } 1402 }
1403 1403
1404 1404
1405 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64; 1405 // var state = ((_A * (_state[kSTATE_LO])) + _state[kSTATE_HI]) & _MASK_64;
1406 // _state[kSTATE_LO] = state & _MASK_32; 1406 // _state[kSTATE_LO] = state & _MASK_32;
1407 // _state[kSTATE_HI] = state >> 32; 1407 // _state[kSTATE_HI] = state >> 32;
1408 void Intrinsifier::Random_nextState(Assembler* assembler) { 1408 void Intrinsifier::Random_nextState(Assembler* assembler) {
1409 const Library& math_lib = Library::Handle(Library::MathLibrary()); 1409 const Library& math_lib = Library::Handle(Library::MathLibrary());
1410 ASSERT(!math_lib.IsNull()); 1410 ASSERT(!math_lib.IsNull());
1411 const Class& random_class = Class::Handle( 1411 const Class& random_class = Class::Handle(
1412 math_lib.LookupClassAllowPrivate(Symbols::_Random(), NULL)); 1412 math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1413 ASSERT(!random_class.IsNull()); 1413 ASSERT(!random_class.IsNull());
1414 const Field& state_field = Field::ZoneHandle( 1414 const Field& state_field = Field::ZoneHandle(
1415 random_class.LookupInstanceField(Symbols::_state())); 1415 random_class.LookupInstanceField(Symbols::_state()));
1416 ASSERT(!state_field.IsNull()); 1416 ASSERT(!state_field.IsNull());
1417 const Field& random_A_field = Field::ZoneHandle( 1417 const Field& random_A_field = Field::ZoneHandle(
1418 random_class.LookupStaticField(Symbols::_A())); 1418 random_class.LookupStaticField(Symbols::_A()));
1419 ASSERT(!random_A_field.IsNull()); 1419 ASSERT(!random_A_field.IsNull());
1420 ASSERT(random_A_field.is_const()); 1420 ASSERT(random_A_field.is_const());
1421 const Instance& a_value = Instance::Handle(random_A_field.value()); 1421 const Instance& a_value = Instance::Handle(random_A_field.value());
1422 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1422 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 __ Bind(&ok); 1733 __ Bind(&ok);
1734 __ ret(); 1734 __ ret();
1735 1735
1736 __ Bind(&fall_through); 1736 __ Bind(&fall_through);
1737 } 1737 }
1738 1738
1739 #undef __ 1739 #undef __
1740 } // namespace dart 1740 } // namespace dart
1741 1741
1742 #endif // defined TARGET_ARCH_IA32 1742 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698