| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 6562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6573 result.SetLength(num_descriptors); | 6573 result.SetLength(num_descriptors); |
| 6574 } | 6574 } |
| 6575 return result.raw(); | 6575 return result.raw(); |
| 6576 } | 6576 } |
| 6577 | 6577 |
| 6578 | 6578 |
| 6579 const char* PcDescriptors::KindAsStr(intptr_t index) const { | 6579 const char* PcDescriptors::KindAsStr(intptr_t index) const { |
| 6580 switch (DescriptorKind(index)) { | 6580 switch (DescriptorKind(index)) { |
| 6581 case PcDescriptors::kDeoptBefore: return "deopt-before "; | 6581 case PcDescriptors::kDeoptBefore: return "deopt-before "; |
| 6582 case PcDescriptors::kDeoptAfter: return "deopt-after "; | 6582 case PcDescriptors::kDeoptAfter: return "deopt-after "; |
| 6583 case PcDescriptors::kEntryPatch: return "entry-patch "; |
| 6583 case PcDescriptors::kPatchCode: return "patch "; | 6584 case PcDescriptors::kPatchCode: return "patch "; |
| 6584 case PcDescriptors::kLazyDeoptJump: return "lazy-deopt "; | 6585 case PcDescriptors::kLazyDeoptJump: return "lazy-deopt "; |
| 6585 case PcDescriptors::kIcCall: return "ic-call "; | 6586 case PcDescriptors::kIcCall: return "ic-call "; |
| 6586 case PcDescriptors::kFuncCall: return "fn-call "; | 6587 case PcDescriptors::kFuncCall: return "fn-call "; |
| 6587 case PcDescriptors::kReturn: return "return "; | 6588 case PcDescriptors::kReturn: return "return "; |
| 6588 case PcDescriptors::kOther: return "other "; | 6589 case PcDescriptors::kOther: return "other "; |
| 6589 } | 6590 } |
| 6590 UNREACHABLE(); | 6591 UNREACHABLE(); |
| 6591 return ""; | 6592 return ""; |
| 6592 } | 6593 } |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7266 return token_pos; | 7267 return token_pos; |
| 7267 } | 7268 } |
| 7268 | 7269 |
| 7269 | 7270 |
| 7270 uword Code::GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const { | 7271 uword Code::GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const { |
| 7271 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); | 7272 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
| 7272 for (intptr_t i = 0; i < descriptors.Length(); i++) { | 7273 for (intptr_t i = 0; i < descriptors.Length(); i++) { |
| 7273 if ((descriptors.DeoptId(i) == deopt_id) && | 7274 if ((descriptors.DeoptId(i) == deopt_id) && |
| 7274 (descriptors.DescriptorKind(i) == kind)) { | 7275 (descriptors.DescriptorKind(i) == kind)) { |
| 7275 uword pc = descriptors.PC(i); | 7276 uword pc = descriptors.PC(i); |
| 7276 ASSERT((EntryPoint() < pc) && (pc < (EntryPoint() + Size()))); | 7277 ASSERT((EntryPoint() <= pc) && (pc < (EntryPoint() + Size()))); |
| 7277 return pc; | 7278 return pc; |
| 7278 } | 7279 } |
| 7279 } | 7280 } |
| 7280 return 0; | 7281 return 0; |
| 7281 } | 7282 } |
| 7282 | 7283 |
| 7283 | 7284 |
| 7284 uword Code::GetDeoptBeforePcAtDeoptId(intptr_t deopt_id) const { | 7285 uword Code::GetDeoptBeforePcAtDeoptId(intptr_t deopt_id) const { |
| 7285 ASSERT(!is_optimized()); | 7286 ASSERT(!is_optimized()); |
| 7286 return GetPcForDeoptId(deopt_id, PcDescriptors::kDeoptBefore); | 7287 return GetPcForDeoptId(deopt_id, PcDescriptors::kDeoptBefore); |
| (...skipping 5141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12428 } | 12429 } |
| 12429 return result.raw(); | 12430 return result.raw(); |
| 12430 } | 12431 } |
| 12431 | 12432 |
| 12432 | 12433 |
| 12433 const char* WeakProperty::ToCString() const { | 12434 const char* WeakProperty::ToCString() const { |
| 12434 return "_WeakProperty"; | 12435 return "_WeakProperty"; |
| 12435 } | 12436 } |
| 12436 | 12437 |
| 12437 } // namespace dart | 12438 } // namespace dart |
| OLD | NEW |