Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: runtime/vm/code_generator.cc

Issue 1541133003: Incremental changes from background compilation work (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 "Trace IC miss in optimized code"); 53 "Trace IC miss in optimized code");
54 DEFINE_FLAG(bool, trace_optimized_ic_calls, false, 54 DEFINE_FLAG(bool, trace_optimized_ic_calls, false,
55 "Trace IC calls in optimized code."); 55 "Trace IC calls in optimized code.");
56 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code."); 56 DEFINE_FLAG(bool, trace_patching, false, "Trace patching of code.");
57 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls"); 57 DEFINE_FLAG(bool, trace_runtime_calls, false, "Trace runtime calls");
58 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks."); 58 DEFINE_FLAG(bool, trace_type_checks, false, "Trace runtime type checks.");
59 59
60 DECLARE_FLAG(int, deoptimization_counter_threshold); 60 DECLARE_FLAG(int, deoptimization_counter_threshold);
61 DECLARE_FLAG(bool, enable_inlining_annotations); 61 DECLARE_FLAG(bool, enable_inlining_annotations);
62 DECLARE_FLAG(bool, trace_compiler); 62 DECLARE_FLAG(bool, trace_compiler);
63 DECLARE_FLAG(bool, trace_optimizing_compiler);
63 DECLARE_FLAG(bool, warn_on_javascript_compatibility); 64 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
64 DECLARE_FLAG(int, max_polymorphic_checks); 65 DECLARE_FLAG(int, max_polymorphic_checks);
65 66
66 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement."); 67 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement.");
67 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement."); 68 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement.");
68 69
69 DEFINE_FLAG(int, stacktrace_every, 0, 70 DEFINE_FLAG(int, stacktrace_every, 0,
70 "Compute debugger stacktrace on every N stack overflow checks"); 71 "Compute debugger stacktrace on every N stack overflow checks");
71 DEFINE_FLAG(charp, stacktrace_filter, NULL, 72 DEFINE_FLAG(charp, stacktrace_filter, NULL,
72 "Compute stacktrace in named function on stack overflow checks"); 73 "Compute stacktrace in named function on stack overflow checks");
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 ASSERT(isolate->background_compiler() != NULL); 1492 ASSERT(isolate->background_compiler() != NULL);
1492 isolate->background_compiler()->CompileOptimized(function); 1493 isolate->background_compiler()->CompileOptimized(function);
1493 // Continue in the same code. 1494 // Continue in the same code.
1494 arguments.SetReturn(Code::Handle(zone, function.CurrentCode())); 1495 arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
1495 return; 1496 return;
1496 } 1497 }
1497 1498
1498 // Reset usage counter for reoptimization before calling optimizer to 1499 // Reset usage counter for reoptimization before calling optimizer to
1499 // prevent recursive triggering of function optimization. 1500 // prevent recursive triggering of function optimization.
1500 function.set_usage_counter(0); 1501 function.set_usage_counter(0);
1501 if (FLAG_trace_compiler) { 1502 if (FLAG_trace_compiler || FLAG_trace_optimizing_compiler) {
1502 if (function.HasOptimizedCode()) { 1503 if (function.HasOptimizedCode()) {
1503 THR_Print("ReCompiling function: '%s' \n", 1504 THR_Print("ReCompiling function: '%s' \n",
1504 function.ToFullyQualifiedCString()); 1505 function.ToFullyQualifiedCString());
1505 } 1506 }
1506 } 1507 }
1507 const Error& error = Error::Handle( 1508 const Error& error = Error::Handle(
1508 zone, Compiler::CompileOptimizedFunction(thread, function)); 1509 zone, Compiler::CompileOptimizedFunction(thread, function));
1509 if (!error.IsNull()) { 1510 if (!error.IsNull()) {
1510 Exceptions::PropagateError(error); 1511 Exceptions::PropagateError(error);
1511 } 1512 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1875 const intptr_t elm_size = old_data.ElementSizeInBytes();
1875 const TypedData& new_data = 1876 const TypedData& new_data =
1876 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1877 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1877 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1878 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1878 typed_data_cell.SetAt(0, new_data); 1879 typed_data_cell.SetAt(0, new_data);
1879 arguments.SetReturn(new_data); 1880 arguments.SetReturn(new_data);
1880 } 1881 }
1881 1882
1882 1883
1883 } // namespace dart 1884 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698