OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_macros.h" | 7 #include "vm/assembler_macros.h" |
8 #include "vm/ast.h" | 8 #include "vm/ast.h" |
9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1376 if (!error.IsNull()) { | 1376 if (!error.IsNull()) { |
1377 Exceptions::PropagateError(error); | 1377 Exceptions::PropagateError(error); |
1378 } | 1378 } |
1379 const Code& optimized_code = Code::Handle(function.CurrentCode()); | 1379 const Code& optimized_code = Code::Handle(function.CurrentCode()); |
1380 ASSERT(!optimized_code.IsNull()); | 1380 ASSERT(!optimized_code.IsNull()); |
1381 // Set usage counter for reoptimization. | 1381 // Set usage counter for reoptimization. |
1382 function.set_usage_counter( | 1382 function.set_usage_counter( |
1383 function.usage_counter() - FLAG_reoptimization_counter_threshold); | 1383 function.usage_counter() - FLAG_reoptimization_counter_threshold); |
1384 } else { | 1384 } else { |
1385 if (FLAG_trace_failed_optimization_attempts) { | 1385 if (FLAG_trace_failed_optimization_attempts) { |
1386 PrintCaller("Not Optimizable"); | 1386 OS::Print("Not Optimizable: %s\n", function.ToFullyQualifiedCString()); |
siva
2013/01/11 23:08:13
We could start using OS:PrintErr going forward.
| |
1387 } | 1387 } |
1388 // TODO(5442338): Abort as this should not happen. | 1388 // TODO(5442338): Abort as this should not happen. |
1389 function.set_usage_counter(kLowInvocationCount); | 1389 function.set_usage_counter(kLowInvocationCount); |
1390 } | 1390 } |
1391 arguments.SetReturn(Code::Handle(function.CurrentCode())); | 1391 arguments.SetReturn(Code::Handle(function.CurrentCode())); |
1392 } | 1392 } |
1393 | 1393 |
1394 | 1394 |
1395 // The caller must be a static call in a Dart frame, or an entry frame. | 1395 // The caller must be a static call in a Dart frame, or an entry frame. |
1396 // Patch static call to point to valid code's entry point. | 1396 // Patch static call to point to valid code's entry point. |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1794 return; | 1794 return; |
1795 } | 1795 } |
1796 HeapTrace* heap_trace = Isolate::Current()->heap()->trace(); | 1796 HeapTrace* heap_trace = Isolate::Current()->heap()->trace(); |
1797 heap_trace->TraceStoreIntoObject(RawObject::ToAddr(object), | 1797 heap_trace->TraceStoreIntoObject(RawObject::ToAddr(object), |
1798 field_addr, | 1798 field_addr, |
1799 RawObject::ToAddr(value)); | 1799 RawObject::ToAddr(value)); |
1800 } | 1800 } |
1801 END_LEAF_RUNTIME_ENTRY | 1801 END_LEAF_RUNTIME_ENTRY |
1802 | 1802 |
1803 } // namespace dart | 1803 } // namespace dart |
OLD | NEW |