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

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

Issue 1289643005: Rename accessors of class Field to make it more apparent as to what is being accessed - static fiel… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add-comment 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
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 const Class& random_class = Class::Handle( 1610 const Class& random_class = Class::Handle(
1611 math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1611 math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1612 ASSERT(!random_class.IsNull()); 1612 ASSERT(!random_class.IsNull());
1613 const Field& state_field = Field::ZoneHandle( 1613 const Field& state_field = Field::ZoneHandle(
1614 random_class.LookupInstanceField(Symbols::_state())); 1614 random_class.LookupInstanceField(Symbols::_state()));
1615 ASSERT(!state_field.IsNull()); 1615 ASSERT(!state_field.IsNull());
1616 const Field& random_A_field = Field::ZoneHandle( 1616 const Field& random_A_field = Field::ZoneHandle(
1617 random_class.LookupStaticField(Symbols::_A())); 1617 random_class.LookupStaticField(Symbols::_A()));
1618 ASSERT(!random_A_field.IsNull()); 1618 ASSERT(!random_A_field.IsNull());
1619 ASSERT(random_A_field.is_const()); 1619 ASSERT(random_A_field.is_const());
1620 const Instance& a_value = Instance::Handle(random_A_field.value()); 1620 const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
1621 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1621 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1622 1622
1623 __ ldr(R0, Address(SP, 0 * kWordSize)); // Receiver. 1623 // Receiver.
1624 __ ldr(R1, FieldAddress(R0, state_field.Offset())); // Field '_state'. 1624 __ ldr(R0, Address(SP, 0 * kWordSize));
1625 // Field '_state'.
1626 __ ldr(R1, FieldAddress(R0, state_field.Offset()));
1625 1627
1626 // Addresses of _state[0]. 1628 // Addresses of _state[0].
1627 const int64_t disp = 1629 const int64_t disp =
1628 Instance::DataOffsetFor(kTypedDataUint32ArrayCid) - kHeapObjectTag; 1630 Instance::DataOffsetFor(kTypedDataUint32ArrayCid) - kHeapObjectTag;
1629 1631
1630 __ LoadImmediate(R0, a_int_value); 1632 __ LoadImmediate(R0, a_int_value);
1631 __ LoadFromOffset(R2, R1, disp); 1633 __ LoadFromOffset(R2, R1, disp);
1632 __ LsrImmediate(R3, R2, 32); 1634 __ LsrImmediate(R3, R2, 32);
1633 __ andi(R2, R2, Immediate(0xffffffff)); 1635 __ andi(R2, R2, Immediate(0xffffffff));
1634 __ mul(R2, R0, R2); 1636 __ mul(R2, R0, R2);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 2136
2135 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2137 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2136 __ LoadIsolate(R0); 2138 __ LoadIsolate(R0);
2137 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2139 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2138 __ ret(); 2140 __ ret();
2139 } 2141 }
2140 2142
2141 } // namespace dart 2143 } // namespace dart
2142 2144
2143 #endif // defined TARGET_ARCH_ARM64 2145 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698