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

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

Issue 10431006: First step toward an optimizing compiler: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 exit()->SetSuccessor(other_fragment.entry()); 52 exit()->SetSuccessor(other_fragment.entry());
53 exit_ = other_fragment.exit(); 53 exit_ = other_fragment.exit();
54 } 54 }
55 temp_index_ = other_fragment.temp_index(); 55 temp_index_ = other_fragment.temp_index();
56 } 56 }
57 57
58 58
59 void EffectGraphVisitor::AddInstruction(Instruction* instruction) { 59 void EffectGraphVisitor::AddInstruction(Instruction* instruction) {
60 ASSERT(is_open()); 60 ASSERT(is_open());
61 DeallocateTempIndex(instruction->InputCount()); 61 DeallocateTempIndex(instruction->InputCount());
62 if (instruction->IsDefinition()) { 62 if (instruction->IsBindInstr()) {
63 instruction->AsDefinition()->set_temp_index(AllocateTempIndex()); 63 instruction->AsBindInstr()->set_temp_index(AllocateTempIndex());
64 } 64 }
65 if (is_empty()) { 65 if (is_empty()) {
66 entry_ = exit_ = instruction; 66 entry_ = exit_ = instruction;
67 } else { 67 } else {
68 exit()->SetSuccessor(instruction); 68 exit()->SetSuccessor(instruction);
69 exit_ = instruction; 69 exit_ = instruction;
70 } 70 }
71 } 71 }
72 72
73 73
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 ASSERT(instantiator_class.NumTypeParameters() > 0); 593 ASSERT(instantiator_class.NumTypeParameters() > 0);
594 instantiator = BuildInstantiator(); 594 instantiator = BuildInstantiator();
595 if (instantiator == NULL) { 595 if (instantiator == NULL) {
596 // No instantiator when inside factory. 596 // No instantiator when inside factory.
597 instantiator_type_arguments = 597 instantiator_type_arguments =
598 BuildInstantiatorTypeArguments(token_index, NULL); 598 BuildInstantiatorTypeArguments(token_index, NULL);
599 } else { 599 } else {
600 // Preserve instantiator. 600 // Preserve instantiator.
601 const LocalVariable& expr_temp = 601 const LocalVariable& expr_temp =
602 *owner()->parsed_function().expression_temp_var(); 602 *owner()->parsed_function().expression_temp_var();
603 Definition* saved = 603 BindInstr* saved =
604 new BindInstr(BuildStoreLocal(expr_temp, instantiator)); 604 new BindInstr(BuildStoreLocal(expr_temp, instantiator));
605 AddInstruction(saved); 605 AddInstruction(saved);
606 instantiator = new UseVal(saved); 606 instantiator = new UseVal(saved);
607 Definition* loaded = new BindInstr(BuildLoadLocal(expr_temp)); 607 BindInstr* loaded = new BindInstr(BuildLoadLocal(expr_temp));
608 AddInstruction(loaded); 608 AddInstruction(loaded);
609 instantiator_type_arguments = 609 instantiator_type_arguments =
610 BuildInstantiatorTypeArguments(token_index, new UseVal(loaded)); 610 BuildInstantiatorTypeArguments(token_index, new UseVal(loaded));
611 } 611 }
612 *instantiator_result = instantiator; 612 *instantiator_result = instantiator;
613 *instantiator_type_arguments_result = instantiator_type_arguments; 613 *instantiator_type_arguments_result = instantiator_type_arguments;
614 } 614 }
615 615
616 616
617 // Used for testing incoming arguments. 617 // Used for testing incoming arguments.
(...skipping 25 matching lines...) Expand all
643 Value* value, 643 Value* value,
644 const AbstractType& dst_type, 644 const AbstractType& dst_type,
645 const String& dst_name) { 645 const String& dst_name) {
646 if (CanSkipTypeCheck(value, dst_type)) { 646 if (CanSkipTypeCheck(value, dst_type)) {
647 return value; 647 return value;
648 } 648 }
649 AssertAssignableComp* comp = BuildAssertAssignable(token_index, 649 AssertAssignableComp* comp = BuildAssertAssignable(token_index,
650 value, 650 value,
651 dst_type, 651 dst_type,
652 dst_name); 652 dst_name);
653 Definition* assert_assignable = new BindInstr(comp); 653 BindInstr* assert_assignable = new BindInstr(comp);
654 AddInstruction(assert_assignable); 654 AddInstruction(assert_assignable);
655 return new UseVal(assert_assignable); 655 return new UseVal(assert_assignable);
656 } 656 }
657 657
658 658
659 void EffectGraphVisitor::BuildInstanceOf(ComparisonNode* node) { 659 void EffectGraphVisitor::BuildInstanceOf(ComparisonNode* node) {
660 ASSERT(Token::IsInstanceofOperator(node->kind())); 660 ASSERT(Token::IsInstanceofOperator(node->kind()));
661 EffectGraphVisitor for_left_value(owner(), temp_index()); 661 EffectGraphVisitor for_left_value(owner(), temp_index());
662 node->left()->Visit(&for_left_value); 662 node->left()->Visit(&for_left_value);
663 Append(for_left_value); 663 Append(for_left_value);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 Append(for_left_value); 764 Append(for_left_value);
765 ValueGraphVisitor for_right_value(owner(), temp_index()); 765 ValueGraphVisitor for_right_value(owner(), temp_index());
766 node->right()->Visit(&for_right_value); 766 node->right()->Visit(&for_right_value);
767 Append(for_right_value); 767 Append(for_right_value);
768 EqualityCompareComp* comp = new EqualityCompareComp( 768 EqualityCompareComp* comp = new EqualityCompareComp(
769 node->token_index(), owner()->try_index(), 769 node->token_index(), owner()->try_index(),
770 for_left_value.value(), for_right_value.value()); 770 for_left_value.value(), for_right_value.value());
771 if (node->kind() == Token::kEQ) { 771 if (node->kind() == Token::kEQ) {
772 ReturnComputation(comp); 772 ReturnComputation(comp);
773 } else { 773 } else {
774 Definition* eq_result = new BindInstr(comp); 774 BindInstr* eq_result = new BindInstr(comp);
775 AddInstruction(eq_result); 775 AddInstruction(eq_result);
776 if (FLAG_enable_type_checks) { 776 if (FLAG_enable_type_checks) {
777 eq_result = 777 eq_result =
778 new BindInstr(new AssertBooleanComp(node->token_index(), 778 new BindInstr(new AssertBooleanComp(node->token_index(),
779 owner()->try_index(), 779 owner()->try_index(),
780 new UseVal(eq_result))); 780 new UseVal(eq_result)));
781 AddInstruction(eq_result); 781 AddInstruction(eq_result);
782 } 782 }
783 BooleanNegateComp* negate = new BooleanNegateComp(new UseVal(eq_result)); 783 BooleanNegateComp* negate = new BooleanNegateComp(new UseVal(eq_result));
784 ReturnComputation(negate); 784 ReturnComputation(negate);
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 AddInstruction(context); 1419 AddInstruction(context);
1420 BindInstr* clone = 1420 BindInstr* clone =
1421 new BindInstr(new CloneContextComp(node->token_index(), 1421 new BindInstr(new CloneContextComp(node->token_index(),
1422 owner()->try_index(), 1422 owner()->try_index(),
1423 new UseVal(context))); 1423 new UseVal(context)));
1424 AddInstruction(clone); 1424 AddInstruction(clone);
1425 ReturnComputation(new StoreContextComp(new UseVal(clone))); 1425 ReturnComputation(new StoreContextComp(new UseVal(clone)));
1426 } 1426 }
1427 1427
1428 1428
1429 Definition* EffectGraphVisitor::BuildObjectAllocation( 1429 BindInstr* EffectGraphVisitor::BuildObjectAllocation(
1430 ConstructorCallNode* node) { 1430 ConstructorCallNode* node) {
1431 const Class& cls = Class::ZoneHandle(node->constructor().owner()); 1431 const Class& cls = Class::ZoneHandle(node->constructor().owner());
1432 const bool requires_type_arguments = cls.HasTypeArguments(); 1432 const bool requires_type_arguments = cls.HasTypeArguments();
1433 1433
1434 ZoneGrowableArray<Value*>* allocate_arguments = 1434 ZoneGrowableArray<Value*>* allocate_arguments =
1435 new ZoneGrowableArray<Value*>(); 1435 new ZoneGrowableArray<Value*>();
1436 if (requires_type_arguments) { 1436 if (requires_type_arguments) {
1437 BuildConstructorTypeArguments(node, allocate_arguments); 1437 BuildConstructorTypeArguments(node, allocate_arguments);
1438 } 1438 }
1439 // In checked mode, if the type arguments are uninstantiated, they may need to 1439 // In checked mode, if the type arguments are uninstantiated, they may need to
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 factory_arguments); 1505 factory_arguments);
1506 ReturnComputation(call); 1506 ReturnComputation(call);
1507 return; 1507 return;
1508 } 1508 }
1509 // t_n contains the allocated and initialized object. 1509 // t_n contains the allocated and initialized object.
1510 // t_n <- AllocateObject(class) 1510 // t_n <- AllocateObject(class)
1511 // t_n+1 <- ctor-arg 1511 // t_n+1 <- ctor-arg
1512 // t_n+2... <- constructor arguments start here 1512 // t_n+2... <- constructor arguments start here
1513 // StaticCall(constructor, t_n+1, t_n+2, ...) 1513 // StaticCall(constructor, t_n+1, t_n+2, ...)
1514 // No need to preserve allocated value (simpler than in ValueGraphVisitor). 1514 // No need to preserve allocated value (simpler than in ValueGraphVisitor).
1515 Definition* allocate = BuildObjectAllocation(node); 1515 BindInstr* allocate = BuildObjectAllocation(node);
1516 BuildConstructorCall(node, new UseVal(allocate)); 1516 BuildConstructorCall(node, new UseVal(allocate));
1517 } 1517 }
1518 1518
1519 1519
1520 Value* EffectGraphVisitor::BuildInstantiator() { 1520 Value* EffectGraphVisitor::BuildInstantiator() {
1521 const Class& instantiator_class = Class::Handle( 1521 const Class& instantiator_class = Class::Handle(
1522 owner()->parsed_function().function().owner()); 1522 owner()->parsed_function().function().owner());
1523 if (instantiator_class.NumTypeParameters() == 0) { 1523 if (instantiator_class.NumTypeParameters() == 0) {
1524 return NULL; 1524 return NULL;
1525 } 1525 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 BindInstr* load = 1587 BindInstr* load =
1588 new BindInstr(new NativeLoadFieldComp( 1588 new BindInstr(new NativeLoadFieldComp(
1589 instantiator, 1589 instantiator,
1590 type_arguments_instance_field_offset, 1590 type_arguments_instance_field_offset,
1591 Type::ZoneHandle())); // Not an instance, no type. 1591 Type::ZoneHandle())); // Not an instance, no type.
1592 AddInstruction(load); 1592 AddInstruction(load);
1593 return new UseVal(load); 1593 return new UseVal(load);
1594 } 1594 }
1595 1595
1596 1596
1597 Definition* EffectGraphVisitor::BuildInstantiatedTypeArguments( 1597 BindInstr* EffectGraphVisitor::BuildInstantiatedTypeArguments(
1598 intptr_t token_index, 1598 intptr_t token_index,
1599 const AbstractTypeArguments& type_arguments) { 1599 const AbstractTypeArguments& type_arguments) {
1600 if (type_arguments.IsNull() || type_arguments.IsInstantiated()) { 1600 if (type_arguments.IsNull() || type_arguments.IsInstantiated()) {
1601 BindInstr* type_args = 1601 BindInstr* type_args =
1602 new BindInstr(new ConstantVal(type_arguments)); 1602 new BindInstr(new ConstantVal(type_arguments));
1603 AddInstruction(type_args); 1603 AddInstruction(type_args);
1604 return type_args; 1604 return type_args;
1605 } 1605 }
1606 // The type arguments are uninstantiated. 1606 // The type arguments are uninstantiated.
1607 Value* instantiator_value = 1607 Value* instantiator_value =
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 // t_n <- t2 1643 // t_n <- t2
1644 // t_n+1 <- t1 1644 // t_n+1 <- t1
1645 // Use expression_temp_var and node->allocated_object_var() locals to keep 1645 // Use expression_temp_var and node->allocated_object_var() locals to keep
1646 // intermediate results around (t1 and t2 above). 1646 // intermediate results around (t1 and t2 above).
1647 ASSERT(owner()->parsed_function().expression_temp_var() != NULL); 1647 ASSERT(owner()->parsed_function().expression_temp_var() != NULL);
1648 const LocalVariable& t1 = *owner()->parsed_function().expression_temp_var(); 1648 const LocalVariable& t1 = *owner()->parsed_function().expression_temp_var();
1649 const LocalVariable& t2 = node->allocated_object_var(); 1649 const LocalVariable& t2 = node->allocated_object_var();
1650 Value* instantiator_type_arguments = BuildInstantiatorTypeArguments( 1650 Value* instantiator_type_arguments = BuildInstantiatorTypeArguments(
1651 node->token_index(), NULL); 1651 node->token_index(), NULL);
1652 ASSERT(instantiator_type_arguments->IsUse()); 1652 ASSERT(instantiator_type_arguments->IsUse());
1653 Definition* stored_instantiator = new BindInstr( 1653 BindInstr* stored_instantiator = new BindInstr(
1654 BuildStoreLocal(t1, instantiator_type_arguments)); 1654 BuildStoreLocal(t1, instantiator_type_arguments));
1655 AddInstruction(stored_instantiator); 1655 AddInstruction(stored_instantiator);
1656 // t1: instantiator type arguments. 1656 // t1: instantiator type arguments.
1657 1657
1658 BindInstr* extract_type_arguments = new BindInstr( 1658 BindInstr* extract_type_arguments = new BindInstr(
1659 new ExtractConstructorTypeArgumentsComp( 1659 new ExtractConstructorTypeArgumentsComp(
1660 node->token_index(), 1660 node->token_index(),
1661 owner()->try_index(), 1661 owner()->try_index(),
1662 node->type_arguments(), 1662 node->type_arguments(),
1663 new UseVal(stored_instantiator))); 1663 new UseVal(stored_instantiator)));
1664 AddInstruction(extract_type_arguments); 1664 AddInstruction(extract_type_arguments);
1665 1665
1666 Instruction* stored_type_arguments = new DoInstr( 1666 Instruction* stored_type_arguments = new DoInstr(
1667 BuildStoreLocal(t2, new UseVal(extract_type_arguments))); 1667 BuildStoreLocal(t2, new UseVal(extract_type_arguments)));
1668 AddInstruction(stored_type_arguments); 1668 AddInstruction(stored_type_arguments);
1669 // t2: extracted constructor type arguments. 1669 // t2: extracted constructor type arguments.
1670 Definition* load_instantiator = new BindInstr(BuildLoadLocal(t1)); 1670 BindInstr* load_instantiator = new BindInstr(BuildLoadLocal(t1));
1671 AddInstruction(load_instantiator); 1671 AddInstruction(load_instantiator);
1672 1672
1673 BindInstr* extract_instantiator = 1673 BindInstr* extract_instantiator =
1674 new BindInstr(new ExtractConstructorInstantiatorComp( 1674 new BindInstr(new ExtractConstructorInstantiatorComp(
1675 node, 1675 node,
1676 new UseVal(load_instantiator))); 1676 new UseVal(load_instantiator)));
1677 AddInstruction(extract_instantiator); 1677 AddInstruction(extract_instantiator);
1678 AddInstruction(new DoInstr( 1678 AddInstruction(new DoInstr(
1679 BuildStoreLocal(t1, new UseVal(extract_instantiator)))); 1679 BuildStoreLocal(t1, new UseVal(extract_instantiator))));
1680 // t2: extracted constructor type arguments. 1680 // t2: extracted constructor type arguments.
1681 // t1: extracted constructor instantiator. 1681 // t1: extracted constructor instantiator.
1682 Definition* load_0 = new BindInstr(BuildLoadLocal(t2)); 1682 BindInstr* load_0 = new BindInstr(BuildLoadLocal(t2));
1683 AddInstruction(load_0); 1683 AddInstruction(load_0);
1684 Definition* load_1 = new BindInstr(BuildLoadLocal(t1)); 1684 BindInstr* load_1 = new BindInstr(BuildLoadLocal(t1));
1685 AddInstruction(load_1); 1685 AddInstruction(load_1);
1686 args->Add(new UseVal(load_0)); 1686 args->Add(new UseVal(load_0));
1687 args->Add(new UseVal(load_1)); 1687 args->Add(new UseVal(load_1));
1688 } 1688 }
1689 1689
1690 1690
1691 void ValueGraphVisitor::VisitConstructorCallNode(ConstructorCallNode* node) { 1691 void ValueGraphVisitor::VisitConstructorCallNode(ConstructorCallNode* node) {
1692 if (node->constructor().IsFactory()) { 1692 if (node->constructor().IsFactory()) {
1693 EffectGraphVisitor::VisitConstructorCallNode(node); 1693 EffectGraphVisitor::VisitConstructorCallNode(node);
1694 return; 1694 return;
1695 } 1695 }
1696 1696
1697 // t_n contains the allocated and initialized object. 1697 // t_n contains the allocated and initialized object.
1698 // t_n <- AllocateObject(class) 1698 // t_n <- AllocateObject(class)
1699 // t_n <- StoreLocal(temp, t_n); 1699 // t_n <- StoreLocal(temp, t_n);
1700 // t_n+1 <- ctor-arg 1700 // t_n+1 <- ctor-arg
1701 // t_n+2... <- constructor arguments start here 1701 // t_n+2... <- constructor arguments start here
1702 // StaticCall(constructor, t_n, t_n+1, ...) 1702 // StaticCall(constructor, t_n, t_n+1, ...)
1703 // tn <- LoadLocal(temp) 1703 // tn <- LoadLocal(temp)
1704 1704
1705 Definition* allocate = BuildObjectAllocation(node); 1705 BindInstr* allocate = BuildObjectAllocation(node);
1706 Computation* store_allocated = BuildStoreLocal( 1706 Computation* store_allocated = BuildStoreLocal(
1707 node->allocated_object_var(), 1707 node->allocated_object_var(),
1708 new UseVal(allocate)); 1708 new UseVal(allocate));
1709 Definition* allocated_value = new BindInstr(store_allocated); 1709 BindInstr* allocated_value = new BindInstr(store_allocated);
1710 AddInstruction(allocated_value); 1710 AddInstruction(allocated_value);
1711 BuildConstructorCall(node, new UseVal(allocated_value)); 1711 BuildConstructorCall(node, new UseVal(allocated_value));
1712 Computation* load_allocated = BuildLoadLocal( 1712 Computation* load_allocated = BuildLoadLocal(
1713 node->allocated_object_var()); 1713 node->allocated_object_var());
1714 allocated_value = new BindInstr(load_allocated); 1714 allocated_value = new BindInstr(load_allocated);
1715 AddInstruction(allocated_value); 1715 AddInstruction(allocated_value);
1716 ReturnValue(new UseVal(allocated_value)); 1716 ReturnValue(new UseVal(allocated_value));
1717 } 1717 }
1718 1718
1719 1719
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 } 2216 }
2217 } 2217 }
2218 2218
2219 2219
2220 void FlowGraphBuilder::BuildGraph(bool for_optimized) { 2220 void FlowGraphBuilder::BuildGraph(bool for_optimized) {
2221 if (FLAG_print_ast) { 2221 if (FLAG_print_ast) {
2222 // Print the function ast before IL generation. 2222 // Print the function ast before IL generation.
2223 AstPrinter::PrintFunctionNodes(parsed_function()); 2223 AstPrinter::PrintFunctionNodes(parsed_function());
2224 } 2224 }
2225 // Compilation can be nested, preserve the computation-id. 2225 // Compilation can be nested, preserve the computation-id.
2226 Isolate* isolate = Isolate::Current();
2227 const intptr_t prev_cid = isolate->computation_id();
2228 isolate->set_computation_id(0);
2229 const Function& function = parsed_function().function(); 2226 const Function& function = parsed_function().function();
2230 TargetEntryInstr* normal_entry = new TargetEntryInstr(); 2227 TargetEntryInstr* normal_entry = new TargetEntryInstr();
2231 graph_entry_ = new GraphEntryInstr(normal_entry); 2228 graph_entry_ = new GraphEntryInstr(normal_entry);
2232 EffectGraphVisitor for_effect(this, 0); 2229 EffectGraphVisitor for_effect(this, 0);
2233 for_effect.AddInstruction(normal_entry); 2230 for_effect.AddInstruction(normal_entry);
2234 parsed_function().node_sequence()->Visit(&for_effect); 2231 parsed_function().node_sequence()->Visit(&for_effect);
2235 // Check that the graph is properly terminated. 2232 // Check that the graph is properly terminated.
2236 ASSERT(!for_effect.is_open()); 2233 ASSERT(!for_effect.is_open());
2237 GrowableArray<intptr_t> parent; 2234 GrowableArray<intptr_t> parent;
2238 GrowableArray<BitVector*> assigned_vars; 2235 GrowableArray<BitVector*> assigned_vars;
(...skipping 10 matching lines...) Expand all
2249 variable_count); 2246 variable_count);
2250 // Number blocks in reverse postorder. 2247 // Number blocks in reverse postorder.
2251 intptr_t block_count = postorder_block_entries_.length(); 2248 intptr_t block_count = postorder_block_entries_.length();
2252 for (intptr_t i = 0; i < block_count; ++i) { 2249 for (intptr_t i = 0; i < block_count; ++i) {
2253 postorder_block_entries_[i]->set_block_id(block_count - i - 1); 2250 postorder_block_entries_[i]->set_block_id(block_count - i - 1);
2254 } 2251 }
2255 if (for_optimized) { 2252 if (for_optimized) {
2256 GrowableArray<BitVector*> dominance_frontier; 2253 GrowableArray<BitVector*> dominance_frontier;
2257 ComputeDominators(&preorder_block_entries_, &parent, &dominance_frontier); 2254 ComputeDominators(&preorder_block_entries_, &parent, &dominance_frontier);
2258 } 2255 }
2259 isolate->set_computation_id(prev_cid);
2260 if (FLAG_print_flow_graph) { 2256 if (FLAG_print_flow_graph) {
2261 intptr_t length = postorder_block_entries_.length(); 2257 intptr_t length = postorder_block_entries_.length();
2262 GrowableArray<BlockEntryInstr*> reverse_postorder(length); 2258 GrowableArray<BlockEntryInstr*> reverse_postorder(length);
2263 for (intptr_t i = length - 1; i >= 0; --i) { 2259 for (intptr_t i = length - 1; i >= 0; --i) {
2264 reverse_postorder.Add(postorder_block_entries_[i]); 2260 reverse_postorder.Add(postorder_block_entries_[i]);
2265 } 2261 }
2266 FlowGraphPrinter printer(function, reverse_postorder); 2262 FlowGraphPrinter printer(function, reverse_postorder);
2267 printer.PrintBlocks(); 2263 printer.PrintBlocks();
2268 } 2264 }
2269 } 2265 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 char* chars = reinterpret_cast<char*>( 2395 char* chars = reinterpret_cast<char*>(
2400 Isolate::Current()->current_zone()->Allocate(len)); 2396 Isolate::Current()->current_zone()->Allocate(len));
2401 OS::SNPrint(chars, len, kFormat, function_name, reason); 2397 OS::SNPrint(chars, len, kFormat, function_name, reason);
2402 const Error& error = Error::Handle( 2398 const Error& error = Error::Handle(
2403 LanguageError::New(String::Handle(String::New(chars)))); 2399 LanguageError::New(String::Handle(String::New(chars))));
2404 Isolate::Current()->long_jump_base()->Jump(1, error); 2400 Isolate::Current()->long_jump_base()->Jump(1, error);
2405 } 2401 }
2406 2402
2407 2403
2408 } // namespace dart 2404 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698