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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 DISPATCH(); | 1367 DISPATCH(); |
1368 } | 1368 } |
1369 | 1369 |
1370 { | 1370 { |
1371 BYTECODE(BooleanNegate, A_D); | 1371 BYTECODE(BooleanNegate, A_D); |
1372 FP[rA] = (FP[rD] == true_value) ? false_value : true_value; | 1372 FP[rA] = (FP[rD] == true_value) ? false_value : true_value; |
1373 DISPATCH(); | 1373 DISPATCH(); |
1374 } | 1374 } |
1375 | 1375 |
1376 { | 1376 { |
1377 BYTECODE(StaticCall, A_D); | 1377 BYTECODE(IndirectStaticCall, A_D); |
1378 | 1378 |
1379 // Check if single stepping. | 1379 // Check if single stepping. |
1380 if (thread->isolate()->single_step()) { | 1380 if (thread->isolate()->single_step()) { |
1381 Exit(thread, FP, SP + 1, pc); | 1381 Exit(thread, FP, SP + 1, pc); |
1382 NativeArguments args(thread, 0, NULL, NULL); | 1382 NativeArguments args(thread, 0, NULL, NULL); |
1383 INVOKE_RUNTIME(DRT_SingleStepHandler, args); | 1383 INVOKE_RUNTIME(DRT_SingleStepHandler, args); |
1384 } | 1384 } |
1385 | 1385 |
1386 // Invoke target function. | 1386 // Invoke target function. |
1387 { | 1387 { |
1388 const uint16_t argc = rA; | 1388 const uint16_t argc = rA; |
| 1389 // Lookup the funciton in the ICData. |
| 1390 RawObject* ic_data_obj = SP[0]; |
| 1391 RawICData* ic_data = RAW_CAST(ICData, ic_data_obj); |
| 1392 RawArray* cache = ic_data->ptr()->ic_data_->ptr(); |
| 1393 SP[0] = cache->data()[ICData::TargetIndexFor( |
| 1394 ic_data->ptr()->state_bits_ & 0x3)]; |
1389 RawObject** call_base = SP - argc; | 1395 RawObject** call_base = SP - argc; |
1390 RawObject** call_top = SP; // *SP contains function | 1396 RawObject** call_top = SP; // *SP contains function |
1391 argdesc = static_cast<RawArray*>(LOAD_CONSTANT(rD)); | 1397 argdesc = static_cast<RawArray*>(LOAD_CONSTANT(rD)); |
1392 Invoke(thread, call_base, call_top, &pp, &pc, &FP, &SP); | 1398 Invoke(thread, call_base, call_top, &pp, &pc, &FP, &SP); |
1393 } | 1399 } |
1394 | 1400 |
1395 DISPATCH(); | 1401 DISPATCH(); |
1396 } | 1402 } |
1397 | 1403 |
1398 { | 1404 { |
| 1405 BYTECODE(StaticCall, A_D); |
| 1406 const uint16_t argc = rA; |
| 1407 RawObject** call_base = SP - argc; |
| 1408 RawObject** call_top = SP; // *SP contains function |
| 1409 argdesc = static_cast<RawArray*>(LOAD_CONSTANT(rD)); |
| 1410 Invoke(thread, call_base, call_top, &pp, &pc, &FP, &SP); |
| 1411 DISPATCH(); |
| 1412 } |
| 1413 |
| 1414 { |
1399 BYTECODE(InstanceCall1, A_D); | 1415 BYTECODE(InstanceCall1, A_D); |
1400 | 1416 |
1401 // Check if single stepping. | 1417 // Check if single stepping. |
1402 if (thread->isolate()->single_step()) { | 1418 if (thread->isolate()->single_step()) { |
1403 Exit(thread, FP, SP + 1, pc); | 1419 Exit(thread, FP, SP + 1, pc); |
1404 NativeArguments args(thread, 0, NULL, NULL); | 1420 NativeArguments args(thread, 0, NULL, NULL); |
1405 INVOKE_RUNTIME(DRT_SingleStepHandler, args); | 1421 INVOKE_RUNTIME(DRT_SingleStepHandler, args); |
1406 } | 1422 } |
1407 | 1423 |
1408 { | 1424 { |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 pc_ = pc; | 2810 pc_ = pc; |
2795 special_[kExceptionSpecialIndex] = raw_exception; | 2811 special_[kExceptionSpecialIndex] = raw_exception; |
2796 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 2812 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
2797 buf->Longjmp(); | 2813 buf->Longjmp(); |
2798 UNREACHABLE(); | 2814 UNREACHABLE(); |
2799 } | 2815 } |
2800 | 2816 |
2801 } // namespace dart | 2817 } // namespace dart |
2802 | 2818 |
2803 #endif // defined TARGET_ARCH_DBC | 2819 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |