Chromium Code Reviews| 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 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2369 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]); | 2369 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]); |
| 2370 RawObject* value = reinterpret_cast<RawObject*>(FP[value_reg]); | 2370 RawObject* value = reinterpret_cast<RawObject*>(FP[value_reg]); |
| 2371 | 2371 |
| 2372 instance->StorePointer( | 2372 instance->StorePointer( |
| 2373 reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, | 2373 reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, |
| 2374 value); | 2374 value); |
| 2375 DISPATCH(); | 2375 DISPATCH(); |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 { | 2378 { |
| 2379 BYTECODE(StoreFieldExt, A_D); | |
| 2380 // The offset is stored in the following nop-instruction which is skipped. | |
| 2381 const uint16_t offset_in_words = Bytecode::DecodeD(*pc++); | |
| 2382 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]); | |
| 2383 RawObject* value = reinterpret_cast<RawObject*>(FP[rD]); | |
|
zra
2016/10/07 20:43:16
FP is already a RawObject**
Florian Schneider
2016/10/07 20:57:18
Done here and for StoreField.
| |
| 2384 | |
| 2385 instance->StorePointer( | |
| 2386 reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, | |
| 2387 value); | |
| 2388 DISPATCH(); | |
| 2389 } | |
| 2390 | |
| 2391 { | |
| 2379 BYTECODE(StoreFieldTOS, A_D); | 2392 BYTECODE(StoreFieldTOS, A_D); |
| 2380 const uint16_t offset_in_words = rD; | 2393 const uint16_t offset_in_words = rD; |
| 2381 RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]); | 2394 RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]); |
| 2382 RawObject* value = reinterpret_cast<RawObject*>(SP[0]); | 2395 RawObject* value = reinterpret_cast<RawObject*>(SP[0]); |
| 2383 SP -= 2; // Drop instance and value. | 2396 SP -= 2; // Drop instance and value. |
| 2384 instance->StorePointer( | 2397 instance->StorePointer( |
| 2385 reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, | 2398 reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, |
| 2386 value); | 2399 value); |
| 2387 | 2400 |
| 2388 DISPATCH(); | 2401 DISPATCH(); |
| 2389 } | 2402 } |
| 2390 | 2403 |
| 2391 { | 2404 { |
| 2392 BYTECODE(LoadField, A_B_C); | 2405 BYTECODE(LoadField, A_B_C); |
| 2393 const uint16_t instance_reg = rB; | 2406 const uint16_t instance_reg = rB; |
| 2394 const uint16_t offset_in_words = rC; | 2407 const uint16_t offset_in_words = rC; |
| 2395 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); | 2408 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); |
| 2396 FP[rA] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words]; | 2409 FP[rA] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words]; |
| 2397 DISPATCH(); | 2410 DISPATCH(); |
| 2398 } | 2411 } |
| 2399 | 2412 |
| 2400 { | 2413 { |
| 2414 BYTECODE(LoadFieldExt, A_D); | |
| 2415 // The offset is stored in the following nop-instruction which is skipped. | |
| 2416 const uint16_t offset_in_words = Bytecode::DecodeD(*pc++); | |
| 2417 const uint16_t instance_reg = rD; | |
| 2418 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); | |
| 2419 FP[rA] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words]; | |
| 2420 DISPATCH(); | |
| 2421 } | |
| 2422 | |
| 2423 { | |
| 2401 BYTECODE(LoadUntagged, A_B_C); | 2424 BYTECODE(LoadUntagged, A_B_C); |
| 2402 const uint16_t instance_reg = rB; | 2425 const uint16_t instance_reg = rB; |
| 2403 const uint16_t offset_in_words = rC; | 2426 const uint16_t offset_in_words = rC; |
| 2404 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); | 2427 RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]); |
| 2405 FP[rA] = reinterpret_cast<RawObject**>(instance)[offset_in_words]; | 2428 FP[rA] = reinterpret_cast<RawObject**>(instance)[offset_in_words]; |
| 2406 DISPATCH(); | 2429 DISPATCH(); |
| 2407 } | 2430 } |
| 2408 | 2431 |
| 2409 { | 2432 { |
| 2410 BYTECODE(LoadFieldTOS, A_D); | 2433 BYTECODE(LoadFieldTOS, A_D); |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3462 pc_ = pc; | 3485 pc_ = pc; |
| 3463 special_[kExceptionSpecialIndex] = raw_exception; | 3486 special_[kExceptionSpecialIndex] = raw_exception; |
| 3464 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3487 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
| 3465 buf->Longjmp(); | 3488 buf->Longjmp(); |
| 3466 UNREACHABLE(); | 3489 UNREACHABLE(); |
| 3467 } | 3490 } |
| 3468 | 3491 |
| 3469 } // namespace dart | 3492 } // namespace dart |
| 3470 | 3493 |
| 3471 #endif // defined TARGET_ARCH_DBC | 3494 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |