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

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

Issue 9559012: Adding Native Call node : a native function consists of that node, it does call into C runtime. In … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | runtime/vm/flow_graph_compiler_x64.cc » ('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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 Bailout("EffectGraphVisitor::VisitStaticGetterNode"); 454 Bailout("EffectGraphVisitor::VisitStaticGetterNode");
455 } 455 }
456 456
457 457
458 void EffectGraphVisitor::VisitStaticSetterNode(StaticSetterNode* node) { 458 void EffectGraphVisitor::VisitStaticSetterNode(StaticSetterNode* node) {
459 Bailout("EffectGraphVisitor::VisitStaticSetterNode"); 459 Bailout("EffectGraphVisitor::VisitStaticSetterNode");
460 } 460 }
461 461
462 462
463 void EffectGraphVisitor::VisitNativeBodyNode(NativeBodyNode* node) { 463 void EffectGraphVisitor::VisitNativeBodyNode(NativeBodyNode* node) {
464 Bailout("EffectGraphVisitor::VisitNativeBodyNode"); 464 NativeCallComp* native_call = new NativeCallComp(node);
465 ReturnComputation(native_call);
465 } 466 }
466 467
467 468
468 void EffectGraphVisitor::VisitPrimaryNode(PrimaryNode* node) { 469 void EffectGraphVisitor::VisitPrimaryNode(PrimaryNode* node) {
469 Bailout("EffectGraphVisitor::VisitPrimaryNode"); 470 Bailout("EffectGraphVisitor::VisitPrimaryNode");
470 } 471 }
471 472
472 473
473 // <Expression> ::= LoadLocal { local: LocalVariable } 474 // <Expression> ::= LoadLocal { local: LocalVariable }
474 void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) { 475 void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 } 675 }
675 676
676 677
677 void FlowGraphPrinter::VisitStoreLocal(StoreLocalComp* comp) { 678 void FlowGraphPrinter::VisitStoreLocal(StoreLocalComp* comp) {
678 OS::Print("StoreLocal(%s, ", comp->local().name().ToCString()); 679 OS::Print("StoreLocal(%s, ", comp->local().name().ToCString());
679 comp->value()->Accept(this); 680 comp->value()->Accept(this);
680 OS::Print(")"); 681 OS::Print(")");
681 } 682 }
682 683
683 684
685 void FlowGraphPrinter::VisitNativeCall(NativeCallComp* comp) {
686 OS::Print("NativeCall(%s)", comp->native_name().ToCString());
687 }
688
689
684 void FlowGraphPrinter::VisitJoinEntry(JoinEntryInstr* instr) { 690 void FlowGraphPrinter::VisitJoinEntry(JoinEntryInstr* instr) {
685 OS::Print("%2d: [join]", instr->block_number()); 691 OS::Print("%2d: [join]", instr->block_number());
686 } 692 }
687 693
688 694
689 void FlowGraphPrinter::VisitTargetEntry(TargetEntryInstr* instr) { 695 void FlowGraphPrinter::VisitTargetEntry(TargetEntryInstr* instr) {
690 OS::Print("%2d: [target]", instr->block_number()); 696 OS::Print("%2d: [target]", instr->block_number());
691 } 697 }
692 698
693 699
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 char* chars = reinterpret_cast<char*>( 752 char* chars = reinterpret_cast<char*>(
747 Isolate::Current()->current_zone()->Allocate(len)); 753 Isolate::Current()->current_zone()->Allocate(len));
748 OS::SNPrint(chars, len, kFormat, function_name, reason); 754 OS::SNPrint(chars, len, kFormat, function_name, reason);
749 const Error& error = Error::Handle( 755 const Error& error = Error::Handle(
750 LanguageError::New(String::Handle(String::New(chars)))); 756 LanguageError::New(String::Handle(String::New(chars))));
751 Isolate::Current()->long_jump_base()->Jump(1, error); 757 Isolate::Current()->long_jump_base()->Jump(1, error);
752 } 758 }
753 759
754 760
755 } // namespace dart 761 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698