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

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

Issue 11265047: Implement const expressions for local variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 public: 2713 public:
2714 intptr_t num_variables() const { return raw_ptr()->num_variables_; } 2714 intptr_t num_variables() const { return raw_ptr()->num_variables_; }
2715 2715
2716 intptr_t TokenIndexAt(intptr_t scope_index) const; 2716 intptr_t TokenIndexAt(intptr_t scope_index) const;
2717 void SetTokenIndexAt(intptr_t scope_index, intptr_t token_pos) const; 2717 void SetTokenIndexAt(intptr_t scope_index, intptr_t token_pos) const;
2718 2718
2719 RawString* NameAt(intptr_t scope_index) const; 2719 RawString* NameAt(intptr_t scope_index) const;
2720 void SetNameAt(intptr_t scope_index, const String& name) const; 2720 void SetNameAt(intptr_t scope_index, const String& name) const;
2721 2721
2722 bool IsFinalAt(intptr_t scope_index) const; 2722 bool IsFinalAt(intptr_t scope_index) const;
2723 void SetIsFinalAt(intptr_t scope_index, bool is_const) const; 2723 void SetIsFinalAt(intptr_t scope_index, bool is_final) const;
2724
2725 bool IsConstAt(intptr_t scope_index) const;
2726 void SetIsConstAt(intptr_t scope_index, bool is_const) const;
2724 2727
2725 RawAbstractType* TypeAt(intptr_t scope_index) const; 2728 RawAbstractType* TypeAt(intptr_t scope_index) const;
2726 void SetTypeAt(intptr_t scope_index, const AbstractType& type) const; 2729 void SetTypeAt(intptr_t scope_index, const AbstractType& type) const;
2727 2730
2731 RawInstance* ConstValueAt(intptr_t scope_index) const;
2732 void SetConstValueAt(intptr_t scope_index, const Instance& value) const;
2733
2728 intptr_t ContextIndexAt(intptr_t scope_index) const; 2734 intptr_t ContextIndexAt(intptr_t scope_index) const;
2729 void SetContextIndexAt(intptr_t scope_index, intptr_t context_index) const; 2735 void SetContextIndexAt(intptr_t scope_index, intptr_t context_index) const;
2730 2736
2731 intptr_t ContextLevelAt(intptr_t scope_index) const; 2737 intptr_t ContextLevelAt(intptr_t scope_index) const;
2732 void SetContextLevelAt(intptr_t scope_index, intptr_t context_level) const; 2738 void SetContextLevelAt(intptr_t scope_index, intptr_t context_level) const;
2733 2739
2734 static const intptr_t kBytesPerElement = 2740 static const intptr_t kBytesPerElement =
2735 sizeof(RawContextScope::VariableDesc); 2741 sizeof(RawContextScope::VariableDesc);
2736 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; 2742 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
2737 2743
(...skipping 3123 matching lines...) Expand 10 before | Expand all | Expand 10 after
5861 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5867 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5862 return false; 5868 return false;
5863 } 5869 }
5864 } 5870 }
5865 return true; 5871 return true;
5866 } 5872 }
5867 5873
5868 } // namespace dart 5874 } // namespace dart
5869 5875
5870 #endif // VM_OBJECT_H_ 5876 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698