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

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

Issue 605533003: Make subtype test stubs isolate-specific. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | « no previous file | runtime/vm/assembler_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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 ASSERT(RawObject::kClassIdTagPos == 16); 1723 ASSERT(RawObject::kClassIdTagPos == 16);
1724 ASSERT(RawObject::kClassIdTagSize == 16); 1724 ASSERT(RawObject::kClassIdTagSize == 16);
1725 const intptr_t class_id_offset = Object::tags_offset() + 1725 const intptr_t class_id_offset = Object::tags_offset() +
1726 RawObject::kClassIdTagPos / kBitsPerByte; 1726 RawObject::kClassIdTagPos / kBitsPerByte;
1727 ldrh(result, FieldAddress(object, class_id_offset), cond); 1727 ldrh(result, FieldAddress(object, class_id_offset), cond);
1728 } 1728 }
1729 1729
1730 1730
1731 void Assembler::LoadClassById(Register result, Register class_id) { 1731 void Assembler::LoadClassById(Register result, Register class_id) {
1732 ASSERT(result != class_id); 1732 ASSERT(result != class_id);
1733 ldr(result, FieldAddress(CTX, Context::isolate_offset())); 1733 LoadImmediate(result, Isolate::Current()->class_table()->TableAddress());
1734 const intptr_t table_offset_in_isolate = 1734 LoadFromOffset(kWord, result, result, 0);
1735 Isolate::class_table_offset() + ClassTable::table_offset();
1736 LoadFromOffset(kWord, result, result, table_offset_in_isolate);
1737 ldr(result, Address(result, class_id, LSL, 2)); 1735 ldr(result, Address(result, class_id, LSL, 2));
1738 } 1736 }
1739 1737
1740 1738
1741 void Assembler::LoadClass(Register result, Register object, Register scratch) { 1739 void Assembler::LoadClass(Register result, Register object, Register scratch) {
1742 ASSERT(scratch != result); 1740 ASSERT(scratch != result);
1743 LoadClassId(scratch, object); 1741 LoadClassId(scratch, object);
1744 1742 LoadClassById(result, scratch);
1745 ldr(result, FieldAddress(CTX, Context::isolate_offset()));
1746 const intptr_t table_offset_in_isolate =
1747 Isolate::class_table_offset() + ClassTable::table_offset();
1748 LoadFromOffset(kWord, result, result, table_offset_in_isolate);
1749 ldr(result, Address(result, scratch, LSL, 2));
1750 } 1743 }
1751 1744
1752 1745
1753 void Assembler::CompareClassId(Register object, 1746 void Assembler::CompareClassId(Register object,
1754 intptr_t class_id, 1747 intptr_t class_id,
1755 Register scratch) { 1748 Register scratch) {
1756 LoadClassId(scratch, object); 1749 LoadClassId(scratch, object);
1757 CompareImmediate(scratch, class_id); 1750 CompareImmediate(scratch, class_id);
1758 } 1751 }
1759 1752
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 3414
3422 3415
3423 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3416 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3424 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3417 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3425 return fpu_reg_names[reg]; 3418 return fpu_reg_names[reg];
3426 } 3419 }
3427 3420
3428 } // namespace dart 3421 } // namespace dart
3429 3422
3430 #endif // defined TARGET_ARCH_ARM 3423 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698