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

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

Issue 10641002: Switch to the new compiler onIA32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | no next file » | 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) 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 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 14 matching lines...) Expand all
25 #include "vm/scanner.h" 25 #include "vm/scanner.h"
26 #include "vm/timer.h" 26 #include "vm/timer.h"
27 27
28 namespace dart { 28 namespace dart {
29 29
30 DEFINE_FLAG(bool, disassemble, false, "Disassemble dart code."); 30 DEFINE_FLAG(bool, disassemble, false, "Disassemble dart code.");
31 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations."); 31 DEFINE_FLAG(bool, trace_compiler, false, "Trace compiler operations.");
32 DEFINE_FLAG(int, deoptimization_counter_threshold, 5, 32 DEFINE_FLAG(int, deoptimization_counter_threshold, 5,
33 "How many times we allow deoptimization before we disallow" 33 "How many times we allow deoptimization before we disallow"
34 " certain optimizations"); 34 " certain optimizations");
35 #if defined(TARGET_ARCH_X64) 35 DEFINE_FLAG(bool, use_new_compiler, true, "Use the new compiler backend.");
36 DEFINE_FLAG(bool, use_new_compiler, true,
37 "Try to use the new compiler backend.");
38 #else
39 DEFINE_FLAG(bool, use_new_compiler, false,
40 "Try to use the new compiler backend.");
41 #endif
42 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from new compiler."); 36 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from new compiler.");
43 37
44 38
45 // Compile a function. Should call only if the function has not been compiled. 39 // Compile a function. Should call only if the function has not been compiled.
46 // Arg0: function object. 40 // Arg0: function object.
47 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { 41 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {
48 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count()); 42 ASSERT(arguments.Count() == kCompileFunctionRuntimeEntry.argument_count());
49 const Function& function = Function::CheckedHandle(arguments.At(0)); 43 const Function& function = Function::CheckedHandle(arguments.At(0));
50 ASSERT(!function.HasCode()); 44 ASSERT(!function.HasCode());
51 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 45 const Error& error = Error::Handle(Compiler::CompileFunction(function));
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 isolate->object_store()->clear_sticky_error(); 566 isolate->object_store()->clear_sticky_error();
573 isolate->set_long_jump_base(base); 567 isolate->set_long_jump_base(base);
574 return result.raw(); 568 return result.raw();
575 } 569 }
576 UNREACHABLE(); 570 UNREACHABLE();
577 return Object::null(); 571 return Object::null();
578 } 572 }
579 573
580 574
581 } // namespace dart 575 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698