| OLD | NEW |
| 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/deopt_instructions.h" | 5 #include "vm/deopt_instructions.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/locations.h" | 10 #include "vm/locations.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 | 359 |
| 360 RawArray* DeoptContext::DestFrameAsArray() { | 360 RawArray* DeoptContext::DestFrameAsArray() { |
| 361 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); | 361 ASSERT(dest_frame_ != NULL && dest_frame_is_allocated_); |
| 362 const Array& dest_array = | 362 const Array& dest_array = |
| 363 Array::Handle(Array::New(dest_frame_size_)); | 363 Array::Handle(Array::New(dest_frame_size_)); |
| 364 Object& obj = Object::Handle(); | 364 Object& obj = Object::Handle(); |
| 365 for (intptr_t i = 0; i < dest_frame_size_; i++) { | 365 for (intptr_t i = 0; i < dest_frame_size_; i++) { |
| 366 obj = reinterpret_cast<RawObject*>(dest_frame_[i]); | 366 obj = reinterpret_cast<RawObject*>(dest_frame_[i]); |
| 367 ASSERT(obj.IsNull() || | |
| 368 obj.IsInstance() || | |
| 369 obj.IsContext() || | |
| 370 obj.IsTypeArguments() || | |
| 371 obj.IsClass() || // TODO(turnidge): Ask around and find out why | |
| 372 obj.IsField()); // Class/Field show up here. Maybe type feedback? | |
| 373 dest_array.SetAt(i, obj); | 367 dest_array.SetAt(i, obj); |
| 374 } | 368 } |
| 375 return dest_array.raw(); | 369 return dest_array.raw(); |
| 376 } | 370 } |
| 377 | 371 |
| 378 | 372 |
| 379 // Deoptimization instruction moving value from optimized frame at | 373 // Deoptimization instruction moving value from optimized frame at |
| 380 // 'source_index' to specified slots in the unoptimized frame. | 374 // 'source_index' to specified slots in the unoptimized frame. |
| 381 // 'source_index' represents the slot index of the frame (0 being | 375 // 'source_index' represents the slot index of the frame (0 being |
| 382 // first argument) and accounts for saved return address, frame | 376 // first argument) and accounts for saved return address, frame |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 Smi* offset, | 1477 Smi* offset, |
| 1484 DeoptInfo* info, | 1478 DeoptInfo* info, |
| 1485 Smi* reason) { | 1479 Smi* reason) { |
| 1486 intptr_t i = index * kEntrySize; | 1480 intptr_t i = index * kEntrySize; |
| 1487 *offset ^= table.At(i); | 1481 *offset ^= table.At(i); |
| 1488 *info ^= table.At(i + 1); | 1482 *info ^= table.At(i + 1); |
| 1489 *reason ^= table.At(i + 2); | 1483 *reason ^= table.At(i + 2); |
| 1490 } | 1484 } |
| 1491 | 1485 |
| 1492 } // namespace dart | 1486 } // namespace dart |
| OLD | NEW |