| OLD | NEW |
| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 Goto(join); | 192 Goto(join); |
| 193 body_exit->Goto(join); | 193 body_exit->Goto(join); |
| 194 } | 194 } |
| 195 | 195 |
| 196 // 3. Set the exit to the graph to be the false successor of the test, a | 196 // 3. Set the exit to the graph to be the false successor of the test, a |
| 197 // fresh target node | 197 // fresh target node |
| 198 exit_ = *test_fragment.false_successor_address() = new TargetEntryInstr(); | 198 exit_ = *test_fragment.false_successor_address() = new TargetEntryInstr(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 | 201 |
| 202 PushArgumentInstr* EffectGraphVisitor::PushArgument(Value* value) { |
| 203 PushArgumentInstr* result = new PushArgumentInstr(value); |
| 204 AddInstruction(result); |
| 205 return result; |
| 206 } |
| 207 |
| 208 |
| 202 Computation* EffectGraphVisitor::BuildStoreLocal( | 209 Computation* EffectGraphVisitor::BuildStoreLocal( |
| 203 const LocalVariable& local, Value* value) { | 210 const LocalVariable& local, Value* value) { |
| 204 if (local.is_captured()) { | 211 if (local.is_captured()) { |
| 205 intptr_t delta = owner()->context_level() - | 212 intptr_t delta = owner()->context_level() - |
| 206 local.owner()->context_level(); | 213 local.owner()->context_level(); |
| 207 ASSERT(delta >= 0); | 214 ASSERT(delta >= 0); |
| 208 Value* context = Bind(new CurrentContextComp()); | 215 Value* context = Bind(new CurrentContextComp()); |
| 209 while (delta-- > 0) { | 216 while (delta-- > 0) { |
| 210 context = Bind(new LoadVMFieldComp( | 217 context = Bind(new LoadVMFieldComp( |
| 211 context, Context::parent_offset(), Type::ZoneHandle())); | 218 context, Context::parent_offset(), Type::ZoneHandle())); |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 } | 1368 } |
| 1362 receiver = BuildNullValue(); | 1369 receiver = BuildNullValue(); |
| 1363 } else if (function.IsImplicitInstanceClosureFunction()) { | 1370 } else if (function.IsImplicitInstanceClosureFunction()) { |
| 1364 ValueGraphVisitor for_receiver(owner(), temp_index()); | 1371 ValueGraphVisitor for_receiver(owner(), temp_index()); |
| 1365 node->receiver()->Visit(&for_receiver); | 1372 node->receiver()->Visit(&for_receiver); |
| 1366 Append(for_receiver); | 1373 Append(for_receiver); |
| 1367 receiver = for_receiver.value(); | 1374 receiver = for_receiver.value(); |
| 1368 } else { | 1375 } else { |
| 1369 receiver = BuildNullValue(); | 1376 receiver = BuildNullValue(); |
| 1370 } | 1377 } |
| 1371 PushArgumentInstr* push_receiver = new PushArgumentInstr(receiver); | 1378 PushArgumentInstr* push_receiver = PushArgument(receiver); |
| 1372 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1379 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1373 new ZoneGrowableArray<PushArgumentInstr*>(2); | 1380 new ZoneGrowableArray<PushArgumentInstr*>(2); |
| 1374 arguments->Add(push_receiver); | 1381 arguments->Add(push_receiver); |
| 1375 AddInstruction(push_receiver); | |
| 1376 ASSERT(function.context_scope() != ContextScope::null()); | 1382 ASSERT(function.context_scope() != ContextScope::null()); |
| 1377 | 1383 |
| 1378 // The function type of a closure may have type arguments. In that case, pass | 1384 // The function type of a closure may have type arguments. In that case, pass |
| 1379 // the type arguments of the instantiator. Otherwise, pass null object. | 1385 // the type arguments of the instantiator. Otherwise, pass null object. |
| 1380 const Class& cls = Class::Handle(function.signature_class()); | 1386 const Class& cls = Class::Handle(function.signature_class()); |
| 1381 ASSERT(!cls.IsNull()); | 1387 ASSERT(!cls.IsNull()); |
| 1382 const bool requires_type_arguments = cls.HasTypeArguments(); | 1388 const bool requires_type_arguments = cls.HasTypeArguments(); |
| 1383 Value* type_arguments = NULL; | 1389 Value* type_arguments = NULL; |
| 1384 if (requires_type_arguments) { | 1390 if (requires_type_arguments) { |
| 1385 ASSERT(!function.IsImplicitStaticClosureFunction()); | 1391 ASSERT(!function.IsImplicitStaticClosureFunction()); |
| 1386 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL); | 1392 type_arguments = BuildInstantiatorTypeArguments(node->token_pos(), NULL); |
| 1387 } else { | 1393 } else { |
| 1388 type_arguments = BuildNullValue(); | 1394 type_arguments = BuildNullValue(); |
| 1389 } | 1395 } |
| 1390 PushArgumentInstr* push_type_arguments = | 1396 PushArgumentInstr* push_type_arguments = PushArgument(type_arguments); |
| 1391 new PushArgumentInstr(type_arguments); | |
| 1392 arguments->Add(push_type_arguments); | 1397 arguments->Add(push_type_arguments); |
| 1393 AddInstruction(push_type_arguments); | |
| 1394 ReturnComputation( | 1398 ReturnComputation( |
| 1395 new CreateClosureComp(node, owner()->try_index(), arguments)); | 1399 new CreateClosureComp(node, owner()->try_index(), arguments)); |
| 1396 } | 1400 } |
| 1397 | 1401 |
| 1398 | 1402 |
| 1399 void EffectGraphVisitor::TranslateArgumentList( | 1403 void EffectGraphVisitor::TranslateArgumentList( |
| 1400 const ArgumentListNode& node, | 1404 const ArgumentListNode& node, |
| 1401 ZoneGrowableArray<Value*>* values) { | 1405 ZoneGrowableArray<Value*>* values) { |
| 1402 for (intptr_t i = 0; i < node.length(); ++i) { | 1406 for (intptr_t i = 0; i < node.length(); ++i) { |
| 1403 ValueGraphVisitor for_argument(owner(), temp_index()); | 1407 ValueGraphVisitor for_argument(owner(), temp_index()); |
| 1404 node.NodeAt(i)->Visit(&for_argument); | 1408 node.NodeAt(i)->Visit(&for_argument); |
| 1405 Append(for_argument); | 1409 Append(for_argument); |
| 1406 values->Add(for_argument.value()); | 1410 values->Add(for_argument.value()); |
| 1407 } | 1411 } |
| 1408 } | 1412 } |
| 1409 | 1413 |
| 1410 | 1414 |
| 1411 void EffectGraphVisitor::BuildPushArguments( | 1415 void EffectGraphVisitor::BuildPushArguments( |
| 1412 const ArgumentListNode& node, | 1416 const ArgumentListNode& node, |
| 1413 ZoneGrowableArray<PushArgumentInstr*>* values) { | 1417 ZoneGrowableArray<PushArgumentInstr*>* values) { |
| 1414 for (intptr_t i = 0; i < node.length(); ++i) { | 1418 for (intptr_t i = 0; i < node.length(); ++i) { |
| 1415 ValueGraphVisitor for_argument(owner(), temp_index()); | 1419 ValueGraphVisitor for_argument(owner(), temp_index()); |
| 1416 node.NodeAt(i)->Visit(&for_argument); | 1420 node.NodeAt(i)->Visit(&for_argument); |
| 1417 Append(for_argument); | 1421 Append(for_argument); |
| 1418 PushArgumentInstr* push_arg = new PushArgumentInstr(for_argument.value()); | 1422 PushArgumentInstr* push_arg = PushArgument(for_argument.value()); |
| 1419 AddInstruction(push_arg); | |
| 1420 values->Add(push_arg); | 1423 values->Add(push_arg); |
| 1421 } | 1424 } |
| 1422 } | 1425 } |
| 1423 | 1426 |
| 1424 | 1427 |
| 1425 void EffectGraphVisitor::VisitInstanceCallNode(InstanceCallNode* node) { | 1428 void EffectGraphVisitor::VisitInstanceCallNode(InstanceCallNode* node) { |
| 1426 ArgumentListNode* arguments = node->arguments(); | 1429 ArgumentListNode* arguments = node->arguments(); |
| 1427 int length = arguments->length(); | 1430 int length = arguments->length(); |
| 1428 ZoneGrowableArray<Value*>* values = new ZoneGrowableArray<Value*>(length + 1); | 1431 ZoneGrowableArray<Value*>* values = new ZoneGrowableArray<Value*>(length + 1); |
| 1429 | 1432 |
| 1430 ValueGraphVisitor for_receiver(owner(), temp_index()); | 1433 ValueGraphVisitor for_receiver(owner(), temp_index()); |
| 1431 node->receiver()->Visit(&for_receiver); | 1434 node->receiver()->Visit(&for_receiver); |
| 1432 Append(for_receiver); | 1435 Append(for_receiver); |
| 1433 values->Add(for_receiver.value()); | 1436 values->Add(for_receiver.value()); |
| 1434 | 1437 |
| 1435 TranslateArgumentList(*arguments, values); | 1438 TranslateArgumentList(*arguments, values); |
| 1436 InstanceCallComp* call = new InstanceCallComp( | 1439 InstanceCallComp* call = new InstanceCallComp( |
| 1437 node->token_pos(), owner()->try_index(), | 1440 node->token_pos(), owner()->try_index(), |
| 1438 node->function_name(), Token::kILLEGAL, values, | 1441 node->function_name(), Token::kILLEGAL, values, |
| 1439 arguments->names(), 1); | 1442 arguments->names(), 1); |
| 1440 ReturnComputation(call); | 1443 ReturnComputation(call); |
| 1441 } | 1444 } |
| 1442 | 1445 |
| 1443 | 1446 |
| 1444 // <Expression> ::= StaticCall { function: Function | 1447 // <Expression> ::= StaticCall { function: Function |
| 1445 // arguments: <ArgumentList> } | 1448 // arguments: <ArgumentList> } |
| 1446 void EffectGraphVisitor::VisitStaticCallNode(StaticCallNode* node) { | 1449 void EffectGraphVisitor::VisitStaticCallNode(StaticCallNode* node) { |
| 1447 int length = node->arguments()->length(); | 1450 int length = node->arguments()->length(); |
| 1448 ZoneGrowableArray<Value*>* values = new ZoneGrowableArray<Value*>(length); | 1451 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1449 TranslateArgumentList(*node->arguments(), values); | 1452 new ZoneGrowableArray<PushArgumentInstr*>(length); |
| 1453 BuildPushArguments(*node->arguments(), arguments); |
| 1450 StaticCallComp* call = | 1454 StaticCallComp* call = |
| 1451 new StaticCallComp(node->token_pos(), | 1455 new StaticCallComp(node->token_pos(), |
| 1452 owner()->try_index(), | 1456 owner()->try_index(), |
| 1453 node->function(), | 1457 node->function(), |
| 1454 node->arguments()->names(), | 1458 node->arguments()->names(), |
| 1455 values); | 1459 arguments); |
| 1456 ReturnComputation(call); | 1460 ReturnComputation(call); |
| 1457 } | 1461 } |
| 1458 | 1462 |
| 1459 | 1463 |
| 1460 ClosureCallComp* EffectGraphVisitor::BuildClosureCall( | 1464 ClosureCallComp* EffectGraphVisitor::BuildClosureCall( |
| 1461 ClosureCallNode* node) { | 1465 ClosureCallNode* node) { |
| 1462 ValueGraphVisitor for_closure(owner(), temp_index()); | 1466 ValueGraphVisitor for_closure(owner(), temp_index()); |
| 1463 node->closure()->Visit(&for_closure); | 1467 node->closure()->Visit(&for_closure); |
| 1464 Append(for_closure); | 1468 Append(for_closure); |
| 1465 PushArgumentInstr* push_closure = new PushArgumentInstr(for_closure.value()); | 1469 PushArgumentInstr* push_closure = PushArgument(for_closure.value()); |
| 1466 AddInstruction(push_closure); | |
| 1467 | 1470 |
| 1468 ZoneGrowableArray<PushArgumentInstr*>* arguments = | 1471 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1469 new ZoneGrowableArray<PushArgumentInstr*>(node->arguments()->length()); | 1472 new ZoneGrowableArray<PushArgumentInstr*>(node->arguments()->length()); |
| 1470 arguments->Add(push_closure); | 1473 arguments->Add(push_closure); |
| 1471 BuildPushArguments(*node->arguments(), arguments); | 1474 BuildPushArguments(*node->arguments(), arguments); |
| 1472 | 1475 |
| 1473 // Save context around the call. | 1476 // Save context around the call. |
| 1474 BuildStoreContext(*owner()->parsed_function().expression_temp_var()); | 1477 BuildStoreContext(*owner()->parsed_function().expression_temp_var()); |
| 1475 return new ClosureCallComp(node, owner()->try_index(), arguments); | 1478 return new ClosureCallComp(node, owner()->try_index(), arguments); |
| 1476 } | 1479 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 allocate_arguments); | 1533 allocate_arguments); |
| 1531 } else { | 1534 } else { |
| 1532 allocate_comp = new AllocateObjectComp(node, | 1535 allocate_comp = new AllocateObjectComp(node, |
| 1533 owner()->try_index(), | 1536 owner()->try_index(), |
| 1534 allocate_arguments); | 1537 allocate_arguments); |
| 1535 } | 1538 } |
| 1536 return Bind(allocate_comp); | 1539 return Bind(allocate_comp); |
| 1537 } | 1540 } |
| 1538 | 1541 |
| 1539 | 1542 |
| 1540 void EffectGraphVisitor::BuildConstructorCall(ConstructorCallNode* node, | 1543 void EffectGraphVisitor::BuildConstructorCall( |
| 1541 Value* alloc_value) { | 1544 ConstructorCallNode* node, |
| 1545 PushArgumentInstr* push_alloc_value) { |
| 1542 Value* ctor_arg = Bind( | 1546 Value* ctor_arg = Bind( |
| 1543 new ConstantVal(Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)))); | 1547 new ConstantVal(Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)))); |
| 1548 PushArgumentInstr* push_ctor_arg = PushArgument(ctor_arg); |
| 1544 | 1549 |
| 1545 ZoneGrowableArray<Value*>* values = new ZoneGrowableArray<Value*>(); | 1550 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1546 values->Add(alloc_value); | 1551 new ZoneGrowableArray<PushArgumentInstr*>(2); |
| 1547 values->Add(ctor_arg); | 1552 arguments->Add(push_alloc_value); |
| 1553 arguments->Add(push_ctor_arg); |
| 1548 | 1554 |
| 1549 TranslateArgumentList(*node->arguments(), values); | 1555 BuildPushArguments(*node->arguments(), arguments); |
| 1550 Do(new StaticCallComp(node->token_pos(), | 1556 Do(new StaticCallComp(node->token_pos(), |
| 1551 owner()->try_index(), | 1557 owner()->try_index(), |
| 1552 node->constructor(), | 1558 node->constructor(), |
| 1553 node->arguments()->names(), | 1559 node->arguments()->names(), |
| 1554 values)); | 1560 arguments)); |
| 1555 } | 1561 } |
| 1556 | 1562 |
| 1557 | 1563 |
| 1558 void EffectGraphVisitor::VisitConstructorCallNode(ConstructorCallNode* node) { | 1564 void EffectGraphVisitor::VisitConstructorCallNode(ConstructorCallNode* node) { |
| 1559 if (node->constructor().IsFactory()) { | 1565 if (node->constructor().IsFactory()) { |
| 1560 ZoneGrowableArray<Value*>* factory_arguments = | 1566 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1561 new ZoneGrowableArray<Value*>(); | 1567 new ZoneGrowableArray<PushArgumentInstr*>(); |
| 1562 factory_arguments->Add( | 1568 PushArgumentInstr* push_type_arguments = PushArgument( |
| 1563 BuildInstantiatedTypeArguments(node->token_pos(), | 1569 BuildInstantiatedTypeArguments(node->token_pos(), |
| 1564 node->type_arguments())); | 1570 node->type_arguments())); |
| 1565 ASSERT(factory_arguments->length() == 1); | 1571 arguments->Add(push_type_arguments); |
| 1566 TranslateArgumentList(*node->arguments(), factory_arguments); | 1572 ASSERT(arguments->length() == 1); |
| 1573 BuildPushArguments(*node->arguments(), arguments); |
| 1567 StaticCallComp* call = | 1574 StaticCallComp* call = |
| 1568 new StaticCallComp(node->token_pos(), | 1575 new StaticCallComp(node->token_pos(), |
| 1569 owner()->try_index(), | 1576 owner()->try_index(), |
| 1570 node->constructor(), | 1577 node->constructor(), |
| 1571 node->arguments()->names(), | 1578 node->arguments()->names(), |
| 1572 factory_arguments); | 1579 arguments); |
| 1573 ReturnComputation(call); | 1580 ReturnComputation(call); |
| 1574 return; | 1581 return; |
| 1575 } | 1582 } |
| 1576 // t_n contains the allocated and initialized object. | 1583 // t_n contains the allocated and initialized object. |
| 1577 // t_n <- AllocateObject(class) | 1584 // t_n <- AllocateObject(class) |
| 1578 // t_n+1 <- ctor-arg | 1585 // t_n+1 <- ctor-arg |
| 1579 // t_n+2... <- constructor arguments start here | 1586 // t_n+2... <- constructor arguments start here |
| 1580 // StaticCall(constructor, t_n+1, t_n+2, ...) | 1587 // StaticCall(constructor, t_n+1, t_n+2, ...) |
| 1581 // No need to preserve allocated value (simpler than in ValueGraphVisitor). | 1588 // No need to preserve allocated value (simpler than in ValueGraphVisitor). |
| 1582 Value* allocate = BuildObjectAllocation(node); | 1589 Value* allocated_value = BuildObjectAllocation(node); |
| 1583 BuildConstructorCall(node, allocate); | 1590 PushArgumentInstr* push_allocated_value = PushArgument(allocated_value); |
| 1591 BuildConstructorCall(node, push_allocated_value); |
| 1584 } | 1592 } |
| 1585 | 1593 |
| 1586 | 1594 |
| 1587 Value* EffectGraphVisitor::BuildInstantiator() { | 1595 Value* EffectGraphVisitor::BuildInstantiator() { |
| 1588 const Class& instantiator_class = Class::Handle( | 1596 const Class& instantiator_class = Class::Handle( |
| 1589 owner()->parsed_function().function().owner()); | 1597 owner()->parsed_function().function().owner()); |
| 1590 if (instantiator_class.NumTypeParameters() == 0) { | 1598 if (instantiator_class.NumTypeParameters() == 0) { |
| 1591 return NULL; | 1599 return NULL; |
| 1592 } | 1600 } |
| 1593 Function& outer_function = | 1601 Function& outer_function = |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 // t_n+1 <- ctor-arg | 1750 // t_n+1 <- ctor-arg |
| 1743 // t_n+2... <- constructor arguments start here | 1751 // t_n+2... <- constructor arguments start here |
| 1744 // StaticCall(constructor, t_n, t_n+1, ...) | 1752 // StaticCall(constructor, t_n, t_n+1, ...) |
| 1745 // tn <- LoadLocal(temp) | 1753 // tn <- LoadLocal(temp) |
| 1746 | 1754 |
| 1747 Value* allocate = BuildObjectAllocation(node); | 1755 Value* allocate = BuildObjectAllocation(node); |
| 1748 Computation* store_allocated = BuildStoreLocal( | 1756 Computation* store_allocated = BuildStoreLocal( |
| 1749 node->allocated_object_var(), | 1757 node->allocated_object_var(), |
| 1750 allocate); | 1758 allocate); |
| 1751 Value* allocated_value = Bind(store_allocated); | 1759 Value* allocated_value = Bind(store_allocated); |
| 1752 BuildConstructorCall(node, allocated_value); | 1760 PushArgumentInstr* push_allocated_value = PushArgument(allocated_value); |
| 1761 BuildConstructorCall(node, push_allocated_value); |
| 1753 Computation* load_allocated = BuildLoadLocal( | 1762 Computation* load_allocated = BuildLoadLocal( |
| 1754 node->allocated_object_var()); | 1763 node->allocated_object_var()); |
| 1755 allocated_value = Bind(load_allocated); | 1764 allocated_value = Bind(load_allocated); |
| 1756 ReturnValue(allocated_value); | 1765 ReturnValue(allocated_value); |
| 1757 } | 1766 } |
| 1758 | 1767 |
| 1759 | 1768 |
| 1760 void EffectGraphVisitor::VisitInstanceGetterNode(InstanceGetterNode* node) { | 1769 void EffectGraphVisitor::VisitInstanceGetterNode(InstanceGetterNode* node) { |
| 1761 ValueGraphVisitor for_receiver(owner(), temp_index()); | 1770 ValueGraphVisitor for_receiver(owner(), temp_index()); |
| 1762 node->receiver()->Visit(&for_receiver); | 1771 node->receiver()->Visit(&for_receiver); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1813 BuildLoadLocal(*owner()->parsed_function().expression_temp_var())); | 1822 BuildLoadLocal(*owner()->parsed_function().expression_temp_var())); |
| 1814 } | 1823 } |
| 1815 | 1824 |
| 1816 | 1825 |
| 1817 void EffectGraphVisitor::VisitStaticGetterNode(StaticGetterNode* node) { | 1826 void EffectGraphVisitor::VisitStaticGetterNode(StaticGetterNode* node) { |
| 1818 const String& getter_name = | 1827 const String& getter_name = |
| 1819 String::Handle(Field::GetterName(node->field_name())); | 1828 String::Handle(Field::GetterName(node->field_name())); |
| 1820 const Function& getter_function = | 1829 const Function& getter_function = |
| 1821 Function::ZoneHandle(node->cls().LookupStaticFunction(getter_name)); | 1830 Function::ZoneHandle(node->cls().LookupStaticFunction(getter_name)); |
| 1822 ASSERT(!getter_function.IsNull()); | 1831 ASSERT(!getter_function.IsNull()); |
| 1823 ZoneGrowableArray<Value*>* values = new ZoneGrowableArray<Value*>(); | 1832 ZoneGrowableArray<PushArgumentInstr*>* arguments = |
| 1833 new ZoneGrowableArray<PushArgumentInstr*>(); |
| 1824 StaticCallComp* call = new StaticCallComp(node->token_pos(), | 1834 StaticCallComp* call = new StaticCallComp(node->token_pos(), |
| 1825 owner()->try_index(), | 1835 owner()->try_index(), |
| 1826 getter_function, | 1836 getter_function, |
| 1827 Array::ZoneHandle(), // No names. | 1837 Array::ZoneHandle(), // No names. |
| 1828 values); | 1838 arguments); |
| 1829 ReturnComputation(call); | 1839 ReturnComputation(call); |
| 1830 } | 1840 } |
| 1831 | 1841 |
| 1832 | 1842 |
| 1833 void EffectGraphVisitor::VisitStaticSetterNode(StaticSetterNode* node) { | 1843 void EffectGraphVisitor::VisitStaticSetterNode(StaticSetterNode* node) { |
| 1834 const String& setter_name = | 1844 const String& setter_name = |
| 1835 String::Handle(Field::SetterName(node->field_name())); | 1845 String::Handle(Field::SetterName(node->field_name())); |
| 1836 const Function& setter_function = | 1846 const Function& setter_function = |
| 1837 Function::ZoneHandle(node->cls().LookupStaticFunction(setter_name)); | 1847 Function::ZoneHandle(node->cls().LookupStaticFunction(setter_name)); |
| 1838 ASSERT(!setter_function.IsNull()); | 1848 ASSERT(!setter_function.IsNull()); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2722 char* chars = reinterpret_cast<char*>( | 2732 char* chars = reinterpret_cast<char*>( |
| 2723 Isolate::Current()->current_zone()->Allocate(len)); | 2733 Isolate::Current()->current_zone()->Allocate(len)); |
| 2724 OS::SNPrint(chars, len, kFormat, function_name, reason); | 2734 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 2725 const Error& error = Error::Handle( | 2735 const Error& error = Error::Handle( |
| 2726 LanguageError::New(String::Handle(String::New(chars)))); | 2736 LanguageError::New(String::Handle(String::New(chars)))); |
| 2727 Isolate::Current()->long_jump_base()->Jump(1, error); | 2737 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2728 } | 2738 } |
| 2729 | 2739 |
| 2730 | 2740 |
| 2731 } // namespace dart | 2741 } // namespace dart |
| OLD | NEW |