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

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

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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/assembler_dbc.h ('k') | runtime/vm/assembler_dbc_test.cc » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
11 #include "vm/runtime_entry.h" 11 #include "vm/runtime_entry.h"
12 #include "vm/simulator.h" 12 #include "vm/simulator.h"
13 #include "vm/stack_frame.h" 13 #include "vm/stack_frame.h"
14 #include "vm/stub_code.h" 14 #include "vm/stub_code.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 DECLARE_FLAG(bool, check_code_pointer); 18 DECLARE_FLAG(bool, check_code_pointer);
19 DECLARE_FLAG(bool, inline_alloc); 19 DECLARE_FLAG(bool, inline_alloc);
20 20
21 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) { 21 void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) {
22 const uword end = data + length; 22 const uword end = data + length;
23 while (data < end) { 23 while (data < end) {
24 *reinterpret_cast<int32_t*>(data) = Bytecode::kTrap; 24 *reinterpret_cast<int32_t*>(data) = Bytecode::kTrap;
25 data += sizeof(int32_t); 25 data += sizeof(int32_t);
26 } 26 }
27 } 27 }
28 28
29 #define DEFINE_EMIT(Name, Signature, Fmt0, Fmt1, Fmt2) \ 29 #define DEFINE_EMIT(Name, Signature, Fmt0, Fmt1, Fmt2) \
30 void Assembler::Name(PARAMS_##Signature) { \ 30 void Assembler::Name(PARAMS_##Signature) { \
31 Emit(Bytecode::FENCODE_##Signature( \ 31 Emit(Bytecode::FENCODE_##Signature(Bytecode::k##Name ENCODE_##Signature)); \
32 Bytecode::k##Name ENCODE_##Signature)); \ 32 }
33 } \
34 33
35 34
36 #define PARAMS_0 35 #define PARAMS_0
37 #define PARAMS_A_D uintptr_t ra, uintptr_t rd 36 #define PARAMS_A_D uintptr_t ra, uintptr_t rd
38 #define PARAMS_D uintptr_t rd 37 #define PARAMS_D uintptr_t rd
39 #define PARAMS_A_B_C uintptr_t ra, uintptr_t rb, uintptr_t rc 38 #define PARAMS_A_B_C uintptr_t ra, uintptr_t rb, uintptr_t rc
40 #define PARAMS_A uintptr_t ra 39 #define PARAMS_A uintptr_t ra
41 #define PARAMS_T intptr_t x 40 #define PARAMS_T intptr_t x
42 #define PARAMS_A_X uintptr_t ra, intptr_t x 41 #define PARAMS_A_X uintptr_t ra, intptr_t x
43 #define PARAMS_X intptr_t x 42 #define PARAMS_X intptr_t x
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 PushConstant(AddConstant(obj)); 123 PushConstant(AddConstant(obj));
125 } 124 }
126 125
127 126
128 void Assembler::LoadConstant(uintptr_t ra, const Object& obj) { 127 void Assembler::LoadConstant(uintptr_t ra, const Object& obj) {
129 LoadConstant(ra, AddConstant(obj)); 128 LoadConstant(ra, AddConstant(obj));
130 } 129 }
131 130
132 131
133 intptr_t Assembler::AddConstant(const Object& obj) { 132 intptr_t Assembler::AddConstant(const Object& obj) {
134 return object_pool_wrapper().FindObject( 133 return object_pool_wrapper().FindObject(Object::ZoneHandle(obj.raw()));
135 Object::ZoneHandle(obj.raw()));
136 } 134 }
137 135
138 136
139 } // namespace dart 137 } // namespace dart
140 138
141 #endif // defined TARGET_ARCH_DBC 139 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/assembler_dbc.h ('k') | runtime/vm/assembler_dbc_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698