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

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

Issue 12381034: Second codegen test passing on ARM (simulated). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language_arm.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/instructions.h" 8 #include "vm/instructions.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 offset += kHeapObjectTag; 54 offset += kHeapObjectTag;
55 ASSERT(Utils::IsAligned(offset, 4)); 55 ASSERT(Utils::IsAligned(offset, 4));
56 return (offset - Array::data_offset())/4; 56 return (offset - Array::data_offset())/4;
57 } 57 }
58 58
59 59
60 uword CallPattern::TargetAddress() const { 60 uword CallPattern::TargetAddress() const {
61 const Object& target_address = Object::Handle(object_pool_.At(pool_index_)); 61 const Object& target_address = Object::Handle(object_pool_.At(pool_index_));
62 ASSERT(target_address.IsSmi()); 62 ASSERT(target_address.IsSmi());
63 return Smi::Cast(target_address).Value() << kSmiTagShift; 63 // The address is stored in the object array as a RawSmi.
64 return reinterpret_cast<uword>(target_address.raw());
64 } 65 }
65 66
66 67
67 void CallPattern::SetTargetAddress(uword target_address) const { 68 void CallPattern::SetTargetAddress(uword target_address) const {
68 ASSERT(Utils::IsAligned(target_address, 4)); 69 ASSERT(Utils::IsAligned(target_address, 4));
69 // The address is stored in the object array as a RawSmi. 70 // The address is stored in the object array as a RawSmi.
70 const Smi& smi = Smi::Handle(Smi::New(target_address >> kSmiTagShift)); 71 const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(target_address));
71 object_pool_.SetAt(pool_index_, smi); 72 object_pool_.SetAt(pool_index_, smi);
72 } 73 }
73 74
74 75
75 bool JumpPattern::IsValid() const { 76 bool JumpPattern::IsValid() const {
76 UNIMPLEMENTED(); 77 UNIMPLEMENTED();
77 return false; 78 return false;
78 } 79 }
79 80
80 81
81 uword JumpPattern::TargetAddress() const { 82 uword JumpPattern::TargetAddress() const {
82 UNIMPLEMENTED(); 83 UNIMPLEMENTED();
83 return 0; 84 return 0;
84 } 85 }
85 86
86 87
87 void JumpPattern::SetTargetAddress(uword target) const { 88 void JumpPattern::SetTargetAddress(uword target) const {
88 UNIMPLEMENTED(); 89 UNIMPLEMENTED();
89 } 90 }
90 91
91 } // namespace dart 92 } // namespace dart
92 93
93 #endif // defined TARGET_ARCH_ARM 94 #endif // defined TARGET_ARCH_ARM
94 95
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698