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

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

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed unnecessary includes Created 4 years, 10 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 | « runtime/vm/code_descriptors.cc ('k') | runtime/vm/compiler.h » ('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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, max_deoptimization_counter_threshold); 60 DECLARE_FLAG(int, max_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, trace_optimizing_compiler);
64 DECLARE_FLAG(bool, warn_on_javascript_compatibility); 64 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
65 DECLARE_FLAG(int, max_polymorphic_checks); 65 DECLARE_FLAG(int, max_polymorphic_checks);
66 DECLARE_FLAG(bool, precompilation);
66 67
67 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement."); 68 DEFINE_FLAG(bool, use_osr, true, "Use on-stack replacement.");
68 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement."); 69 DEFINE_FLAG(bool, trace_osr, false, "Trace attempts at on-stack replacement.");
69 70
70 DEFINE_FLAG(int, stacktrace_every, 0, 71 DEFINE_FLAG(int, stacktrace_every, 0,
71 "Compute debugger stacktrace on every N stack overflow checks"); 72 "Compute debugger stacktrace on every N stack overflow checks");
72 DEFINE_FLAG(charp, stacktrace_filter, NULL, 73 DEFINE_FLAG(charp, stacktrace_filter, NULL,
73 "Compute stacktrace in named function on stack overflow checks"); 74 "Compute stacktrace in named function on stack overflow checks");
74 DEFINE_FLAG(int, deoptimize_every, 0, 75 DEFINE_FLAG(int, deoptimize_every, 0,
75 "Deoptimize on every N stack overflow checks"); 76 "Deoptimize on every N stack overflow checks");
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 // TODO(turnidge): Consider using DeoptimizeAt instead. 1371 // TODO(turnidge): Consider using DeoptimizeAt instead.
1371 DeoptimizeFunctionsOnStack(); 1372 DeoptimizeFunctionsOnStack();
1372 } 1373 }
1373 if (do_stacktrace) { 1374 if (do_stacktrace) {
1374 String& var_name = String::Handle(); 1375 String& var_name = String::Handle();
1375 Instance& var_value = Instance::Handle(); 1376 Instance& var_value = Instance::Handle();
1376 DebuggerStackTrace* stack = isolate->debugger()->StackTrace(); 1377 DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
1377 intptr_t num_frames = stack->Length(); 1378 intptr_t num_frames = stack->Length();
1378 for (intptr_t i = 0; i < num_frames; i++) { 1379 for (intptr_t i = 0; i < num_frames; i++) {
1379 ActivationFrame* frame = stack->FrameAt(i); 1380 ActivationFrame* frame = stack->FrameAt(i);
1380 // Variable locations and number are unknown when 'always_optimize'. 1381 // Variable locations and number are unknown when precompiling.
1381 const int num_vars = 1382 const int num_vars =
1382 Compiler::always_optimize() ? 0 : frame->NumLocalVariables(); 1383 FLAG_precompilation ? 0 : frame->NumLocalVariables();
1383 intptr_t unused; 1384 intptr_t unused;
1384 for (intptr_t v = 0; v < num_vars; v++) { 1385 for (intptr_t v = 0; v < num_vars; v++) {
1385 frame->VariableAt(v, &var_name, &unused, &unused, &var_value); 1386 frame->VariableAt(v, &var_name, &unused, &unused, &var_value);
1386 } 1387 }
1387 } 1388 }
1388 } 1389 }
1389 1390
1390 const Error& error = Error::Handle(isolate->HandleInterrupts()); 1391 const Error& error = Error::Handle(isolate->HandleInterrupts());
1391 if (!error.IsNull()) { 1392 if (!error.IsNull()) {
1392 Exceptions::PropagateError(error); 1393 Exceptions::PropagateError(error);
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1888 const intptr_t elm_size = old_data.ElementSizeInBytes();
1888 const TypedData& new_data = 1889 const TypedData& new_data =
1889 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1890 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1890 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1891 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1891 typed_data_cell.SetAt(0, new_data); 1892 typed_data_cell.SetAt(0, new_data);
1892 arguments.SetReturn(new_data); 1893 arguments.SetReturn(new_data);
1893 } 1894 }
1894 1895
1895 1896
1896 } // namespace dart 1897 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_descriptors.cc ('k') | runtime/vm/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698