Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 14713) |
+++ runtime/vm/object.cc (working copy) |
@@ -7353,7 +7353,18 @@ |
} |
+bool ContextScope::IsConstAt(intptr_t scope_index) const { |
+ return Bool::Handle(VariableDescAddr(scope_index)->is_const).value(); |
+} |
+ |
+ |
+void ContextScope::SetIsConstAt(intptr_t scope_index, bool is_const) const { |
+ VariableDescAddr(scope_index)->is_const = Bool::Get(is_const); |
+} |
+ |
+ |
RawAbstractType* ContextScope::TypeAt(intptr_t scope_index) const { |
+ ASSERT(!IsConstAt(scope_index)); |
return VariableDescAddr(scope_index)->type; |
} |
@@ -7364,6 +7375,19 @@ |
} |
+RawInstance* ContextScope::ConstValueAt(intptr_t scope_index) const { |
+ ASSERT(IsConstAt(scope_index)); |
+ return VariableDescAddr(scope_index)->value; |
+} |
+ |
+ |
+void ContextScope::SetConstValueAt( |
+ intptr_t scope_index, const Instance& value) const { |
+ ASSERT(IsConstAt(scope_index)); |
+ StorePointer(&(VariableDescAddr(scope_index)->value), value.raw()); |
+} |
+ |
+ |
intptr_t ContextScope::ContextIndexAt(intptr_t scope_index) const { |
return Smi::Value(VariableDescAddr(scope_index)->context_index); |
} |