| OLD | NEW |
| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 Smi& offset = Smi::Handle(); | 386 Smi& offset = Smi::Handle(); |
| 387 DeoptInfo& info = DeoptInfo::Handle(); | 387 DeoptInfo& info = DeoptInfo::Handle(); |
| 388 Smi& reason = Smi::Handle(); | 388 Smi& reason = Smi::Handle(); |
| 389 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { | 389 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { |
| 390 offset = Smi::New(deopt_infos_[i]->pc_offset()); | 390 offset = Smi::New(deopt_infos_[i]->pc_offset()); |
| 391 info = deopt_infos_[i]->CreateDeoptInfo(this); | 391 info = deopt_infos_[i]->CreateDeoptInfo(this); |
| 392 reason = Smi::New(deopt_infos_[i]->reason()); | 392 reason = Smi::New(deopt_infos_[i]->reason()); |
| 393 DeoptTable::SetEntry(array, i, offset, info, reason); | 393 DeoptTable::SetEntry(array, i, offset, info, reason); |
| 394 } | 394 } |
| 395 code.set_deopt_info_array(array); | 395 code.set_deopt_info_array(array); |
| 396 const Array& object_array = Array::Handle(Array::MakeArray(object_table_)); | 396 const Array& object_array = Array::Handle(Array::MakeArray(object_table())); |
| 397 code.set_object_table(object_array); | 397 code.set_object_table(object_array); |
| 398 } | 398 } |
| 399 | 399 |
| 400 | 400 |
| 401 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { | 401 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
| 402 if (stackmap_table_builder_ == NULL) { | 402 if (stackmap_table_builder_ == NULL) { |
| 403 // The unoptimizing compiler has no stack maps. | 403 // The unoptimizing compiler has no stack maps. |
| 404 code.set_stackmaps(Array::Handle()); | 404 code.set_stackmaps(Array::Handle()); |
| 405 } else { | 405 } else { |
| 406 // Finalize the stack map array and add it to the code object. | 406 // Finalize the stack map array and add it to the code object. |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 ASSERT(Utils::IsInt(31, disp)); | 919 ASSERT(Utils::IsInt(31, disp)); |
| 920 return FieldAddress(array, disp); | 920 return FieldAddress(array, disp); |
| 921 } | 921 } |
| 922 default: | 922 default: |
| 923 UNIMPLEMENTED(); | 923 UNIMPLEMENTED(); |
| 924 return FieldAddress(SPREG, 0); | 924 return FieldAddress(SPREG, 0); |
| 925 } | 925 } |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace dart | 928 } // namespace dart |
| OLD | NEW |