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

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

Issue 9705004: Do not chain the current context on entry in non-closure functions, but (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « runtime/vm/code_generator_x64.cc ('k') | no next file » | 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 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 2149
2150 HEAP_OBJECT_IMPLEMENTATION(Code, Object); 2150 HEAP_OBJECT_IMPLEMENTATION(Code, Object);
2151 friend class Class; 2151 friend class Class;
2152 }; 2152 };
2153 2153
2154 2154
2155 class Context : public Object { 2155 class Context : public Object {
2156 public: 2156 public:
2157 RawContext* parent() const { return raw_ptr()->parent_; } 2157 RawContext* parent() const { return raw_ptr()->parent_; }
2158 void set_parent(const Context& parent) const { 2158 void set_parent(const Context& parent) const {
2159 ASSERT(parent.isolate() == Isolate::Current()); 2159 ASSERT(parent.IsNull() || parent.isolate() == Isolate::Current());
2160 StorePointer(&raw_ptr()->parent_, parent.raw()); 2160 StorePointer(&raw_ptr()->parent_, parent.raw());
2161 } 2161 }
2162 static intptr_t parent_offset() { return OFFSET_OF(RawContext, parent_); } 2162 static intptr_t parent_offset() { return OFFSET_OF(RawContext, parent_); }
2163 2163
2164 Isolate* isolate() const { return raw_ptr()->isolate_; } 2164 Isolate* isolate() const { return raw_ptr()->isolate_; }
2165 static intptr_t isolate_offset() { return OFFSET_OF(RawContext, isolate_); } 2165 static intptr_t isolate_offset() { return OFFSET_OF(RawContext, isolate_); }
2166 2166
2167 intptr_t num_variables() const { return raw_ptr()->num_variables_; } 2167 intptr_t num_variables() const { return raw_ptr()->num_variables_; }
2168 static intptr_t num_variables_offset() { 2168 static intptr_t num_variables_offset() {
2169 return OFFSET_OF(RawContext, num_variables_); 2169 return OFFSET_OF(RawContext, num_variables_);
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
3830 } 3830 }
3831 3831
3832 3832
3833 void Context::SetAt(intptr_t index, const Instance& value) const { 3833 void Context::SetAt(intptr_t index, const Instance& value) const {
3834 StorePointer(InstanceAddr(index), value.raw()); 3834 StorePointer(InstanceAddr(index), value.raw());
3835 } 3835 }
3836 3836
3837 } // namespace dart 3837 } // namespace dart
3838 3838
3839 #endif // VM_OBJECT_H_ 3839 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/code_generator_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698