Lines Matching refs:Code
6 // * Redistributions of source code must retain the above copyright
70 // Call the construct code with 2 arguments.
287 #else // V8_INTERPRETED_REGEXP (RegExp native code)
294 // Reinstate the code in the original place.
325 // saved code index.
328 // uncompiled regexp, a previous compilation error, or code that has
338 // the saved code index (we store the error message, not the actual
378 data->set(JSRegExp::code_index(is_ascii), result.code);
414 Code* RegExpImpl::IrregexpNativeCode(FixedArray* re, bool is_ascii) {
415 return Code::cast(re->get(JSRegExp::code_index(is_ascii)));
423 // Initialize compiled code entries to null.
441 // Byte-code regexp needs space allocated for all its registers.
470 Handle<Code> code(IrregexpNativeCode(*irregexp, is_ascii), isolate);
472 NativeRegExpMacroAssembler::Match(code,
586 // bytecodes or native code.
594 // 3) From the nodes we generate either byte codes or native code
596 // the search). The code generation step is described in more
599 // Code generation.
620 // The code generated (whether as byte codes or native code) maintains
632 // which will be presented first. The actual code generated is a more
638 // push backtrack code location
639 // <generate code to test for choice>
640 // backtrack code location:
643 // <generate code to test for last choice>
647 // <generate code to perform action>
648 // push backtrack code location
649 // <generate code to test for following nodes>
650 // backtrack code location:
657 // <generate code to test for following nodes>
667 // the node has already been code generated then the Emit() call will
668 // generate a jump to the previously generated code instead. In order to
671 // destination of the jump is resolved later when the code is generated.
673 // Actual regular expression code generation.
675 // Code generation is actually more complicated than the above. In order
676 // to improve the efficiency of the generated code some optimizations are
697 // are needed and to generate code for a node more than once, allowing
698 // specialized an efficient versions of the code to be created. This is
703 // Instead of emitting code, nodes that manipulate the state can record their
705 // current position offset, an optional backtrack code location on the top of
708 // will emit code to bring the actual state into line with the virtual state.
713 // known backtrack code location than it is to pop an unknown backtrack
716 // The virtual state found in the Trace affects code generation. For example
718 // position and the virtual current position, and matching code needs to use
720 // string. Therefore code generated for a non-trivial trace is specialized
721 // to that trace. The code generator therefore has the ability to generate
722 // code for each node several times. In order to limit the size of the
723 // generated code there is an arbitrary limit on how many specialized sets of
724 // code may be generated for a given node. If the limit is reached, the
725 // trace is flushed and a generic version of the code for a node is emitted.
726 // This is subsequently used for that node. The code emitted for non-generic
728 // the event that code generation is requested for an identical trace.
859 // Attempts to compile the regexp using an Irregexp code generator. Returns
911 Handle<HeapObject> code = macro_assembler_->GetCode(pattern);
912 heap->IncreaseTotalRegexpCodeGenerated(code->Size());
916 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString());
922 return RegExpEngine::CompilationResult(*code, next_register_);
1131 // nodes. It normalizes the state of the code generator to ensure we can
1132 // generate generic code.
1149 // Generate deferred actions here along with code to undo them again.
1199 // so this code can be used as the generic version.
1336 // Emit code.
1465 // involved in order to simplify code generation.
1667 // If we are generating a greedy loop then don't stop and don't reuse code.
1701 // If we get here code has been generated for this node too many times or
1702 // recursion is too deep. Time to switch to a generic version. The code for
2216 // Emit the code to check for a ^ in multiline mode (1-character lookbehind
2252 // Emit the code to handle \b and \B (word-boundary or non-word-boundary)
2292 // Emit the code to handle \b and \B (word-boundary or non-word-boundary).
2429 // We call this repeatedly to generate code for each pass over the text node.
2453 // order to get to the code we are now generating. The quick check can involve
2551 // This generates the code to match a text node. A text node can contain
2555 // emitting code for some character positions every time. See the comment on
2672 // Later we will generate code for all these text nodes using recursion
2749 // records the way the alternative is being code generated.
2795 /* Code generation for choice nodes.
2807 * next GoTo if we decide to reuse some already generated code. Some
2846 * than fail. Therefore we want the loop code to look like this (U is the
2847 * unwind code that steps back in the greedy loop). The following alternatives
2993 // No quick check was generated. Put the full code here.
3076 // code through a quick check which already did the checked load.
3835 // combined if it turns out they hinder good code generation.
4746 // because the following code only handles ranges that start on