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

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

Issue 11017027: Remove slow assert from VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/assert.h"
10 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
11 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
12 #include "vm/code_patcher.h" 11 #include "vm/code_patcher.h"
13 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
14 #include "vm/debugger.h" 13 #include "vm/debugger.h"
15 #include "vm/deopt_instructions.h" 14 #include "vm/deopt_instructions.h"
16 #include "vm/disassembler.h" 15 #include "vm/disassembler.h"
17 #include "vm/exceptions.h" 16 #include "vm/exceptions.h"
18 #include "vm/flags.h" 17 #include "vm/flags.h"
19 #include "vm/flow_graph.h" 18 #include "vm/flow_graph.h"
(...skipping 23 matching lines...) Expand all
43 DEFINE_FLAG(bool, common_subexpression_elimination, true, 42 DEFINE_FLAG(bool, common_subexpression_elimination, true,
44 "Do common subexpression elimination."); 43 "Do common subexpression elimination.");
45 DEFINE_FLAG(bool, loop_invariant_code_motion, true, 44 DEFINE_FLAG(bool, loop_invariant_code_motion, true,
46 "Do loop invariant code motion."); 45 "Do loop invariant code motion.");
47 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation."); 46 DEFINE_FLAG(bool, propagate_types, true, "Do static type propagation.");
48 DEFINE_FLAG(int, deoptimization_counter_threshold, 5, 47 DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
49 "How many times we allow deoptimization before we disallow" 48 "How many times we allow deoptimization before we disallow"
50 " certain optimizations"); 49 " certain optimizations");
51 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); 50 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining");
52 DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis"); 51 DEFINE_FLAG(bool, range_analysis, true, "Enable range analysis");
53 DEFINE_FLAG(bool, slow_asserts, false, "Enable slow assertions"); 52 DEFINE_FLAG(bool, verify_compiler, false,
53 "Enable compiler verification assertions");
54 DECLARE_FLAG(bool, print_flow_graph); 54 DECLARE_FLAG(bool, print_flow_graph);
55 55
56 56
57 // Compile a function. Should call only if the function has not been compiled. 57 // Compile a function. Should call only if the function has not been compiled.
58 // Arg0: function object. 58 // Arg0: function object.
59 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { 59 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {
60 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count()); 60 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count());
61 const Function& function = Function::CheckedHandle(arguments.At(0)); 61 const Function& function = Function::CheckedHandle(arguments.At(0));
62 ASSERT(!function.HasCode()); 62 ASSERT(!function.HasCode());
63 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 63 const Error& error = Error::Handle(Compiler::CompileFunction(function));
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 result = isolate->object_store()->sticky_error(); 596 result = isolate->object_store()->sticky_error();
597 isolate->object_store()->clear_sticky_error(); 597 isolate->object_store()->clear_sticky_error();
598 isolate->set_long_jump_base(base); 598 isolate->set_long_jump_base(base);
599 return result.raw(); 599 return result.raw();
600 } 600 }
601 UNREACHABLE(); 601 UNREACHABLE();
602 return Object::null(); 602 return Object::null();
603 } 603 }
604 604
605 } // namespace dart 605 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assert.h ('k') | runtime/vm/flow_graph.cc » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698