| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
| 10 | 10 |
| (...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1771 } | 1771 } |
| 1772 | 1772 |
| 1773 { | 1773 { |
| 1774 BYTECODE(Jump, 0); | 1774 BYTECODE(Jump, 0); |
| 1775 const int32_t target = static_cast<int32_t>(op) >> 8; | 1775 const int32_t target = static_cast<int32_t>(op) >> 8; |
| 1776 pc += (target - 1); | 1776 pc += (target - 1); |
| 1777 DISPATCH(); | 1777 DISPATCH(); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 { | 1780 { |
| 1781 BYTECODE(LoadClassId, A_D); |
| 1782 const uint16_t object_reg = rD; |
| 1783 RawObject* obj = static_cast<RawObject*>(FP[object_reg]); |
| 1784 FP[rA] = SimulatorHelpers::GetClassIdAsSmi(obj); |
| 1785 DISPATCH(); |
| 1786 } |
| 1787 |
| 1788 { |
| 1789 BYTECODE(LoadClassIdTOS, 0); |
| 1790 RawObject* obj = static_cast<RawObject*>(SP[0]); |
| 1791 SP[0] = SimulatorHelpers::GetClassIdAsSmi(obj); |
| 1792 DISPATCH(); |
| 1793 } |
| 1794 |
| 1795 { |
| 1781 BYTECODE(StoreIndexedTOS, 0); | 1796 BYTECODE(StoreIndexedTOS, 0); |
| 1782 SP -= 3; | 1797 SP -= 3; |
| 1783 RawArray* array = static_cast<RawArray*>(SP[1]); | 1798 RawArray* array = static_cast<RawArray*>(SP[1]); |
| 1784 RawSmi* index = static_cast<RawSmi*>(SP[2]); | 1799 RawSmi* index = static_cast<RawSmi*>(SP[2]); |
| 1785 RawObject* value = SP[3]; | 1800 RawObject* value = SP[3]; |
| 1786 ASSERT(array->GetClassId() == kArrayCid); | 1801 ASSERT(array->GetClassId() == kArrayCid); |
| 1787 ASSERT(!index->IsHeapObject()); | 1802 ASSERT(!index->IsHeapObject()); |
| 1788 array->StorePointer(array->ptr()->data() + Smi::Value(index), value); | 1803 array->StorePointer(array->ptr()->data() + Smi::Value(index), value); |
| 1789 DISPATCH(); | 1804 DISPATCH(); |
| 1790 } | 1805 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 special_[kExceptionSpecialIndex] = raw_exception; | 1908 special_[kExceptionSpecialIndex] = raw_exception; |
| 1894 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 1909 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
| 1895 buf->Longjmp(); | 1910 buf->Longjmp(); |
| 1896 UNREACHABLE(); | 1911 UNREACHABLE(); |
| 1897 } | 1912 } |
| 1898 | 1913 |
| 1899 } // namespace dart | 1914 } // namespace dart |
| 1900 | 1915 |
| 1901 | 1916 |
| 1902 #endif // defined TARGET_ARCH_DBC | 1917 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |