| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
| 6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/atomic.h" | 9 #include "vm/atomic.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 // Variable info with [num_entries_] entries. | 1396 // Variable info with [num_entries_] entries. |
| 1397 VarInfo* data() { | 1397 VarInfo* data() { |
| 1398 return reinterpret_cast<VarInfo*>(nameAddrAt(ptr()->num_entries_)); | 1398 return reinterpret_cast<VarInfo*>(nameAddrAt(ptr()->num_entries_)); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 friend class Object; | 1401 friend class Object; |
| 1402 }; | 1402 }; |
| 1403 | 1403 |
| 1404 | 1404 |
| 1405 class RawExceptionHandlers : public RawObject { | 1405 class RawExceptionHandlers : public RawObject { |
| 1406 public: | |
| 1407 // The index into the ExceptionHandlers table corresponds to | |
| 1408 // the try_index of the handler. | |
| 1409 struct HandlerInfo { | |
| 1410 uint32_t handler_pc_offset; // PC offset value of handler. | |
| 1411 int16_t outer_try_index; // Try block index of enclosing try block. | |
| 1412 int8_t needs_stacktrace; // True if a stacktrace is needed. | |
| 1413 int8_t has_catch_all; // Catches all exceptions. | |
| 1414 }; | |
| 1415 | |
| 1416 private: | 1406 private: |
| 1417 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); | 1407 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); |
| 1418 | 1408 |
| 1419 // Number of exception handler entries. | 1409 // Number of exception handler entries. |
| 1420 int32_t num_entries_; | 1410 int32_t num_entries_; |
| 1421 | 1411 |
| 1422 // Array with [num_entries_] entries. Each entry is an array of all handled | 1412 // Array with [num_entries_] entries. Each entry is an array of all handled |
| 1423 // exception types. | 1413 // exception types. |
| 1424 RawArray* handled_types_data_; | 1414 RawArray* handled_types_data_; |
| 1425 | 1415 |
| 1426 // Exception handler info of length [num_entries_]. | 1416 // Exception handler info of length [num_entries_]. |
| 1427 const HandlerInfo* data() const { OPEN_ARRAY_START(HandlerInfo, intptr_t); } | 1417 const ExceptionHandlerInfo* data() const { |
| 1428 HandlerInfo* data() { OPEN_ARRAY_START(HandlerInfo, intptr_t); } | 1418 OPEN_ARRAY_START(ExceptionHandlerInfo, intptr_t); |
| 1419 } |
| 1420 ExceptionHandlerInfo* data() { |
| 1421 OPEN_ARRAY_START(ExceptionHandlerInfo, intptr_t); |
| 1422 } |
| 1429 | 1423 |
| 1430 friend class Object; | 1424 friend class Object; |
| 1431 }; | 1425 }; |
| 1432 | 1426 |
| 1433 | 1427 |
| 1434 class RawContext : public RawObject { | 1428 class RawContext : public RawObject { |
| 1435 RAW_HEAP_OBJECT_IMPLEMENTATION(Context); | 1429 RAW_HEAP_OBJECT_IMPLEMENTATION(Context); |
| 1436 | 1430 |
| 1437 int32_t num_variables_; | 1431 int32_t num_variables_; |
| 1438 | 1432 |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2432 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2439 kTypedDataInt8ArrayViewCid + 15); | 2433 kTypedDataInt8ArrayViewCid + 15); |
| 2440 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2434 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2441 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2435 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2442 return (kNullCid - kTypedDataInt8ArrayCid); | 2436 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2443 } | 2437 } |
| 2444 | 2438 |
| 2445 } // namespace dart | 2439 } // namespace dart |
| 2446 | 2440 |
| 2447 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2441 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
| OLD | NEW |