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

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

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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/lib/stacktrace.cc ('k') | runtime/vm/assembler_arm.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_ASSEMBLER_H_ 5 #ifndef VM_ASSEMBLER_H_
6 #define VM_ASSEMBLER_H_ 6 #define VM_ASSEMBLER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 // When building the C++ tests, assertion code is enabled. To allow 169 // When building the C++ tests, assertion code is enabled. To allow
170 // asserting that the user of the assembler buffer has ensured the 170 // asserting that the user of the assembler buffer has ensured the
171 // capacity needed for emitting, we add a dummy method in non-debug mode. 171 // capacity needed for emitting, we add a dummy method in non-debug mode.
172 bool HasEnsuredCapacity() const { return true; } 172 bool HasEnsuredCapacity() const { return true; }
173 #endif 173 #endif
174 174
175 // Returns the position in the instruction stream. 175 // Returns the position in the instruction stream.
176 intptr_t GetPosition() const { return cursor_ - contents_; } 176 intptr_t GetPosition() const { return cursor_ - contents_; }
177 177
178 void Reset() { cursor_ = contents_; }
179
178 private: 180 private:
179 // The limit is set to kMinimumGap bytes before the end of the data area. 181 // The limit is set to kMinimumGap bytes before the end of the data area.
180 // This leaves enough space for the longest possible instruction and allows 182 // This leaves enough space for the longest possible instruction and allows
181 // for a single, fast space check per instruction. 183 // for a single, fast space check per instruction.
182 static const intptr_t kMinimumGap = 32; 184 static const intptr_t kMinimumGap = 32;
183 185
184 uword contents_; 186 uword contents_;
185 uword cursor_; 187 uword cursor_;
186 uword limit_; 188 uword limit_;
187 AssemblerFixup* fixup_; 189 AssemblerFixup* fixup_;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 #include "vm/assembler_arm64.h" 342 #include "vm/assembler_arm64.h"
341 #elif defined(TARGET_ARCH_MIPS) 343 #elif defined(TARGET_ARCH_MIPS)
342 #include "vm/assembler_mips.h" 344 #include "vm/assembler_mips.h"
343 #elif defined(TARGET_ARCH_DBC) 345 #elif defined(TARGET_ARCH_DBC)
344 #include "vm/assembler_dbc.h" 346 #include "vm/assembler_dbc.h"
345 #else 347 #else
346 #error Unknown architecture. 348 #error Unknown architecture.
347 #endif 349 #endif
348 350
349 #endif // VM_ASSEMBLER_H_ 351 #endif // VM_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « runtime/lib/stacktrace.cc ('k') | runtime/vm/assembler_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698