| 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/code_generator.h" | 5 #include "vm/code_generator.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
| 9 #include "vm/code_patcher.h" | 9 #include "vm/code_patcher.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 DEFINE_RUNTIME_ENTRY(Throw, 1) { | 632 DEFINE_RUNTIME_ENTRY(Throw, 1) { |
| 633 const Instance& exception = | 633 const Instance& exception = |
| 634 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); | 634 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); |
| 635 Exceptions::Throw(isolate, exception); | 635 Exceptions::Throw(isolate, exception); |
| 636 } | 636 } |
| 637 | 637 |
| 638 | 638 |
| 639 DEFINE_RUNTIME_ENTRY(ReThrow, 2) { | 639 DEFINE_RUNTIME_ENTRY(ReThrow, 2) { |
| 640 const Instance& exception = | 640 const Instance& exception = |
| 641 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); | 641 Instance::CheckedHandle(isolate, arguments.ArgAt(0)); |
| 642 const Stacktrace& stacktrace = | 642 const Instance& stacktrace = |
| 643 Stacktrace::CheckedHandle(isolate, arguments.ArgAt(1)); | 643 Instance::CheckedHandle(isolate, arguments.ArgAt(1)); |
| 644 Exceptions::ReThrow(isolate, exception, stacktrace); | 644 Exceptions::ReThrow(isolate, exception, stacktrace); |
| 645 } | 645 } |
| 646 | 646 |
| 647 | 647 |
| 648 // Patches static call in optimized code with the target's entry point. | 648 // Patches static call in optimized code with the target's entry point. |
| 649 // Compiles target if necessary. | 649 // Compiles target if necessary. |
| 650 DEFINE_RUNTIME_ENTRY(PatchStaticCall, 0) { | 650 DEFINE_RUNTIME_ENTRY(PatchStaticCall, 0) { |
| 651 DartFrameIterator iterator; | 651 DartFrameIterator iterator; |
| 652 StackFrame* caller_frame = iterator.NextFrame(); | 652 StackFrame* caller_frame = iterator.NextFrame(); |
| 653 ASSERT(caller_frame != NULL); | 653 ASSERT(caller_frame != NULL); |
| (...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1679 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1680 const TypedData& new_data = | 1680 const TypedData& new_data = |
| 1681 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1681 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1682 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1682 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1683 typed_data_cell.SetAt(0, new_data); | 1683 typed_data_cell.SetAt(0, new_data); |
| 1684 arguments.SetReturn(new_data); | 1684 arguments.SetReturn(new_data); |
| 1685 } | 1685 } |
| 1686 | 1686 |
| 1687 | 1687 |
| 1688 } // namespace dart | 1688 } // namespace dart |
| OLD | NEW |