OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) |
| 7 |
| 8 #include "vm/flow_graph_compiler.h" |
| 9 |
| 10 #include "vm/ast_printer.h" |
| 11 #include "vm/compiler.h" |
| 12 #include "vm/cpu.h" |
| 13 #include "vm/dart_entry.h" |
| 14 #include "vm/deopt_instructions.h" |
| 15 #include "vm/il_printer.h" |
| 16 #include "vm/locations.h" |
| 17 #include "vm/object_store.h" |
| 18 #include "vm/parser.h" |
| 19 #include "vm/stack_frame.h" |
| 20 #include "vm/stub_code.h" |
| 21 #include "vm/symbols.h" |
| 22 |
| 23 namespace dart { |
| 24 |
| 25 FlowGraphCompiler::~FlowGraphCompiler() { |
| 26 // BlockInfos are zone-allocated, so their destructors are not called. |
| 27 // Verify the labels explicitly here. |
| 28 for (int i = 0; i < block_info_.length(); ++i) { |
| 29 ASSERT(!block_info_[i]->jump_label()->IsLinked()); |
| 30 } |
| 31 } |
| 32 |
| 33 |
| 34 bool FlowGraphCompiler::SupportsUnboxedMints() { |
| 35 return false; |
| 36 } |
| 37 |
| 38 |
| 39 bool FlowGraphCompiler::SupportsUnboxedSimd128() { |
| 40 return false; |
| 41 } |
| 42 |
| 43 |
| 44 bool FlowGraphCompiler::SupportsSinCos() { |
| 45 return false; |
| 46 } |
| 47 |
| 48 |
| 49 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 50 DeoptInfoBuilder* builder, |
| 51 const Array& deopt_table) { |
| 52 UNIMPLEMENTED(); |
| 53 return NULL; |
| 54 } |
| 55 |
| 56 |
| 57 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
| 58 intptr_t stub_ix) { |
| 59 UNIMPLEMENTED(); |
| 60 } |
| 61 |
| 62 |
| 63 #define __ assembler()-> |
| 64 |
| 65 |
| 66 // Fall through if bool_register contains null. |
| 67 void FlowGraphCompiler::GenerateBoolToJump(Register bool_register, |
| 68 Label* is_true, |
| 69 Label* is_false) { |
| 70 UNIMPLEMENTED(); |
| 71 } |
| 72 |
| 73 |
| 74 RawSubtypeTestCache* FlowGraphCompiler::GenerateCallSubtypeTestStub( |
| 75 TypeTestStubKind test_kind, |
| 76 Register instance_reg, |
| 77 Register type_arguments_reg, |
| 78 Register temp_reg, |
| 79 Label* is_instance_lbl, |
| 80 Label* is_not_instance_lbl) { |
| 81 UNIMPLEMENTED(); |
| 82 return NULL; |
| 83 } |
| 84 |
| 85 |
| 86 RawSubtypeTestCache* |
| 87 FlowGraphCompiler::GenerateInstantiatedTypeWithArgumentsTest( |
| 88 intptr_t token_pos, |
| 89 const AbstractType& type, |
| 90 Label* is_instance_lbl, |
| 91 Label* is_not_instance_lbl) { |
| 92 UNIMPLEMENTED(); |
| 93 return NULL; |
| 94 } |
| 95 |
| 96 |
| 97 void FlowGraphCompiler::CheckClassIds(Register class_id_reg, |
| 98 const GrowableArray<intptr_t>& class_ids, |
| 99 Label* is_equal_lbl, |
| 100 Label* is_not_equal_lbl) { |
| 101 UNIMPLEMENTED(); |
| 102 } |
| 103 |
| 104 |
| 105 bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest( |
| 106 intptr_t token_pos, |
| 107 const AbstractType& type, |
| 108 Label* is_instance_lbl, |
| 109 Label* is_not_instance_lbl) { |
| 110 UNIMPLEMENTED(); |
| 111 return false; |
| 112 } |
| 113 |
| 114 |
| 115 RawSubtypeTestCache* FlowGraphCompiler::GenerateSubtype1TestCacheLookup( |
| 116 intptr_t token_pos, |
| 117 const Class& type_class, |
| 118 Label* is_instance_lbl, |
| 119 Label* is_not_instance_lbl) { |
| 120 UNIMPLEMENTED(); |
| 121 return NULL; |
| 122 } |
| 123 |
| 124 |
| 125 RawSubtypeTestCache* FlowGraphCompiler::GenerateUninstantiatedTypeTest( |
| 126 intptr_t token_pos, |
| 127 const AbstractType& type, |
| 128 Label* is_instance_lbl, |
| 129 Label* is_not_instance_lbl) { |
| 130 UNIMPLEMENTED(); |
| 131 return NULL; |
| 132 } |
| 133 |
| 134 |
| 135 RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof( |
| 136 intptr_t token_pos, |
| 137 const AbstractType& type, |
| 138 Label* is_instance_lbl, |
| 139 Label* is_not_instance_lbl) { |
| 140 UNIMPLEMENTED(); |
| 141 return NULL; |
| 142 } |
| 143 |
| 144 |
| 145 void FlowGraphCompiler::GenerateInstanceOf(intptr_t token_pos, |
| 146 intptr_t deopt_id, |
| 147 const AbstractType& type, |
| 148 bool negate_result, |
| 149 LocationSummary* locs) { |
| 150 UNIMPLEMENTED(); |
| 151 } |
| 152 |
| 153 |
| 154 void FlowGraphCompiler::GenerateAssertAssignable(intptr_t token_pos, |
| 155 intptr_t deopt_id, |
| 156 const AbstractType& dst_type, |
| 157 const String& dst_name, |
| 158 LocationSummary* locs) { |
| 159 UNIMPLEMENTED(); |
| 160 } |
| 161 |
| 162 |
| 163 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { |
| 164 UNIMPLEMENTED(); |
| 165 } |
| 166 |
| 167 |
| 168 void FlowGraphCompiler::CopyParameters() { |
| 169 UNIMPLEMENTED(); |
| 170 } |
| 171 |
| 172 |
| 173 void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) { |
| 174 UNIMPLEMENTED(); |
| 175 } |
| 176 |
| 177 |
| 178 void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) { |
| 179 UNIMPLEMENTED(); |
| 180 } |
| 181 |
| 182 |
| 183 void FlowGraphCompiler::EmitFrameEntry() { |
| 184 UNIMPLEMENTED(); |
| 185 } |
| 186 |
| 187 |
| 188 void FlowGraphCompiler::CompileGraph() { |
| 189 UNIMPLEMENTED(); |
| 190 } |
| 191 |
| 192 |
| 193 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
| 194 const ExternalLabel* label, |
| 195 PcDescriptors::Kind kind, |
| 196 LocationSummary* locs) { |
| 197 UNIMPLEMENTED(); |
| 198 } |
| 199 |
| 200 |
| 201 void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, |
| 202 intptr_t token_pos, |
| 203 const ExternalLabel* label, |
| 204 PcDescriptors::Kind kind, |
| 205 LocationSummary* locs) { |
| 206 UNIMPLEMENTED(); |
| 207 } |
| 208 |
| 209 |
| 210 void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos, |
| 211 intptr_t deopt_id, |
| 212 const RuntimeEntry& entry, |
| 213 intptr_t argument_count, |
| 214 LocationSummary* locs) { |
| 215 UNIMPLEMENTED(); |
| 216 } |
| 217 |
| 218 |
| 219 void FlowGraphCompiler::EmitEdgeCounter() { |
| 220 UNIMPLEMENTED(); |
| 221 } |
| 222 |
| 223 |
| 224 void FlowGraphCompiler::EmitOptimizedInstanceCall( |
| 225 ExternalLabel* target_label, |
| 226 const ICData& ic_data, |
| 227 intptr_t argument_count, |
| 228 intptr_t deopt_id, |
| 229 intptr_t token_pos, |
| 230 LocationSummary* locs) { |
| 231 UNIMPLEMENTED(); |
| 232 } |
| 233 |
| 234 |
| 235 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, |
| 236 const ICData& ic_data, |
| 237 intptr_t argument_count, |
| 238 intptr_t deopt_id, |
| 239 intptr_t token_pos, |
| 240 LocationSummary* locs) { |
| 241 UNIMPLEMENTED(); |
| 242 } |
| 243 |
| 244 |
| 245 void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
| 246 const ICData& ic_data, |
| 247 intptr_t argument_count, |
| 248 intptr_t deopt_id, |
| 249 intptr_t token_pos, |
| 250 LocationSummary* locs) { |
| 251 UNIMPLEMENTED(); |
| 252 } |
| 253 |
| 254 |
| 255 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
| 256 const Function& target_function, |
| 257 const Array& arguments_descriptor, |
| 258 intptr_t argument_count, |
| 259 intptr_t deopt_id, |
| 260 intptr_t token_pos, |
| 261 LocationSummary* locs) { |
| 262 UNIMPLEMENTED(); |
| 263 } |
| 264 |
| 265 |
| 266 void FlowGraphCompiler::EmitOptimizedStaticCall( |
| 267 const Function& function, |
| 268 const Array& arguments_descriptor, |
| 269 intptr_t argument_count, |
| 270 intptr_t deopt_id, |
| 271 intptr_t token_pos, |
| 272 LocationSummary* locs) { |
| 273 UNIMPLEMENTED(); |
| 274 } |
| 275 |
| 276 |
| 277 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, |
| 278 const Object& obj, |
| 279 bool needs_number_check, |
| 280 intptr_t token_pos) { |
| 281 UNIMPLEMENTED(); |
| 282 } |
| 283 |
| 284 |
| 285 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 286 Register right, |
| 287 bool needs_number_check, |
| 288 intptr_t token_pos) { |
| 289 UNIMPLEMENTED(); |
| 290 } |
| 291 |
| 292 |
| 293 // This function must be in sync with FlowGraphCompiler::RecordSafepoint and |
| 294 // FlowGraphCompiler::SlowPathEnvironmentFor. |
| 295 void FlowGraphCompiler::SaveLiveRegisters(LocationSummary* locs) { |
| 296 UNIMPLEMENTED(); |
| 297 } |
| 298 |
| 299 |
| 300 void FlowGraphCompiler::RestoreLiveRegisters(LocationSummary* locs) { |
| 301 UNIMPLEMENTED(); |
| 302 } |
| 303 |
| 304 |
| 305 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, |
| 306 Register class_id_reg, |
| 307 intptr_t argument_count, |
| 308 const Array& argument_names, |
| 309 Label* deopt, |
| 310 intptr_t deopt_id, |
| 311 intptr_t token_index, |
| 312 LocationSummary* locs) { |
| 313 UNIMPLEMENTED(); |
| 314 } |
| 315 |
| 316 |
| 317 // Do not implement or use this function. |
| 318 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, |
| 319 intptr_t index_scale, |
| 320 Register array, |
| 321 intptr_t index) { |
| 322 UNREACHABLE(); |
| 323 return FieldAddress(array, index); |
| 324 } |
| 325 |
| 326 |
| 327 // Do not implement or use this function. |
| 328 FieldAddress FlowGraphCompiler::ElementAddressForRegIndex(intptr_t cid, |
| 329 intptr_t index_scale, |
| 330 Register array, |
| 331 Register index) { |
| 332 UNREACHABLE(); // No register indexed with offset addressing mode on ARM. |
| 333 return FieldAddress(array, index); |
| 334 } |
| 335 |
| 336 |
| 337 Address FlowGraphCompiler::ExternalElementAddressForIntIndex( |
| 338 intptr_t index_scale, |
| 339 Register array, |
| 340 intptr_t index) { |
| 341 UNREACHABLE(); |
| 342 return FieldAddress(array, index); |
| 343 } |
| 344 |
| 345 |
| 346 Address FlowGraphCompiler::ExternalElementAddressForRegIndex( |
| 347 intptr_t index_scale, |
| 348 Register array, |
| 349 Register index) { |
| 350 UNREACHABLE(); |
| 351 return FieldAddress(array, index); |
| 352 } |
| 353 |
| 354 |
| 355 #undef __ |
| 356 #define __ compiler_->assembler()-> |
| 357 |
| 358 |
| 359 void ParallelMoveResolver::EmitMove(int index) { |
| 360 UNIMPLEMENTED(); |
| 361 } |
| 362 |
| 363 |
| 364 void ParallelMoveResolver::EmitSwap(int index) { |
| 365 UNIMPLEMENTED(); |
| 366 } |
| 367 |
| 368 |
| 369 void ParallelMoveResolver::MoveMemoryToMemory(const Address& dst, |
| 370 const Address& src) { |
| 371 UNIMPLEMENTED(); |
| 372 } |
| 373 |
| 374 |
| 375 void ParallelMoveResolver::StoreObject(const Address& dst, const Object& obj) { |
| 376 UNIMPLEMENTED(); |
| 377 } |
| 378 |
| 379 |
| 380 // Do not call or implement this function. Instead, use the form below that |
| 381 // uses an offset from the frame pointer instead of an Address. |
| 382 void ParallelMoveResolver::Exchange(Register reg, const Address& mem) { |
| 383 UNREACHABLE(); |
| 384 } |
| 385 |
| 386 |
| 387 // Do not call or implement this function. Instead, use the form below that |
| 388 // uses offsets from the frame pointer instead of Addresses. |
| 389 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 390 UNREACHABLE(); |
| 391 } |
| 392 |
| 393 |
| 394 void ParallelMoveResolver::Exchange(Register reg, intptr_t stack_offset) { |
| 395 UNIMPLEMENTED(); |
| 396 } |
| 397 |
| 398 |
| 399 void ParallelMoveResolver::Exchange(intptr_t stack_offset1, |
| 400 intptr_t stack_offset2) { |
| 401 UNIMPLEMENTED(); |
| 402 } |
| 403 |
| 404 |
| 405 void ParallelMoveResolver::SpillScratch(Register reg) { |
| 406 UNIMPLEMENTED(); |
| 407 } |
| 408 |
| 409 |
| 410 void ParallelMoveResolver::RestoreScratch(Register reg) { |
| 411 UNIMPLEMENTED(); |
| 412 } |
| 413 |
| 414 |
| 415 void ParallelMoveResolver::SpillFpuScratch(FpuRegister reg) { |
| 416 UNIMPLEMENTED(); |
| 417 } |
| 418 |
| 419 |
| 420 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 421 UNIMPLEMENTED(); |
| 422 } |
| 423 |
| 424 |
| 425 #undef __ |
| 426 |
| 427 } // namespace dart |
| 428 |
| 429 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |