Home | History | Annotate | Download | only in src

Lines Matching defs:node

755 //   2) From the AST a node network is created.  The nodes are all
758 // performed on the node network.
791 // * The stack of backtracking information. Used when a matching node
832 // the node has already been code generated then the Emit() call will
834 // limit recursion it is possible for the Emit() function to put the node
845 // A choice node looks at the following character and eliminates some of
862 // are needed and to generate code for a node more than once, allowing
871 // the virtualized backtrack stack and some register changes. When a node is
887 // code for each node several times. In order to limit the size of the
889 // code may be generated for a given node. If the limit is reached, the
890 // trace is flushed and a generic version of the code for a node is emitted.
891 // This is subsequently used for that node. The code emitted for non-generic
892 // trace is not recorded in the node and so it cannot currently be reused in
1015 inline void AddWork(RegExpNode* node) { work_list_->Add(node); }
1354 // This is called as we come into a loop choice node and some other tricky
1367 // Create a new trivial state and generate the node with that.
1397 // Create a new trivial state and generate the node with that.
1440 // backtrack that the BeginSubmatch node got.
1556 void Type##Node::Accept(NodeVisitor* visitor) { \
2256 // To avoid too deep recursion we push the node to the work queue and just
2262 // Generate generic version of the node and bind the label for later use.
2276 node too many times or
2316 // branches in the node graph.
2328 // Match the behaviour of EatsAtLeast on this node.
2351 // We are not at start after this node so we set the last argument to 'true'.
2364 RegExpNode* node = alternatives_->at(1).node();
2365 return node->EatsAtLeast(still_to_find, budget - 1, not_at_start);
2376 RegExpNode* node = alternatives_->at(1).node();
2377 return node->GetQuickCheckDetails(details, compiler, filled_in, not_at_start);
2390 RegExpNode* node = alternatives_->at(i).node();
2391 if (node == ignore_this_node) continue;
2393 node->EatsAtLeast(still_to_find, budget, not_at_start);
2884 alternative.node()->FilterASCII(depth - 1, ignore_case);
2904 alternatives_->at(i).node()->FilterASCII(depth - 1, ignore_case);
2923 RegExpNode* node = alternatives_->at(1).node();
2924 RegExpNode* replacement = node->FilterASCII(depth - 1, ignore_case);
2928 RegExpNode* neg_node = alternatives_->at(0).node();
2972 alternatives_->at(0).node()->GetQuickCheckDetails(details,
2978 RegExpNode* node = alternatives_->at(i).node();
2979 node->GetQuickCheckDetails(&new_details, compiler,
3199 // We call this repeatedly to generate code for each pass over the text node.
3213 // be fetched into a register by the previous node. In this case we want to
3318 // This generates the code to match a text node. A text node can contain
3321 // pass from left to right. Instead we pass over the text node several times,
3432 RegExpCharacterClass* node = elm.char_class();
3433 ZoneList<CharacterRange>* ranges = node->ranges(zone());
3437 if (node->is_negated()) {
3452 // this alternative and back to this choice node. If there are variable
3458 RegExpNode* node = alternative->node();
3462 while (node != this) {
3466 int node_length = node->GreedyLoopTextLength();
3471 SeqRegExpNode* seq_node = static_cast<SeqRegExpNode*>(node);
3472 node = seq_node->on_success();
3481 loop_node_ = alt.node();
3488 continue_node_ = alt.node();
3535 // This class is used when generating the alternatives in a choice node. It
3840 * regexp continuation is generated directly after the Sn node, up to the
3962 alternatives_->at(0).node()->Emit(compiler, &greedy_match_trace);
3980 RegExpNode* eats_anything_node = alt1.node();
4003 alt0.node()->FillInBMInfo(0, kRecursionBudget, bm, not_at_start);
4047 alternative.node()->EmitQuickCheck(compiler,
4093 alternative.node()->Emit(compiler, &new_trace);
4151 alternative.node()->Emit(compiler, &out_of_line_trace);
4166 alternative.node()->Emit(compiler, &out_of_line_trace);
4329 void PrintNode(const char* label, RegExpNode* node);
4330 void Visit(RegExpNode* node);
4335 virtual void Visit##Type(Type##Node* that);
4345 void DotPrinter::PrintNode(const char* label, RegExpNode* node) {
4361 Visit(node);
4367 void DotPrinter::Visit(RegExpNode* node) {
4368 if (node->info()->visited) return;
4369 node->info()->visited = true;
4370 node->Accept(this);
4392 choice()->alternatives()->at(i).node());
4493 stream()->Add(" n%p -> n%p;\n", that, alt.node());
4498 alt.node()->Accept(this);
4515 RegExpCharacterClass* node = elm.char_class();
4517 if (node->is_negated())
4519 for (int j = 0; j < node->ranges(zone)->length(); j++) {
4520 node->ranges(zone)->at(j);
4663 RegExpNode* node,
4666 printer.PrintNode(label, node);
5074 RegExpNode* node = ActionNode::BeginSubmatch(
5084 return node;
5091 // choice node set up and backtrack. If the first alternative fails then
5718 // If the next node is interested in what it follows then this node
5728 RegExpNode* node = that->alternatives()->at(i).node();
5729 EnsureAnalyzed(node);
5732 // this node also, so it can pass it on.
5733 info->AddFromFollowing(node->info());
5741 RegExpNode* node = that->alternatives()->at(i).node();
5742 if (node != that->loop_node()) {
5743 EnsureAnalyzed(node);
5745 info->AddFromFollowing(node->info());
5748 // Check the loop last since it may need the value of this node
5795 alt.node()->FillInBMInfo(offset, budget, bm, not_at_start);
5860 true); // Not at start after a text node.
5874 void DispatchTableConstructor::BuildTable(ChoiceNode* node) {
5875 node->set_being_calculated(true);
5876 ZoneList<GuardedAlternative>* alternatives = node->alternatives();
5879 alternatives->at(i).node()->Accept(this);
5881 node->set_being_calculated(false);
5901 void DispatchTableConstructor::VisitChoice(ChoiceNode* node) {
5902 if (node->being_calculated())
5904 DispatchTable* table = node->GetTable(ignore_case_);
5911 // TODO(160): Find the node that we refer back to and propagate its start
6011 RegExpNode* node = captured_body;
6034 node = first_step_node;
6036 node = loop_node;
6040 node = node->FilterASCII(RegExpCompiler::kMaxRecursion, ignore_case);
6043 if (node != NULL) {
6044 node = node->FilterASCII(RegExpCompiler::kMaxRecursion, ignore_case);
6048 if (node == NULL) node = new(zone) EndNode(EndNode::BACKTRACK, zone);
6049 data->node = node;
6051 analysis.EnsureAnalyzed(node);
6094 // in the AST that isn't replicated in the Node structure.
6110 node,