| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 10190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10201 intptr_t PcDescriptors::Length() const { | 10201 intptr_t PcDescriptors::Length() const { |
| 10202 return raw_ptr()->length_; | 10202 return raw_ptr()->length_; |
| 10203 } | 10203 } |
| 10204 | 10204 |
| 10205 | 10205 |
| 10206 void PcDescriptors::SetLength(intptr_t value) const { | 10206 void PcDescriptors::SetLength(intptr_t value) const { |
| 10207 raw_ptr()->length_ = value; | 10207 raw_ptr()->length_ = value; |
| 10208 } | 10208 } |
| 10209 | 10209 |
| 10210 | 10210 |
| 10211 uword PcDescriptors::PC(intptr_t index) const { | |
| 10212 return static_cast<uword>(*(EntryAddr(index, kPcEntry))); | |
| 10213 } | |
| 10214 | |
| 10215 | |
| 10216 void PcDescriptors::SetPC(intptr_t index, uword value) const { | |
| 10217 *(EntryAddr(index, kPcEntry)) = static_cast<intptr_t>(value); | |
| 10218 } | |
| 10219 | |
| 10220 | |
| 10221 PcDescriptors::Kind PcDescriptors::DescriptorKind(intptr_t index) const { | |
| 10222 return static_cast<PcDescriptors::Kind>(*(EntryAddr(index, kKindEntry))); | |
| 10223 } | |
| 10224 | |
| 10225 | |
| 10226 void PcDescriptors::SetKind(intptr_t index, PcDescriptors::Kind value) const { | |
| 10227 *(EntryAddr(index, kKindEntry)) = value; | |
| 10228 } | |
| 10229 | |
| 10230 | |
| 10231 intptr_t PcDescriptors::DeoptId(intptr_t index) const { | |
| 10232 return *(EntryAddr(index, kDeoptIdEntry)); | |
| 10233 } | |
| 10234 | |
| 10235 | |
| 10236 void PcDescriptors::SetDeoptId(intptr_t index, intptr_t value) const { | |
| 10237 *(EntryAddr(index, kDeoptIdEntry)) = value; | |
| 10238 } | |
| 10239 | |
| 10240 | |
| 10241 intptr_t PcDescriptors::TokenPos(intptr_t index) const { | |
| 10242 return *(EntryAddr(index, kTokenPosEntry)); | |
| 10243 } | |
| 10244 | |
| 10245 | |
| 10246 void PcDescriptors::SetTokenPos(intptr_t index, intptr_t value) const { | |
| 10247 *(EntryAddr(index, kTokenPosEntry)) = value; | |
| 10248 } | |
| 10249 | |
| 10250 | |
| 10251 intptr_t PcDescriptors::TryIndex(intptr_t index) const { | |
| 10252 return *(EntryAddr(index, kTryIndexEntry)); | |
| 10253 } | |
| 10254 | |
| 10255 | |
| 10256 void PcDescriptors::SetTryIndex(intptr_t index, intptr_t value) const { | |
| 10257 *(EntryAddr(index, kTryIndexEntry)) = value; | |
| 10258 } | |
| 10259 | |
| 10260 | |
| 10261 RawPcDescriptors* PcDescriptors::New(intptr_t num_descriptors) { | 10211 RawPcDescriptors* PcDescriptors::New(intptr_t num_descriptors) { |
| 10262 ASSERT(Object::pc_descriptors_class() != Class::null()); | 10212 ASSERT(Object::pc_descriptors_class() != Class::null()); |
| 10263 if (num_descriptors < 0 || num_descriptors > kMaxElements) { | 10213 if (num_descriptors < 0 || num_descriptors > kMaxElements) { |
| 10264 // This should be caught before we reach here. | 10214 // This should be caught before we reach here. |
| 10265 FATAL1("Fatal error in PcDescriptors::New: " | 10215 FATAL1("Fatal error in PcDescriptors::New: " |
| 10266 "invalid num_descriptors %" Pd "\n", num_descriptors); | 10216 "invalid num_descriptors %" Pd "\n", num_descriptors); |
| 10267 } | 10217 } |
| 10268 PcDescriptors& result = PcDescriptors::Handle(); | 10218 PcDescriptors& result = PcDescriptors::Handle(); |
| 10269 { | 10219 { |
| 10270 uword size = PcDescriptors::InstanceSize(num_descriptors); | 10220 uword size = PcDescriptors::InstanceSize(num_descriptors); |
| (...skipping 8808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19079 return tag_label.ToCString(); | 19029 return tag_label.ToCString(); |
| 19080 } | 19030 } |
| 19081 | 19031 |
| 19082 | 19032 |
| 19083 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 19033 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 19084 Instance::PrintJSONImpl(stream, ref); | 19034 Instance::PrintJSONImpl(stream, ref); |
| 19085 } | 19035 } |
| 19086 | 19036 |
| 19087 | 19037 |
| 19088 } // namespace dart | 19038 } // namespace dart |
| OLD | NEW |