Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: runtime/vm/raw_object.h

Issue 11970024: Simplify exception handler table (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors); 852 RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors);
853 intptr_t length_; // Number of descriptors. 853 intptr_t length_; // Number of descriptors.
854 RawArray* names_; // Array of [length_] variable names. 854 RawArray* names_; // Array of [length_] variable names.
855 855
856 VarInfo data_[0]; // Variable info with [length_] entries. 856 VarInfo data_[0]; // Variable info with [length_] entries.
857 }; 857 };
858 858
859 859
860 class RawExceptionHandlers : public RawObject { 860 class RawExceptionHandlers : public RawObject {
861 public: 861 public:
862 struct HandlerInfo { 862 struct HandlerInfo {
siva 2013/01/17 00:37:39 We should add a comment here that the index in the
hausner 2013/01/17 01:05:55 Done.
863 int16_t try_index; // Try block index associated with handler. 863 intptr_t outer_try_index; // Try block index of enclosing try block.
864 int16_t outer_try_index; // Try block index of enclosing try block. 864 intptr_t handler_pc; // PC value of handler.
865 intptr_t handler_pc; // PC value of handler.
866 }; 865 };
867 private: 866 private:
868 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers); 867 RAW_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers);
869 868
870 // Number of exception handler entries. 869 // Number of exception handler entries.
871 intptr_t length_; 870 intptr_t length_;
872 871
873 // Array with [length_] entries. Each entry is an array of all handled 872 // Array with [length_] entries. Each entry is an array of all handled
874 // exception types. 873 // exception types.
875 RawArray* handled_types_data_; 874 RawArray* handled_types_data_;
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 && 1701 kExternalUint64ArrayCid == kExternalInt8ArrayCid + 8 &&
1703 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 && 1702 kExternalFloat32ArrayCid == kExternalInt8ArrayCid + 9 &&
1704 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 && 1703 kExternalFloat64ArrayCid == kExternalInt8ArrayCid + 10 &&
1705 kStacktraceCid == kExternalInt8ArrayCid + 11); 1704 kStacktraceCid == kExternalInt8ArrayCid + 11);
1706 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid); 1705 return (index >= kExternalInt8ArrayCid && index <= kExternalFloat64ArrayCid);
1707 } 1706 }
1708 1707
1709 } // namespace dart 1708 } // namespace dart
1710 1709
1711 #endif // VM_RAW_OBJECT_H_ 1710 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698