| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1663 node->AddSibling(sibling); | 1663 node->AddSibling(sibling); |
| 1664 return sibling; | 1664 return sibling; |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 | 1667 |
| 1668 RegExpNode* ActionNode::PropagateInterest(NodeInfo* info) { | 1668 RegExpNode* ActionNode::PropagateInterest(NodeInfo* info) { |
| 1669 RegExpNode* sibling = GetSibling(info); | 1669 RegExpNode* sibling = GetSibling(info); |
| 1670 if (sibling != NULL) return sibling; | 1670 if (sibling != NULL) return sibling; |
| 1671 EnsureSiblings(); | 1671 EnsureSiblings(); |
| 1672 ActionNode* action = new ActionNode(*this); | 1672 ActionNode* action = new ActionNode(*this); |
| 1673 action->set_on_success(action->on_success()->PropagateInterest(info)); | |
| 1674 action->info()->AdoptInterests(info); | 1673 action->info()->AdoptInterests(info); |
| 1675 AddSibling(action); | 1674 AddSibling(action); |
| 1675 action->set_on_success(action->on_success()->PropagateInterest(info)); |
| 1676 return action; | 1676 return action; |
| 1677 } | 1677 } |
| 1678 | 1678 |
| 1679 | 1679 |
| 1680 RegExpNode* ChoiceNode::PropagateInterest(NodeInfo* info) { | 1680 RegExpNode* ChoiceNode::PropagateInterest(NodeInfo* info) { |
| 1681 RegExpNode* sibling = GetSibling(info); | 1681 RegExpNode* sibling = GetSibling(info); |
| 1682 if (sibling != NULL) return sibling; | 1682 if (sibling != NULL) return sibling; |
| 1683 EnsureSiblings(); | 1683 EnsureSiblings(); |
| 1684 ChoiceNode* choice = new ChoiceNode(*this); | 1684 ChoiceNode* choice = new ChoiceNode(*this); |
| 1685 choice->info()->AdoptInterests(info); |
| 1686 AddSibling(choice); |
| 1685 ZoneList<GuardedAlternative>* old_alternatives = alternatives(); | 1687 ZoneList<GuardedAlternative>* old_alternatives = alternatives(); |
| 1686 int count = old_alternatives->length(); | 1688 int count = old_alternatives->length(); |
| 1687 choice->alternatives_ = new ZoneList<GuardedAlternative>(count); | 1689 choice->alternatives_ = new ZoneList<GuardedAlternative>(count); |
| 1688 for (int i = 0; i < count; i++) { | 1690 for (int i = 0; i < count; i++) { |
| 1689 GuardedAlternative alternative = old_alternatives->at(i); | 1691 GuardedAlternative alternative = old_alternatives->at(i); |
| 1690 alternative.set_node(alternative.node()->PropagateInterest(info)); | 1692 alternative.set_node(alternative.node()->PropagateInterest(info)); |
| 1691 choice->alternatives()->Add(alternative); | 1693 choice->alternatives()->Add(alternative); |
| 1692 } | 1694 } |
| 1693 choice->info()->AdoptInterests(info); | |
| 1694 AddSibling(choice); | |
| 1695 return choice; | 1695 return choice; |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 | 1698 |
| 1699 RegExpNode* EndNode::PropagateInterest(NodeInfo* info) { | 1699 RegExpNode* EndNode::PropagateInterest(NodeInfo* info) { |
| 1700 return PropagateToEndpoint(this, info); | 1700 return PropagateToEndpoint(this, info); |
| 1701 } | 1701 } |
| 1702 | 1702 |
| 1703 | 1703 |
| 1704 RegExpNode* BackreferenceNode::PropagateInterest(NodeInfo* info) { | 1704 RegExpNode* BackreferenceNode::PropagateInterest(NodeInfo* info) { |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 } | 2065 } |
| 2066 | 2066 |
| 2067 RegExpMacroAssembler::RegExpMacroAssembler() { | 2067 RegExpMacroAssembler::RegExpMacroAssembler() { |
| 2068 } | 2068 } |
| 2069 | 2069 |
| 2070 RegExpMacroAssembler::~RegExpMacroAssembler() { | 2070 RegExpMacroAssembler::~RegExpMacroAssembler() { |
| 2071 } | 2071 } |
| 2072 | 2072 |
| 2073 | 2073 |
| 2074 }} // namespace v8::internal | 2074 }} // namespace v8::internal |
| OLD | NEW |