| 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 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 { | 1942 { |
| 1943 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size()); | 1943 WritableInstructionsScope writable(instrs.PayloadStart(), instrs.Size()); |
| 1944 CodePatcher::InsertDeoptimizationCallAt(frame->pc()); | 1944 CodePatcher::InsertDeoptimizationCallAt(frame->pc()); |
| 1945 if (FLAG_trace_patching) { | 1945 if (FLAG_trace_patching) { |
| 1946 const String& name = String::Handle(function.name()); | 1946 const String& name = String::Handle(function.name()); |
| 1947 OS::PrintErr("InsertDeoptimizationCallAt: 0x%" Px " for %s\n", | 1947 OS::PrintErr("InsertDeoptimizationCallAt: 0x%" Px " for %s\n", |
| 1948 frame->pc(), name.ToCString()); | 1948 frame->pc(), name.ToCString()); |
| 1949 } | 1949 } |
| 1950 const ExceptionHandlers& handlers = | 1950 const ExceptionHandlers& handlers = |
| 1951 ExceptionHandlers::Handle(zone, optimized_code.exception_handlers()); | 1951 ExceptionHandlers::Handle(zone, optimized_code.exception_handlers()); |
| 1952 RawExceptionHandlers::HandlerInfo info; | 1952 ExceptionHandlerInfo info; |
| 1953 for (intptr_t i = 0; i < handlers.num_entries(); ++i) { | 1953 for (intptr_t i = 0; i < handlers.num_entries(); ++i) { |
| 1954 handlers.GetHandlerInfo(i, &info); | 1954 handlers.GetHandlerInfo(i, &info); |
| 1955 const uword patch_pc = instrs.PayloadStart() + info.handler_pc_offset; | 1955 const uword patch_pc = instrs.PayloadStart() + info.handler_pc_offset; |
| 1956 CodePatcher::InsertDeoptimizationCallAt(patch_pc); | 1956 CodePatcher::InsertDeoptimizationCallAt(patch_pc); |
| 1957 if (FLAG_trace_patching) { | 1957 if (FLAG_trace_patching) { |
| 1958 OS::PrintErr(" at handler 0x%" Px "\n", patch_pc); | 1958 OS::PrintErr(" at handler 0x%" Px "\n", patch_pc); |
| 1959 } | 1959 } |
| 1960 } | 1960 } |
| 1961 } | 1961 } |
| 1962 #else // !DBC | 1962 #else // !DBC |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2262 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 2262 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 2263 const TypedData& new_data = | 2263 const TypedData& new_data = |
| 2264 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 2264 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 2265 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 2265 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 2266 typed_data_cell.SetAt(0, new_data); | 2266 typed_data_cell.SetAt(0, new_data); |
| 2267 arguments.SetReturn(new_data); | 2267 arguments.SetReturn(new_data); |
| 2268 } | 2268 } |
| 2269 | 2269 |
| 2270 | 2270 |
| 2271 } // namespace dart | 2271 } // namespace dart |
| OLD | NEW |