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

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

Issue 319493005: - Re-add the assert which was removed in r36993. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « no previous file | runtime/vm/raw_object.h » ('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 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 } 3621 }
3622 3622
3623 // We would have a VisitPointers function here to traverse all the 3623 // We would have a VisitPointers function here to traverse all the
3624 // embedded objects in the instructions using pointer_offsets. 3624 // embedded objects in the instructions using pointer_offsets.
3625 3625
3626 static const intptr_t kBytesPerElement = 3626 static const intptr_t kBytesPerElement =
3627 sizeof(reinterpret_cast<RawCode*>(0)->data_[0]); 3627 sizeof(reinterpret_cast<RawCode*>(0)->data_[0]);
3628 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement; 3628 static const intptr_t kMaxElements = kSmiMax / kBytesPerElement;
3629 3629
3630 static intptr_t InstanceSize() { 3630 static intptr_t InstanceSize() {
3631 ASSERT(sizeof(RawCode) == OFFSET_OF(RawCode, data_));
3631 return 0; 3632 return 0;
3632 } 3633 }
3633 static intptr_t InstanceSize(intptr_t len) { 3634 static intptr_t InstanceSize(intptr_t len) {
3634 ASSERT(0 <= len && len <= kMaxElements); 3635 ASSERT(0 <= len && len <= kMaxElements);
3635 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement)); 3636 return RoundedAllocationSize(sizeof(RawCode) + (len * kBytesPerElement));
3636 } 3637 }
3637 static RawCode* FinalizeCode(const Function& function, 3638 static RawCode* FinalizeCode(const Function& function,
3638 Assembler* assembler, 3639 Assembler* assembler,
3639 bool optimized = false); 3640 bool optimized = false);
3640 static RawCode* FinalizeCode(const char* name, 3641 static RawCode* FinalizeCode(const char* name,
(...skipping 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
7105 7106
7106 7107
7107 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7108 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7108 intptr_t index) { 7109 intptr_t index) {
7109 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7110 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7110 } 7111 }
7111 7112
7112 } // namespace dart 7113 } // namespace dart
7113 7114
7114 #endif // VM_OBJECT_H_ 7115 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698