| 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 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 SimulatorHelpers::IncrementUsageCounter(FrameFunction(FP)); | 1521 SimulatorHelpers::IncrementUsageCounter(FrameFunction(FP)); |
| 1522 InstanceCall2(thread, icdata, call_base, call_top, | 1522 InstanceCall2(thread, icdata, call_base, call_top, |
| 1523 &argdesc, &pp, &pc, &FP, &SP, | 1523 &argdesc, &pp, &pc, &FP, &SP, |
| 1524 true /* optimized */); | 1524 true /* optimized */); |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 DISPATCH(); | 1527 DISPATCH(); |
| 1528 } | 1528 } |
| 1529 | 1529 |
| 1530 { | 1530 { |
| 1531 BYTECODE(PushPolymorphicInstanceCall, A_D); |
| 1532 const uint8_t argc = rA; |
| 1533 const intptr_t cids_length = rD; |
| 1534 RawObject** args = SP - argc + 1; |
| 1535 const intptr_t receiver_cid = SimulatorHelpers::GetClassId(args[0]); |
| 1536 for (intptr_t i = 0; i < 2*cids_length; i+=2) { |
| 1537 const intptr_t icdata_cid = Bytecode::DecodeD(*(pc + i)); |
| 1538 if (receiver_cid == icdata_cid) { |
| 1539 RawFunction* target = |
| 1540 RAW_CAST(Function, LOAD_CONSTANT(Bytecode::DecodeD(*(pc + i + 1)))); |
| 1541 *++SP = target; |
| 1542 pc++; |
| 1543 break; |
| 1544 } |
| 1545 } |
| 1546 pc += 2 * cids_length; |
| 1547 DISPATCH(); |
| 1548 } |
| 1549 |
| 1550 { |
| 1531 BYTECODE(NativeBootstrapCall, 0); | 1551 BYTECODE(NativeBootstrapCall, 0); |
| 1532 RawFunction* function = FrameFunction(FP); | 1552 RawFunction* function = FrameFunction(FP); |
| 1533 RawObject** incoming_args = | 1553 RawObject** incoming_args = |
| 1534 (function->ptr()->num_optional_parameters_ == 0) | 1554 (function->ptr()->num_optional_parameters_ == 0) |
| 1535 ? FrameArguments(FP, function->ptr()->num_fixed_parameters_) | 1555 ? FrameArguments(FP, function->ptr()->num_fixed_parameters_) |
| 1536 : FP; | 1556 : FP; |
| 1537 | 1557 |
| 1538 SimulatorBootstrapNativeCall native_target = | 1558 SimulatorBootstrapNativeCall native_target = |
| 1539 reinterpret_cast<SimulatorBootstrapNativeCall>(SP[-1]); | 1559 reinterpret_cast<SimulatorBootstrapNativeCall>(SP[-1]); |
| 1540 intptr_t argc_tag = reinterpret_cast<intptr_t>(SP[-0]); | 1560 intptr_t argc_tag = reinterpret_cast<intptr_t>(SP[-0]); |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3028 pc_ = pc; | 3048 pc_ = pc; |
| 3029 special_[kExceptionSpecialIndex] = raw_exception; | 3049 special_[kExceptionSpecialIndex] = raw_exception; |
| 3030 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3050 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
| 3031 buf->Longjmp(); | 3051 buf->Longjmp(); |
| 3032 UNREACHABLE(); | 3052 UNREACHABLE(); |
| 3033 } | 3053 } |
| 3034 | 3054 |
| 3035 } // namespace dart | 3055 } // namespace dart |
| 3036 | 3056 |
| 3037 #endif // defined TARGET_ARCH_DBC | 3057 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |