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

Side by Side Diff: runtime/vm/intrinsifier_x64.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_mips.cc ('k') | runtime/vm/object.h » ('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 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 const Class& random_class = Class::Handle( 1482 const Class& random_class = Class::Handle(
1483 math_lib.LookupClassAllowPrivate(Symbols::_Random())); 1483 math_lib.LookupClassAllowPrivate(Symbols::_Random()));
1484 ASSERT(!random_class.IsNull()); 1484 ASSERT(!random_class.IsNull());
1485 const Field& state_field = Field::ZoneHandle( 1485 const Field& state_field = Field::ZoneHandle(
1486 random_class.LookupInstanceField(Symbols::_state())); 1486 random_class.LookupInstanceField(Symbols::_state()));
1487 ASSERT(!state_field.IsNull()); 1487 ASSERT(!state_field.IsNull());
1488 const Field& random_A_field = Field::ZoneHandle( 1488 const Field& random_A_field = Field::ZoneHandle(
1489 random_class.LookupStaticField(Symbols::_A())); 1489 random_class.LookupStaticField(Symbols::_A()));
1490 ASSERT(!random_A_field.IsNull()); 1490 ASSERT(!random_A_field.IsNull());
1491 ASSERT(random_A_field.is_const()); 1491 ASSERT(random_A_field.is_const());
1492 const Instance& a_value = Instance::Handle(random_A_field.value()); 1492 const Instance& a_value = Instance::Handle(random_A_field.StaticValue());
1493 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value(); 1493 const int64_t a_int_value = Integer::Cast(a_value).AsInt64Value();
1494 __ movq(RAX, Address(RSP, + 1 * kWordSize)); // Receiver. 1494 // Receiver.
1495 __ movq(RBX, FieldAddress(RAX, state_field.Offset())); // Field '_state'. 1495 __ movq(RAX, Address(RSP, + 1 * kWordSize));
1496 // Field '_state'.
1497 __ movq(RBX, FieldAddress(RAX, state_field.Offset()));
1496 // Addresses of _state[0] and _state[1]. 1498 // Addresses of _state[0] and _state[1].
1497 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid); 1499 const intptr_t scale = Instance::ElementSizeFor(kTypedDataUint32ArrayCid);
1498 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid); 1500 const intptr_t offset = Instance::DataOffsetFor(kTypedDataUint32ArrayCid);
1499 Address addr_0 = FieldAddress(RBX, 0 * scale + offset); 1501 Address addr_0 = FieldAddress(RBX, 0 * scale + offset);
1500 Address addr_1 = FieldAddress(RBX, 1 * scale + offset); 1502 Address addr_1 = FieldAddress(RBX, 1 * scale + offset);
1501 __ movq(RAX, Immediate(a_int_value)); 1503 __ movq(RAX, Immediate(a_int_value));
1502 __ movl(RCX, addr_0); 1504 __ movl(RCX, addr_0);
1503 __ imulq(RCX, RAX); 1505 __ imulq(RCX, RAX);
1504 __ movl(RDX, addr_1); 1506 __ movl(RDX, addr_1);
1505 __ addq(RDX, RCX); 1507 __ addq(RDX, RCX);
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 __ LoadIsolate(RAX); 2012 __ LoadIsolate(RAX);
2011 __ movq(RAX, Address(RAX, Isolate::current_tag_offset())); 2013 __ movq(RAX, Address(RAX, Isolate::current_tag_offset()));
2012 __ ret(); 2014 __ ret();
2013 } 2015 }
2014 2016
2015 #undef __ 2017 #undef __
2016 2018
2017 } // namespace dart 2019 } // namespace dart
2018 2020
2019 #endif // defined TARGET_ARCH_X64 2021 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698