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

Side by Side Diff: vm/object.h

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « vm/isolate.cc ('k') | vm/object.cc » ('j') | vm/object.cc » ('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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 uword raw_value() const { 359 uword raw_value() const {
360 return reinterpret_cast<uword>(raw()); 360 return reinterpret_cast<uword>(raw());
361 } 361 }
362 362
363 inline void SetRaw(RawObject* value); 363 inline void SetRaw(RawObject* value);
364 364
365 cpp_vtable vtable() const { return bit_copy<cpp_vtable>(*this); } 365 cpp_vtable vtable() const { return bit_copy<cpp_vtable>(*this); }
366 void set_vtable(cpp_vtable value) { *vtable_address() = value; } 366 void set_vtable(cpp_vtable value) { *vtable_address() = value; }
367 367
368 static RawObject* Allocate(const Class& cls, 368 static RawObject* Allocate(intptr_t cls_id,
369 intptr_t size, 369 intptr_t size,
370 Heap::Space space); 370 Heap::Space space);
371 371
372 static intptr_t RoundedAllocationSize(intptr_t size) { 372 static intptr_t RoundedAllocationSize(intptr_t size) {
373 return Utils::RoundUp(size, kObjectAlignment); 373 return Utils::RoundUp(size, kObjectAlignment);
374 } 374 }
375 375
376 template<typename type> void StorePointer(type* addr, type value) const { 376 template<typename type> void StorePointer(type* addr, type value) const {
377 // TODO(iposva): Implement real store barrier here. 377 // TODO(iposva): Implement real store barrier here.
378 *addr = value; 378 *addr = value;
(...skipping 4789 matching lines...) Expand 10 before | Expand all | Expand 10 after
5168 if (this->CharAt(i) != str.CharAt(begin_index + i)) { 5168 if (this->CharAt(i) != str.CharAt(begin_index + i)) {
5169 return false; 5169 return false;
5170 } 5170 }
5171 } 5171 }
5172 return true; 5172 return true;
5173 } 5173 }
5174 5174
5175 } // namespace dart 5175 } // namespace dart
5176 5176
5177 #endif // VM_OBJECT_H_ 5177 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « vm/isolate.cc ('k') | vm/object.cc » ('j') | vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698