Lines Matching refs:Code
6 // * Redistributions of source code must retain the above copyright
70 // Call the construct code with 2 arguments.
295 #else // V8_INTERPRETED_REGEXP (RegExp native code)
358 data->set(JSRegExp::code_index(is_ascii), result.code);
394 Code* RegExpImpl::IrregexpNativeCode(FixedArray* re, bool is_ascii) {
395 return Code::cast(re->get(JSRegExp::code_index(is_ascii)));
403 // Initialize compiled code entries to null.
431 // Byte-code regexp needs space allocated for all its registers.
463 Handle<Code> code(IrregexpNativeCode(*irregexp, is_ascii), isolate);
465 NativeRegExpMacroAssembler::Match(code,
576 // bytecodes or native code.
584 // 3) From the nodes we generate either byte codes or native code
586 // the search). The code generation step is described in more
589 // Code generation.
610 // The code generated (whether as byte codes or native code) maintains
622 // which will be presented first. The actual code generated is a more
628 // push backtrack code location
629 // <generate code to test for choice>
630 // backtrack code location:
633 // <generate code to test for last choice>
637 // <generate code to perform action>
638 // push backtrack code location
639 // <generate code to test for following nodes>
640 // backtrack code location:
647 // <generate code to test for following nodes>
657 // the node has already been code generated then the Emit() call will
658 // generate a jump to the previously generated code instead. In order to
661 // destination of the jump is resolved later when the code is generated.
663 // Actual regular expression code generation.
665 // Code generation is actually more complicated than the above. In order
666 // to improve the efficiency of the generated code some optimizations are
687 // are needed and to generate code for a node more than once, allowing
688 // specialized an efficient versions of the code to be created. This is
693 // Instead of emitting code, nodes that manipulate the state can record their
695 // current position offset, an optional backtrack code location on the top of
698 // will emit code to bring the actual state into line with the virtual state.
703 // known backtrack code location than it is to pop an unknown backtrack
706 // The virtual state found in the Trace affects code generation. For example
708 // position and the virtual current position, and matching code needs to use
710 // string. Therefore code generated for a non-trivial trace is specialized
711 // to that trace. The code generator therefore has the ability to generate
712 // code for each node several times. In order to limit the size of the
713 // generated code there is an arbitrary limit on how many specialized sets of
714 // code may be generated for a given node. If the limit is reached, the
715 // trace is flushed and a generic version of the code for a node is emitted.
716 // This is subsequently used for that node. The code emitted for non-generic
718 // the event that code generation is requested for an identical trace.
842 // Attempts to compile the regexp using an Irregexp code generator. Returns
893 Handle<HeapObject> code = macro_assembler_->GetCode(pattern);
894 heap->IncreaseTotalRegexpCodeGenerated(code->Size());
898 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString());
904 return RegExpEngine::CompilationResult(*code, next_register_);
1113 // nodes. It normalizes the state of the code generator to ensure we can
1114 // generate generic code.
1131 // Generate deferred actions here along with code to undo them again.
1181 // so this code can be used as the generic version.
1318 // Emit code.
1447 // involved in order to simplify code generation.
1649 // If we are generating a greedy loop then don't stop and don't reuse code.
1683 // If we get here code has been generated for this node too many times or
1684 // recursion is too deep. Time to switch to a generic version. The code for
2201 // Emit the code to check for a ^ in multiline mode (1-character lookbehind
2237 // Emit the code to handle \b and \B (word-boundary or non-word-boundary)
2277 // Emit the code to handle \b and \B (word-boundary or non-word-boundary).
2414 // We call this repeatedly to generate code for each pass over the text node.
2438 // order to get to the code we are now generating. The quick check can involve
2536 // This generates the code to match a text node. A text node can contain
2540 // emitting code for some character positions every time. See the comment on
2656 // Later we will generate code for all these text nodes using recursion
2732 // records the way the alternative is being code generated.
2777 /* Code generation for choice nodes.
2789 * next GoTo if we decide to reuse some already generated code. Some
2828 * than fail. Therefore we want the loop code to look like this (U is the
2829 * unwind code that steps back in the greedy loop). The following alternatives
2975 // No quick check was generated. Put the full code here.
3058 // code through a quick check which already did the checked load.
3776 // combined if it turns out they hinder good code generation.
4785 // because the following code only handles ranges that start on