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

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

Issue 23684059: Polymorphic inlining of [] operations. (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
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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 3750 matching lines...) Expand 10 before | Expand all | Expand 10 after
3761 3761
3762 FlowGraph* FlowGraphBuilder::BuildGraph() { 3762 FlowGraph* FlowGraphBuilder::BuildGraph() {
3763 if (FLAG_print_ast) { 3763 if (FLAG_print_ast) {
3764 // Print the function ast before IL generation. 3764 // Print the function ast before IL generation.
3765 AstPrinter::PrintFunctionNodes(*parsed_function()); 3765 AstPrinter::PrintFunctionNodes(*parsed_function());
3766 } 3766 }
3767 const Function& function = parsed_function()->function(); 3767 const Function& function = parsed_function()->function();
3768 TargetEntryInstr* normal_entry = 3768 TargetEntryInstr* normal_entry =
3769 new TargetEntryInstr(AllocateBlockId(), 3769 new TargetEntryInstr(AllocateBlockId(),
3770 CatchClauseNode::kInvalidTryIndex); 3770 CatchClauseNode::kInvalidTryIndex);
3771 graph_entry_ = new GraphEntryInstr(*parsed_function(), normal_entry, osr_id_); 3771 graph_entry_ = new GraphEntryInstr(parsed_function(), normal_entry, osr_id_);
3772 EffectGraphVisitor for_effect(this, 0); 3772 EffectGraphVisitor for_effect(this, 0);
3773 // This check may be deleted if the generated code is leaf. 3773 // This check may be deleted if the generated code is leaf.
3774 // Native functions don't need a stack check at entry. 3774 // Native functions don't need a stack check at entry.
3775 if (!function.is_native()) { 3775 if (!function.is_native()) {
3776 CheckStackOverflowInstr* check = 3776 CheckStackOverflowInstr* check =
3777 new CheckStackOverflowInstr(function.token_pos(), 0); 3777 new CheckStackOverflowInstr(function.token_pos(), 0);
3778 // If we are inlining don't actually attach the stack check. We must still 3778 // If we are inlining don't actually attach the stack check. We must still
3779 // create the stack check in order to allocate a deopt id. 3779 // create the stack check in order to allocate a deopt id.
3780 if (!IsInlining()) for_effect.AddInstruction(check); 3780 if (!IsInlining()) for_effect.AddInstruction(check);
3781 } 3781 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3814 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3814 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3815 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3815 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3816 OS::SNPrint(chars, len, kFormat, function_name, reason); 3816 OS::SNPrint(chars, len, kFormat, function_name, reason);
3817 const Error& error = Error::Handle( 3817 const Error& error = Error::Handle(
3818 LanguageError::New(String::Handle(String::New(chars)))); 3818 LanguageError::New(String::Handle(String::New(chars))));
3819 Isolate::Current()->long_jump_base()->Jump(1, error); 3819 Isolate::Current()->long_jump_base()->Jump(1, error);
3820 } 3820 }
3821 3821
3822 3822
3823 } // namespace dart 3823 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698