| 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 #ifndef VM_CONSTANTS_DBC_H_ | 5 #ifndef VM_CONSTANTS_DBC_H_ |
| 6 #define VM_CONSTANTS_DBC_H_ | 6 #define VM_CONSTANTS_DBC_H_ |
| 7 | 7 |
| 8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 #if defined(DEBUG) | 461 #if defined(DEBUG) |
| 462 const Opcode op = DecodeOpcode(call); | 462 const Opcode op = DecodeOpcode(call); |
| 463 ASSERT((op == Bytecode::kStaticCall) || | 463 ASSERT((op == Bytecode::kStaticCall) || |
| 464 (op == Bytecode::kInstanceCall) || | 464 (op == Bytecode::kInstanceCall) || |
| 465 (op == Bytecode::kInstanceCall2) || | 465 (op == Bytecode::kInstanceCall2) || |
| 466 (op == Bytecode::kInstanceCall3) || | 466 (op == Bytecode::kInstanceCall3) || |
| 467 (op == Bytecode::kDebugBreak)); | 467 (op == Bytecode::kDebugBreak)); |
| 468 #endif | 468 #endif |
| 469 return (call >> 8) & 0xFF; | 469 return (call >> 8) & 0xFF; |
| 470 } | 470 } |
| 471 |
| 472 static Instr At(uword pc) { return *reinterpret_cast<Instr*>(pc); } |
| 473 |
| 474 private: |
| 475 DISALLOW_ALLOCATION(); |
| 476 DISALLOW_IMPLICIT_CONSTRUCTORS(Bytecode); |
| 471 }; | 477 }; |
| 472 | 478 |
| 473 // Various dummy declarations to make shared code compile. | 479 // Various dummy declarations to make shared code compile. |
| 474 // TODO(vegorov) we need to prune away as much dead code as possible instead | 480 // TODO(vegorov) we need to prune away as much dead code as possible instead |
| 475 // of just making it compile. | 481 // of just making it compile. |
| 476 typedef int16_t Register; | 482 typedef int16_t Register; |
| 477 | 483 |
| 478 const int16_t FPREG = 0; | 484 const int16_t FPREG = 0; |
| 479 const int16_t SPREG = 1; | 485 const int16_t SPREG = 1; |
| 480 const intptr_t kNumberOfCpuRegisters = 20; | 486 const intptr_t kNumberOfCpuRegisters = 20; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 493 kNumberOfDummyFpuRegisters, | 499 kNumberOfDummyFpuRegisters, |
| 494 }; | 500 }; |
| 495 const FpuRegister FpuTMP = kFakeFpuRegister; | 501 const FpuRegister FpuTMP = kFakeFpuRegister; |
| 496 const intptr_t kNumberOfFpuRegisters = 1; | 502 const intptr_t kNumberOfFpuRegisters = 1; |
| 497 | 503 |
| 498 enum Condition { EQ, NE }; | 504 enum Condition { EQ, NE }; |
| 499 | 505 |
| 500 } // namespace dart | 506 } // namespace dart |
| 501 | 507 |
| 502 #endif // VM_CONSTANTS_DBC_H_ | 508 #endif // VM_CONSTANTS_DBC_H_ |
| OLD | NEW |