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

Side by Side Diff: runtime/vm/intrinsifier_arm.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/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 const Class& random_class = Class::Handle( 1529 const Class& random_class = Class::Handle(
1530 math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1530 math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1531 ASSERT(!random_class.IsNull()); 1531 ASSERT(!random_class.IsNull());
1532 const Field& state_field = Field::ZoneHandle( 1532 const Field& state_field = Field::ZoneHandle(
1533 random_class.LookupInstanceField(Symbols::_state())); 1533 random_class.LookupInstanceField(Symbols::_state()));
1534 ASSERT(!state_field.IsNull()); 1534 ASSERT(!state_field.IsNull());
1535 const Field& random_A_field = Field::ZoneHandle( 1535 const Field& random_A_field = Field::ZoneHandle(
1536 random_class.LookupStaticField(Symbols::_A())); 1536 random_class.LookupStaticField(Symbols::_A()));
1537 ASSERT(!random_A_field.IsNull()); 1537 ASSERT(!random_A_field.IsNull());
1538 ASSERT(random_A_field.is_const()); 1538 ASSERT(random_A_field.is_const());
1539 const Instance& a_value = Instance::Handle(random_A_field.value()); 1539 const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
1540 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1540 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1541 // 'a_int_value' is a mask. 1541 // 'a_int_value' is a mask.
1542 ASSERT(Utils::IsUint(32, a_int_value)); 1542 ASSERT(Utils::IsUint(32, a_int_value));
1543 int32_t a_int32_value = static_cast<int32_t>(a_int_value); 1543 int32_t a_int32_value = static_cast<int32_t>(a_int_value);
1544 1544
1545 __ ldr(R0, Address(SP, 0 * kWordSize)); // Receiver. 1545 // Receiver.
1546 __ ldr(R1, FieldAddress(R0, state_field.Offset())); // Field '_state'. 1546 __ ldr(R0, Address(SP, 0 * kWordSize));
1547 // Field '_state'.
1548 __ ldr(R1, FieldAddress(R0, state_field.Offset()));
1547 // Addresses of _state[0] and _state[1]. 1549 // Addresses of _state[0] and _state[1].
1548 1550
1549 const int64_t disp_0 = Instance::DataOffsetFor(kTypedDataUint32ArrayCid); 1551 const int64_t disp_0 = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
1550 const int64_t disp_1 = disp_0 + 1552 const int64_t disp_1 = disp_0 +
1551 Instance::ElementSizeFor(kTypedDataUint32ArrayCid); 1553 Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
1552 1554
1553 __ LoadImmediate(R0, a_int32_value); 1555 __ LoadImmediate(R0, a_int32_value);
1554 __ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag); 1556 __ LoadFromOffset(kWord, R2, R1, disp_0 - kHeapObjectTag);
1555 __ LoadFromOffset(kWord, R3, R1, disp_1 - kHeapObjectTag); 1557 __ LoadFromOffset(kWord, R3, R1, disp_1 - kHeapObjectTag);
1556 __ mov(R6, Operand(0)); // Zero extend unsigned _state[kSTATE_HI]. 1558 __ mov(R6, Operand(0)); // Zero extend unsigned _state[kSTATE_HI].
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 2061
2060 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2062 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2061 __ LoadIsolate(R0); 2063 __ LoadIsolate(R0);
2062 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2064 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2063 __ Ret(); 2065 __ Ret();
2064 } 2066 }
2065 2067
2066 } // namespace dart 2068 } // namespace dart
2067 2069
2068 #endif // defined TARGET_ARCH_ARM 2070 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698