| 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 Exceptions::PropagateError(Error::Cast(result)); | 700 Exceptions::PropagateError(Error::Cast(result)); |
| 701 } | 701 } |
| 702 } | 702 } |
| 703 | 703 |
| 704 | 704 |
| 705 // Gets called from debug stub when code reaches a breakpoint | 705 // Gets called from debug stub when code reaches a breakpoint |
| 706 // set on a runtime stub call. | 706 // set on a runtime stub call. |
| 707 DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) { | 707 DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) { |
| 708 if (!FLAG_support_debugger) { | 708 if (!FLAG_support_debugger) { |
| 709 UNREACHABLE(); | 709 UNREACHABLE(); |
| 710 return; |
| 710 } | 711 } |
| 711 DartFrameIterator iterator; | 712 DartFrameIterator iterator; |
| 712 StackFrame* caller_frame = iterator.NextFrame(); | 713 StackFrame* caller_frame = iterator.NextFrame(); |
| 713 ASSERT(caller_frame != NULL); | 714 ASSERT(caller_frame != NULL); |
| 714 const Code& orig_stub = Code::Handle( | 715 const Code& orig_stub = Code::Handle( |
| 715 isolate->debugger()->GetPatchedStubAddress(caller_frame->pc())); | 716 isolate->debugger()->GetPatchedStubAddress(caller_frame->pc())); |
| 716 const Error& error = Error::Handle(isolate->debugger()->SignalBpReached()); | 717 const Error& error = Error::Handle(isolate->debugger()->SignalBpReached()); |
| 717 if (!error.IsNull()) { | 718 if (!error.IsNull()) { |
| 718 Exceptions::PropagateError(error); | 719 Exceptions::PropagateError(error); |
| 719 UNREACHABLE(); | 720 UNREACHABLE(); |
| 720 } | 721 } |
| 721 arguments.SetReturn(orig_stub); | 722 arguments.SetReturn(orig_stub); |
| 722 } | 723 } |
| 723 | 724 |
| 724 | 725 |
| 725 DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) { | 726 DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) { |
| 726 if (!FLAG_support_debugger) { | 727 if (!FLAG_support_debugger) { |
| 727 UNREACHABLE(); | 728 UNREACHABLE(); |
| 729 return; |
| 728 } | 730 } |
| 729 const Error& error = | 731 const Error& error = |
| 730 Error::Handle(isolate->debugger()->DebuggerStepCallback()); | 732 Error::Handle(isolate->debugger()->DebuggerStepCallback()); |
| 731 if (!error.IsNull()) { | 733 if (!error.IsNull()) { |
| 732 Exceptions::PropagateError(error); | 734 Exceptions::PropagateError(error); |
| 733 UNREACHABLE(); | 735 UNREACHABLE(); |
| 734 } | 736 } |
| 735 } | 737 } |
| 736 | 738 |
| 737 | 739 |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1898 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1897 const TypedData& new_data = | 1899 const TypedData& new_data = |
| 1898 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1900 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1899 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1901 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1900 typed_data_cell.SetAt(0, new_data); | 1902 typed_data_cell.SetAt(0, new_data); |
| 1901 arguments.SetReturn(new_data); | 1903 arguments.SetReturn(new_data); |
| 1902 } | 1904 } |
| 1903 | 1905 |
| 1904 | 1906 |
| 1905 } // namespace dart | 1907 } // namespace dart |
| OLD | NEW |