| 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() || obj.IsInstance() || obj.IsContext()); | 367 ASSERT(obj.IsNull() || |
| 368 obj.IsInstance() || |
| 369 obj.IsContext() || |
| 370 obj.IsTypeArguments()); |
| 368 dest_array.SetAt(i, obj); | 371 dest_array.SetAt(i, obj); |
| 369 } | 372 } |
| 370 return dest_array.raw(); | 373 return dest_array.raw(); |
| 371 } | 374 } |
| 372 | 375 |
| 373 | 376 |
| 374 // Deoptimization instruction moving value from optimized frame at | 377 // Deoptimization instruction moving value from optimized frame at |
| 375 // 'source_index' to specified slots in the unoptimized frame. | 378 // 'source_index' to specified slots in the unoptimized frame. |
| 376 // 'source_index' represents the slot index of the frame (0 being | 379 // 'source_index' represents the slot index of the frame (0 being |
| 377 // first argument) and accounts for saved return address, frame | 380 // first argument) and accounts for saved return address, frame |
| (...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1410 Smi* offset, | 1413 Smi* offset, |
| 1411 DeoptInfo* info, | 1414 DeoptInfo* info, |
| 1412 Smi* reason) { | 1415 Smi* reason) { |
| 1413 intptr_t i = index * kEntrySize; | 1416 intptr_t i = index * kEntrySize; |
| 1414 *offset ^= table.At(i); | 1417 *offset ^= table.At(i); |
| 1415 *info ^= table.At(i + 1); | 1418 *info ^= table.At(i + 1); |
| 1416 *reason ^= table.At(i + 2); | 1419 *reason ^= table.At(i + 2); |
| 1417 } | 1420 } |
| 1418 | 1421 |
| 1419 } // namespace dart | 1422 } // namespace dart |
| OLD | NEW |