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

Side by Side Diff: runtime/vm/dart.cc

Issue 2279563002: AOT: Single target stub. (Closed)
Patch Set: add offset assertions Created 4 years, 3 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
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "vm/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/clustered_snapshot.h" 8 #include "vm/clustered_snapshot.h"
9 #include "vm/code_observers.h" 9 #include "vm/code_observers.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 FATAL2("%s == %" Pd, #expr, (expr)); \ 88 FATAL2("%s == %" Pd, #expr, (expr)); \
89 } \ 89 } \
90 90
91 #if defined(TARGET_ARCH_ARM) 91 #if defined(TARGET_ARCH_ARM)
92 // These offsets are embedded in precompiled instructions. We need simarm 92 // These offsets are embedded in precompiled instructions. We need simarm
93 // (compiler) and arm (runtime) to agree. 93 // (compiler) and arm (runtime) to agree.
94 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8); 94 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8);
95 CHECK_OFFSET(Isolate::heap_offset(), 8); 95 CHECK_OFFSET(Isolate::heap_offset(), 8);
96 CHECK_OFFSET(Thread::stack_limit_offset(), 4); 96 CHECK_OFFSET(Thread::stack_limit_offset(), 4);
97 CHECK_OFFSET(Thread::object_null_offset(), 36); 97 CHECK_OFFSET(Thread::object_null_offset(), 36);
98 CHECK_OFFSET(SingleTargetCache::upper_limit_offset(), 14);
98 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 120)); 99 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 120));
99 #endif 100 #endif
100 #if defined(TARGET_ARCH_MIPS) 101 #if defined(TARGET_ARCH_MIPS)
101 // These offsets are embedded in precompiled instructions. We need simmips 102 // These offsets are embedded in precompiled instructions. We need simmips
102 // (compiler) and mips (runtime) to agree. 103 // (compiler) and mips (runtime) to agree.
103 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8); 104 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8);
104 CHECK_OFFSET(Isolate::heap_offset(), 8); 105 CHECK_OFFSET(Isolate::heap_offset(), 8);
105 CHECK_OFFSET(Thread::stack_limit_offset(), 4); 106 CHECK_OFFSET(Thread::stack_limit_offset(), 4);
106 CHECK_OFFSET(Thread::object_null_offset(), 36); 107 CHECK_OFFSET(Thread::object_null_offset(), 36);
108 CHECK_OFFSET(SingleTargetCache::upper_limit_offset(), 14);
107 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 120)); 109 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 120));
108 #endif 110 #endif
109 #if defined(TARGET_ARCH_ARM64) 111 #if defined(TARGET_ARCH_ARM64)
110 // These offsets are embedded in precompiled instructions. We need simarm64 112 // These offsets are embedded in precompiled instructions. We need simarm64
111 // (compiler) and arm64 (runtime) to agree. 113 // (compiler) and arm64 (runtime) to agree.
112 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8); 114 CHECK_OFFSET(Heap::TopOffset(Heap::kNew), 8);
113 CHECK_OFFSET(Isolate::heap_offset(), 16); 115 CHECK_OFFSET(Isolate::heap_offset(), 16);
114 CHECK_OFFSET(Thread::stack_limit_offset(), 8); 116 CHECK_OFFSET(Thread::stack_limit_offset(), 8);
115 CHECK_OFFSET(Thread::object_null_offset(), 72); 117 CHECK_OFFSET(Thread::object_null_offset(), 72);
118 CHECK_OFFSET(SingleTargetCache::upper_limit_offset(), 28);
116 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 208)); 119 NOT_IN_PRODUCT(CHECK_OFFSET(sizeof(ClassHeapStats), 208));
117 #endif 120 #endif
118 #undef CHECK_OFFSET 121 #undef CHECK_OFFSET
119 } 122 }
120 123
121 124
122 char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot, 125 char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
123 const uint8_t* instructions_snapshot, 126 const uint8_t* instructions_snapshot,
124 const uint8_t* data_snapshot, 127 const uint8_t* data_snapshot,
125 Dart_IsolateCreateCallback create, 128 Dart_IsolateCreateCallback create,
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 return predefined_handles_->handles_.IsValidScopedHandle(address); 723 return predefined_handles_->handles_.IsValidScopedHandle(address);
721 } 724 }
722 725
723 726
724 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 727 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
725 ASSERT(predefined_handles_ != NULL); 728 ASSERT(predefined_handles_ != NULL);
726 return predefined_handles_->api_handles_.IsValidHandle(handle); 729 return predefined_handles_->api_handles_.IsValidHandle(handle);
727 } 730 }
728 731
729 } // namespace dart 732 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698