Commit 48361801 authored by yangguo's avatar yangguo Committed by Commit bot

[regexp] do not include irregexp interpreter by default.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1601743002

Cr-Commit-Position: refs/heads/master@{#33368}
parent fa5d09e5
......@@ -6,6 +6,8 @@
#ifndef V8_REGEXP_BYTECODES_IRREGEXP_H_
#define V8_REGEXP_BYTECODES_IRREGEXP_H_
#ifdef V8_INTERPRETED_REGEXP
namespace v8 {
namespace internal {
......@@ -82,4 +84,6 @@ BYTECODE_ITERATOR(DECLARE_BYTECODE_LENGTH)
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
#endif // V8_REGEXP_BYTECODES_IRREGEXP_H_
......@@ -4,6 +4,8 @@
// A simple interpreter for the Irregexp byte code.
#ifdef V8_INTERPRETED_REGEXP
#include "src/regexp/interpreter-irregexp.h"
#include "src/ast/ast.h"
......@@ -16,7 +18,6 @@
namespace v8 {
namespace internal {
typedef unibrow::Mapping<unibrow::Ecma262Canonicalize> Canonicalize;
static bool BackRefMatchesNoCase(Canonicalize* interp_canonicalize,
......@@ -619,3 +620,5 @@ RegExpImpl::IrregexpResult IrregexpInterpreter::Match(
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
......@@ -7,12 +7,13 @@
#ifndef V8_REGEXP_INTERPRETER_IRREGEXP_H_
#define V8_REGEXP_INTERPRETER_IRREGEXP_H_
#ifdef V8_INTERPRETED_REGEXP
#include "src/regexp/jsregexp.h"
namespace v8 {
namespace internal {
class IrregexpInterpreter {
public:
static RegExpImpl::IrregexpResult Match(Isolate* isolate,
......@@ -26,4 +27,6 @@ class IrregexpInterpreter {
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
#endif // V8_REGEXP_INTERPRETER_IRREGEXP_H_
......@@ -5,14 +5,14 @@
#ifndef V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
#define V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
#ifdef V8_INTERPRETED_REGEXP
#include "src/ast/ast.h"
#include "src/regexp/bytecodes-irregexp.h"
namespace v8 {
namespace internal {
#ifdef V8_INTERPRETED_REGEXP
void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte,
uint32_t twenty_four_bits) {
uint32_t word = ((twenty_four_bits << BYTECODE_SHIFT) | byte);
......@@ -54,9 +54,9 @@ void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) {
pc_ += 4;
}
#endif // V8_INTERPRETED_REGEXP
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
#endif // V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_INL_H_
......@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifdef V8_INTERPRETED_REGEXP
#include "src/regexp/regexp-macro-assembler-irregexp.h"
#include "src/ast/ast.h"
......@@ -9,12 +11,9 @@
#include "src/regexp/regexp-macro-assembler.h"
#include "src/regexp/regexp-macro-assembler-irregexp-inl.h"
namespace v8 {
namespace internal {
#ifdef V8_INTERPRETED_REGEXP
RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Isolate* isolate,
Vector<byte> buffer,
Zone* zone)
......@@ -454,7 +453,7 @@ void RegExpMacroAssemblerIrregexp::Expand() {
}
}
#endif // V8_INTERPRETED_REGEXP
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
......@@ -5,13 +5,13 @@
#ifndef V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_
#define V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_
#ifdef V8_INTERPRETED_REGEXP
#include "src/regexp/regexp-macro-assembler.h"
namespace v8 {
namespace internal {
#ifdef V8_INTERPRETED_REGEXP
// A light-weight assembler for the Irregexp byte code.
class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
public:
......@@ -131,9 +131,9 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp);
};
#endif // V8_INTERPRETED_REGEXP
} // namespace internal
} // namespace v8
#endif // V8_INTERPRETED_REGEXP
#endif // V8_REGEXP_REGEXP_MACRO_ASSEMBLER_IRREGEXP_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment