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

Unified Diff: runtime/vm/raw_object.h

Issue 10579020: Support captured variables in debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 8858)
+++ runtime/vm/raw_object.h (working copy)
@@ -797,15 +797,24 @@
class RawLocalVarDescriptors : public RawObject {
- RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors);
+ public:
+ // Values for field VarInfo.kind. We don't use an enum type because
+ // we want to ensure the field only takes up one byte.
+ static const int8_t kStackVar = 1;
+ static const int8_t kContextVar = 2;
+ static const int8_t kContextLevel = 3;
+ static const int8_t kContextChain = 4;
regis 2012/06/19 18:14:41 It should not be a problem to use an enum. See enu
hausner 2012/06/19 18:49:41 Hmm. I started out with an enum and ran into some
struct VarInfo {
intptr_t index; // Slot index on stack or in context.
- intptr_t scope_id; // Scope to which the variable belongs.
+ int8_t kind; // Entry kind.
+ int16_t scope_id; // Scope to which the variable belongs.
intptr_t begin_pos; // Token position of scope start.
intptr_t end_pos; // Token position of scope end.
};
+ private:
+ RAW_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors);
intptr_t length_; // Number of descriptors.
RawArray* names_; // Array of [length_] variable names.

Powered by Google App Engine
This is Rietveld 408576698