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

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

Issue 673253002: Add missing StorePointer/StoreSmi in ContextScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')
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 4161 matching lines...) Expand 10 before | Expand all | Expand 10 after
4172 sizeof(RawContextScope) + (len * kBytesPerElement)); 4172 sizeof(RawContextScope) + (len * kBytesPerElement));
4173 } 4173 }
4174 4174
4175 static RawContextScope* New(intptr_t num_variables); 4175 static RawContextScope* New(intptr_t num_variables);
4176 4176
4177 private: 4177 private:
4178 void set_num_variables(intptr_t num_variables) const { 4178 void set_num_variables(intptr_t num_variables) const {
4179 StoreNonPointer(&raw_ptr()->num_variables_, num_variables); 4179 StoreNonPointer(&raw_ptr()->num_variables_, num_variables);
4180 } 4180 }
4181 4181
4182 RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const { 4182 const RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const {
4183 ASSERT((index >= 0) && (index < num_variables())); 4183 ASSERT((index >= 0) && (index < num_variables()));
4184 uword raw_addr = reinterpret_cast<uword>(raw_ptr()); 4184 return raw_ptr()->VariableDescAddr(index);
4185 raw_addr += sizeof(RawContextScope) +
4186 (index * sizeof(RawContextScope::VariableDesc));
4187 return reinterpret_cast<RawContextScope::VariableDesc*>(raw_addr);
4188 } 4185 }
4189 4186
4190 FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object); 4187 FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
4191 friend class Class; 4188 friend class Class;
4192 }; 4189 };
4193 4190
4194 4191
4195 class MegamorphicCache : public Object { 4192 class MegamorphicCache : public Object {
4196 public: 4193 public:
4197 static const int kInitialCapacity = 16; 4194 static const int kInitialCapacity = 16;
(...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after
7551 7548
7552 7549
7553 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7550 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7554 intptr_t index) { 7551 intptr_t index) {
7555 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7552 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7556 } 7553 }
7557 7554
7558 } // namespace dart 7555 } // namespace dart
7559 7556
7560 #endif // VM_OBJECT_H_ 7557 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698