js/src/builtin/RegExp.h
author Sean Stangl <sstangl@mozilla.com>
Wed, 12 Dec 2012 16:31:49 -0800
changeset 116114 9121bae603a2fba721938e27bc1c4981cc59d24c
parent 109823 2c08d52e521d3f9aa3ff13c220fec6d6b1428bae
child 116118 7711a36c27717f84038edbfc8a2f3e2788dc46d3
permissions -rw-r--r--
Bug 808245, Part 1/6 - Fix some nits, especially vim modelines. r=dvander

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=4 sw=4 et tw=99 ft=cpp:
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef RegExp_h___
#define RegExp_h___

#include "jsprvtd.h"

JSObject *
js_InitRegExpClass(JSContext *cx, js::HandleObject obj);

/*
 * The following builtin natives are extern'd for pointer comparison in
 * other parts of the engine.
 */

namespace js {

/*
 * |res| may be null if the |RegExpStatics| are not to be updated.
 * |input| may be null if there is no |JSString| corresponding to
 * |chars| and |length|.
 */
bool
ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpObject &reobj,
              Handle<JSStableString*> input, StableCharPtr chars, size_t length,
              size_t *lastIndex, RegExpExecType type, Value *rval);

bool
ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpShared &shared,
              Handle<JSStableString*> input, StableCharPtr chars, size_t length,
              size_t *lastIndex, RegExpExecType type, Value *rval);

bool
ExecuteRegExp(JSContext *cx, RegExpExecType execType, HandleObject regexp,
              HandleString string, MutableHandleValue rval);

extern JSBool
regexp_exec(JSContext *cx, unsigned argc, Value *vp);

extern JSBool
regexp_test(JSContext *cx, unsigned argc, Value *vp);

} /* namespace js */

#endif