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

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

Issue 23621008: Move the assertion checking the number of arguments passed to a runtime entry (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/runtime_entry.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) 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/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 DEFINE_FLAG(bool, reorder_basic_blocks, true, "Enable basic-block reordering."); 56 DEFINE_FLAG(bool, reorder_basic_blocks, true, "Enable basic-block reordering.");
57 DEFINE_FLAG(bool, verify_compiler, false, 57 DEFINE_FLAG(bool, verify_compiler, false,
58 "Enable compiler verification assertions"); 58 "Enable compiler verification assertions");
59 DECLARE_FLAG(bool, print_flow_graph); 59 DECLARE_FLAG(bool, print_flow_graph);
60 DECLARE_FLAG(bool, print_flow_graph_optimized); 60 DECLARE_FLAG(bool, print_flow_graph_optimized);
61 DECLARE_FLAG(bool, trace_failed_optimization_attempts); 61 DECLARE_FLAG(bool, trace_failed_optimization_attempts);
62 62
63 // Compile a function. Should call only if the function has not been compiled. 63 // Compile a function. Should call only if the function has not been compiled.
64 // Arg0: function object. 64 // Arg0: function object.
65 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { 65 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) {
66 ASSERT(arguments.ArgCount() == kCompileFunctionRuntimeEntry.argument_count());
67 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); 66 const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
68 ASSERT(!function.HasCode()); 67 ASSERT(!function.HasCode());
69 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 68 const Error& error = Error::Handle(Compiler::CompileFunction(function));
70 if (!error.IsNull()) { 69 if (!error.IsNull()) {
71 Exceptions::PropagateError(error); 70 Exceptions::PropagateError(error);
72 } 71 }
73 } 72 }
74 73
75 74
76 RawError* Compiler::Compile(const Library& library, const Script& script) { 75 RawError* Compiler::Compile(const Library& library, const Script& script) {
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 Object::Handle(isolate->object_store()->sticky_error()); 923 Object::Handle(isolate->object_store()->sticky_error());
925 isolate->object_store()->clear_sticky_error(); 924 isolate->object_store()->clear_sticky_error();
926 isolate->set_long_jump_base(base); 925 isolate->set_long_jump_base(base);
927 return result.raw(); 926 return result.raw();
928 } 927 }
929 UNREACHABLE(); 928 UNREACHABLE();
930 return Object::null(); 929 return Object::null();
931 } 930 }
932 931
933 } // namespace dart 932 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/runtime_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698