| 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 arguments.ArgAt(0)); | 1469 arguments.ArgAt(0)); |
| 1470 ASSERT(!function.IsNull()); | 1470 ASSERT(!function.IsNull()); |
| 1471 ASSERT(function.HasCode()); | 1471 ASSERT(function.HasCode()); |
| 1472 | 1472 |
| 1473 if (CanOptimizeFunction(function, isolate)) { | 1473 if (CanOptimizeFunction(function, isolate)) { |
| 1474 // Reset usage counter for reoptimization before calling optimizer to | 1474 // Reset usage counter for reoptimization before calling optimizer to |
| 1475 // prevent recursive triggering of function optimization. | 1475 // prevent recursive triggering of function optimization. |
| 1476 function.set_usage_counter(0); | 1476 function.set_usage_counter(0); |
| 1477 if (FLAG_trace_compiler) { | 1477 if (FLAG_trace_compiler) { |
| 1478 if (function.HasOptimizedCode()) { | 1478 if (function.HasOptimizedCode()) { |
| 1479 ISL_Print("ReCompiling function: '%s' \n", | 1479 THR_Print("ReCompiling function: '%s' \n", |
| 1480 function.ToFullyQualifiedCString()); | 1480 function.ToFullyQualifiedCString()); |
| 1481 } | 1481 } |
| 1482 } | 1482 } |
| 1483 const Error& error = Error::Handle( | 1483 const Error& error = Error::Handle( |
| 1484 isolate, Compiler::CompileOptimizedFunction(thread, function)); | 1484 isolate, Compiler::CompileOptimizedFunction(thread, function)); |
| 1485 if (!error.IsNull()) { | 1485 if (!error.IsNull()) { |
| 1486 Exceptions::PropagateError(error); | 1486 Exceptions::PropagateError(error); |
| 1487 } | 1487 } |
| 1488 const Code& optimized_code = Code::Handle(isolate, function.CurrentCode()); | 1488 const Code& optimized_code = Code::Handle(isolate, function.CurrentCode()); |
| 1489 ASSERT(!optimized_code.IsNull()); | 1489 ASSERT(!optimized_code.IsNull()); |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 const intptr_t elm_size = old_data.ElementSizeInBytes(); | 1855 const intptr_t elm_size = old_data.ElementSizeInBytes(); |
| 1856 const TypedData& new_data = | 1856 const TypedData& new_data = |
| 1857 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); | 1857 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); |
| 1858 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); | 1858 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); |
| 1859 typed_data_cell.SetAt(0, new_data); | 1859 typed_data_cell.SetAt(0, new_data); |
| 1860 arguments.SetReturn(new_data); | 1860 arguments.SetReturn(new_data); |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 | 1863 |
| 1864 } // namespace dart | 1864 } // namespace dart |
| OLD | NEW |