Make not sucking at regexp the default

(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
erik.corry@gmail.com 2010-04-19 19:30:11 +00:00
parent e422cd3291
commit e1b3b92a2c
31 changed files with 81 additions and 87 deletions

View File

@ -111,8 +111,8 @@ ANDROID_LINKFLAGS = ['-nostdlib',
LIBRARY_FLAGS = { LIBRARY_FLAGS = {
'all': { 'all': {
'CPPPATH': [join(root_dir, 'src')], 'CPPPATH': [join(root_dir, 'src')],
'regexp:native': { 'regexp:interpreted': {
'CPPDEFINES': ['V8_NATIVE_REGEXP'] 'CPPDEFINES': ['V8_INTERPRETED_REGEXP']
}, },
'mode:debug': { 'mode:debug': {
'CPPDEFINES': ['V8_ENABLE_CHECKS'] 'CPPDEFINES': ['V8_ENABLE_CHECKS']

View File

@ -39,7 +39,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
/* /*
* This assembler uses the following register assignment convention * This assembler uses the following register assignment convention
* - r5 : Pointer to current code object (Code*) including heap object tag. * - r5 : Pointer to current code object (Code*) including heap object tag.
@ -1235,6 +1235,6 @@ void RegExpCEntryStub::Generate(MacroAssembler* masm_) {
#undef __ #undef __
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -32,14 +32,14 @@ namespace v8 {
namespace internal { namespace internal {
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerARM: public RegExpMacroAssembler { class RegExpMacroAssemblerARM: public RegExpMacroAssembler {
public: public:
RegExpMacroAssemblerARM(); RegExpMacroAssemblerARM();
virtual ~RegExpMacroAssemblerARM(); virtual ~RegExpMacroAssemblerARM();
}; };
#else #else // V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler { class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler {
public: public:
RegExpMacroAssemblerARM(Mode mode, int registers_to_save); RegExpMacroAssemblerARM(Mode mode, int registers_to_save);
@ -258,7 +258,7 @@ class RegExpCEntryStub: public CodeStub {
const char* GetName() { return "RegExpCEntryStub"; } const char* GetName() { return "RegExpCEntryStub"; }
}; };
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -2539,4 +2539,4 @@ uintptr_t Simulator::PopAddress() {
} } // namespace assembler::arm } } // namespace assembler::arm
#endif // !defined(__arm__) #endif // __arm__

View File

@ -46,7 +46,7 @@
#include "regexp-macro-assembler.h" #include "regexp-macro-assembler.h"
#include "platform.h" #include "platform.h"
// Include native regexp-macro-assembler. // Include native regexp-macro-assembler.
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
#if V8_TARGET_ARCH_IA32 #if V8_TARGET_ARCH_IA32
#include "ia32/regexp-macro-assembler-ia32.h" #include "ia32/regexp-macro-assembler-ia32.h"
#elif V8_TARGET_ARCH_X64 #elif V8_TARGET_ARCH_X64
@ -56,7 +56,7 @@
#else // Unknown architecture. #else // Unknown architecture.
#error "Unknown architecture." #error "Unknown architecture."
#endif // Target architecture. #endif // Target architecture.
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
namespace v8 { namespace v8 {
namespace internal { namespace internal {
@ -680,7 +680,7 @@ ExternalReference ExternalReference::compile_array_push_call() {
} }
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
ExternalReference ExternalReference::re_check_stack_guard_state() { ExternalReference ExternalReference::re_check_stack_guard_state() {
Address function; Address function;
@ -723,7 +723,7 @@ ExternalReference ExternalReference::address_of_regexp_stack_memory_size() {
return ExternalReference(RegExpStack::memory_size_address()); return ExternalReference(RegExpStack::memory_size_address());
} }
#endif #endif // V8_INTERPRETED_REGEXP
static double add_two_doubles(double x, double y) { static double add_two_doubles(double x, double y) {

View File

@ -457,7 +457,7 @@ class ExternalReference BASE_EMBEDDED {
static ExternalReference debug_step_in_fp_address(); static ExternalReference debug_step_in_fp_address();
#endif #endif
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
// C functions called from RegExp generated code. // C functions called from RegExp generated code.
// Function NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16() // Function NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()

View File

@ -41,7 +41,7 @@
#include "scopeinfo.h" #include "scopeinfo.h"
#include "snapshot.h" #include "snapshot.h"
#include "v8threads.h" #include "v8threads.h"
#if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP
#include "regexp-macro-assembler.h" #include "regexp-macro-assembler.h"
#include "arm/regexp-macro-assembler-arm.h" #include "arm/regexp-macro-assembler-arm.h"
#endif #endif
@ -1527,7 +1527,7 @@ void Heap::CreateCEntryStub() {
} }
#if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP
void Heap::CreateRegExpCEntryStub() { void Heap::CreateRegExpCEntryStub() {
RegExpCEntryStub stub; RegExpCEntryStub stub;
set_re_c_entry_code(*stub.GetCode()); set_re_c_entry_code(*stub.GetCode());
@ -1564,7 +1564,7 @@ void Heap::CreateFixedStubs() {
Heap::CreateCEntryStub(); Heap::CreateCEntryStub();
Heap::CreateJSEntryStub(); Heap::CreateJSEntryStub();
Heap::CreateJSConstructEntryStub(); Heap::CreateJSConstructEntryStub();
#if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP
Heap::CreateRegExpCEntryStub(); Heap::CreateRegExpCEntryStub();
#endif #endif
} }

View File

@ -110,7 +110,7 @@ class ZoneScopeInfo;
V(Script, empty_script, EmptyScript) \ V(Script, empty_script, EmptyScript) \
V(Smi, real_stack_limit, RealStackLimit) \ V(Smi, real_stack_limit, RealStackLimit) \
#if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP
#define STRONG_ROOT_LIST(V) \ #define STRONG_ROOT_LIST(V) \
UNCONDITIONAL_STRONG_ROOT_LIST(V) \ UNCONDITIONAL_STRONG_ROOT_LIST(V) \
V(Code, re_c_entry_code, RegExpCEntryCode) V(Code, re_c_entry_code, RegExpCEntryCode)

View File

@ -10808,9 +10808,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Just jump directly to runtime if native RegExp is not selected at compile // Just jump directly to runtime if native RegExp is not selected at compile
// time or if regexp entry in generated code is turned off runtime switch or // time or if regexp entry in generated code is turned off runtime switch or
// at compilation. // at compilation.
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
#else // V8_NATIVE_REGEXP #else // V8_INTERPRETED_REGEXP
if (!FLAG_regexp_entry_native) { if (!FLAG_regexp_entry_native) {
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
return; return;
@ -11127,7 +11127,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp. // Do the runtime call to execute the regexp.
__ bind(&runtime); __ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} }

View File

@ -38,7 +38,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
/* /*
* This assembler uses the following register assignment convention * This assembler uses the following register assignment convention
* - edx : current character. Must be loaded using LoadCurrentCharacter * - edx : current character. Must be loaded using LoadCurrentCharacter
@ -1195,6 +1195,6 @@ void RegExpMacroAssemblerIA32::LoadCurrentCharacterUnchecked(int cp_offset,
#undef __ #undef __
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -31,14 +31,14 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerIA32: public RegExpMacroAssembler { class RegExpMacroAssemblerIA32: public RegExpMacroAssembler {
public: public:
RegExpMacroAssemblerIA32() { } RegExpMacroAssemblerIA32() { }
virtual ~RegExpMacroAssemblerIA32() { } virtual ~RegExpMacroAssemblerIA32() { }
}; };
#else #else // V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler {
public: public:
RegExpMacroAssemblerIA32(Mode mode, int registers_to_save); RegExpMacroAssemblerIA32(Mode mode, int registers_to_save);
@ -208,7 +208,7 @@ class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler {
Label check_preempt_label_; Label check_preempt_label_;
Label stack_overflow_label_; Label stack_overflow_label_;
}; };
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -43,7 +43,7 @@
#include "regexp-macro-assembler-irregexp.h" #include "regexp-macro-assembler-irregexp.h"
#include "regexp-stack.h" #include "regexp-stack.h"
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
#if V8_TARGET_ARCH_IA32 #if V8_TARGET_ARCH_IA32
#include "ia32/regexp-macro-assembler-ia32.h" #include "ia32/regexp-macro-assembler-ia32.h"
#elif V8_TARGET_ARCH_X64 #elif V8_TARGET_ARCH_X64
@ -236,10 +236,10 @@ Handle<Object> RegExpImpl::AtomExec(Handle<JSRegExp> re,
// returns false. // returns false.
bool RegExpImpl::EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii) { bool RegExpImpl::EnsureCompiledIrregexp(Handle<JSRegExp> re, bool is_ascii) {
Object* compiled_code = re->DataAt(JSRegExp::code_index(is_ascii)); Object* compiled_code = re->DataAt(JSRegExp::code_index(is_ascii));
#ifdef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
if (compiled_code->IsCode()) return true;
#else // ! V8_NATIVE_REGEXP (RegExp interpreter code)
if (compiled_code->IsByteArray()) return true; if (compiled_code->IsByteArray()) return true;
#else // V8_INTERPRETED_REGEXP (RegExp native code)
if (compiled_code->IsCode()) return true;
#endif #endif
return CompileIrregexp(re, is_ascii); return CompileIrregexp(re, is_ascii);
} }
@ -360,14 +360,14 @@ int RegExpImpl::IrregexpPrepare(Handle<JSRegExp> regexp,
if (!EnsureCompiledIrregexp(regexp, is_ascii)) { if (!EnsureCompiledIrregexp(regexp, is_ascii)) {
return -1; return -1;
} }
#ifdef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
// Byte-code regexp needs space allocated for all its registers.
return IrregexpNumberOfRegisters(FixedArray::cast(regexp->data()));
#else // V8_INTERPRETED_REGEXP
// Native regexp only needs room to output captures. Registers are handled // Native regexp only needs room to output captures. Registers are handled
// internally. // internally.
return (IrregexpNumberOfCaptures(FixedArray::cast(regexp->data())) + 1) * 2; return (IrregexpNumberOfCaptures(FixedArray::cast(regexp->data())) + 1) * 2;
#else // !V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
// Byte-code regexp needs space allocated for all its registers.
return IrregexpNumberOfRegisters(FixedArray::cast(regexp->data()));
#endif // V8_NATIVE_REGEXP
} }
@ -381,7 +381,7 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce(Handle<JSRegExp> regexp,
ASSERT(index <= subject->length()); ASSERT(index <= subject->length());
ASSERT(subject->IsFlat()); ASSERT(subject->IsFlat());
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
ASSERT(output.length() >= ASSERT(output.length() >=
(IrregexpNumberOfCaptures(*irregexp) + 1) * 2); (IrregexpNumberOfCaptures(*irregexp) + 1) * 2);
do { do {
@ -414,7 +414,7 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce(Handle<JSRegExp> regexp,
} while (true); } while (true);
UNREACHABLE(); UNREACHABLE();
return RE_EXCEPTION; return RE_EXCEPTION;
#else // ndef V8_NATIVE_REGEXP #else // V8_INTERPRETED_REGEXP
ASSERT(output.length() >= IrregexpNumberOfRegisters(*irregexp)); ASSERT(output.length() >= IrregexpNumberOfRegisters(*irregexp));
bool is_ascii = subject->IsAsciiRepresentation(); bool is_ascii = subject->IsAsciiRepresentation();
@ -435,7 +435,7 @@ RegExpImpl::IrregexpResult RegExpImpl::IrregexpExecOnce(Handle<JSRegExp> regexp,
return RE_SUCCESS; return RE_SUCCESS;
} }
return RE_FAILURE; return RE_FAILURE;
#endif // ndef V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} }
@ -446,7 +446,7 @@ Handle<Object> RegExpImpl::IrregexpExec(Handle<JSRegExp> jsregexp,
ASSERT_EQ(jsregexp->TypeTag(), JSRegExp::IRREGEXP); ASSERT_EQ(jsregexp->TypeTag(), JSRegExp::IRREGEXP);
// Prepare space for the return values. // Prepare space for the return values.
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
#ifdef DEBUG #ifdef DEBUG
if (FLAG_trace_regexp_bytecodes) { if (FLAG_trace_regexp_bytecodes) {
String* pattern = jsregexp->Pattern(); String* pattern = jsregexp->Pattern();
@ -5232,7 +5232,7 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(RegExpCompileData* data,
NodeInfo info = *node->info(); NodeInfo info = *node->info();
// Create the correct assembler for the architecture. // Create the correct assembler for the architecture.
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
// Native regexp implementation. // Native regexp implementation.
NativeRegExpMacroAssembler::Mode mode = NativeRegExpMacroAssembler::Mode mode =
@ -5247,11 +5247,11 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(RegExpCompileData* data,
RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2); RegExpMacroAssemblerARM macro_assembler(mode, (data->capture_count + 1) * 2);
#endif #endif
#else // ! V8_NATIVE_REGEXP #else // V8_INTERPRETED_REGEXP
// Interpreted regexp implementation. // Interpreted regexp implementation.
EmbeddedVector<byte, 1024> codes; EmbeddedVector<byte, 1024> codes;
RegExpMacroAssemblerIrregexp macro_assembler(codes); RegExpMacroAssemblerIrregexp macro_assembler(codes);
#endif #endif // V8_INTERPRETED_REGEXP
return compiler.Assemble(&macro_assembler, return compiler.Assemble(&macro_assembler,
node, node,

View File

@ -42,10 +42,10 @@ class RegExpImpl {
public: public:
// Whether V8 is compiled with native regexp support or not. // Whether V8 is compiled with native regexp support or not.
static bool UsesNativeRegExp() { static bool UsesNativeRegExp() {
#ifdef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
return true;
#else
return false; return false;
#else
return true;
#endif #endif
} }

View File

@ -139,7 +139,7 @@ void Debugger::Stop(Instruction* instr) {
sim_->set_pc(sim_->get_pc() + Instruction::kInstructionSize); sim_->set_pc(sim_->get_pc() + Instruction::kInstructionSize);
Debug(); Debug();
} }
#endif // def GENERATED_CODE_COVERAGE #endif // GENERATED_CODE_COVERAGE
int32_t Debugger::GetRegisterValue(int regnum) { int32_t Debugger::GetRegisterValue(int regnum) {
@ -1644,5 +1644,5 @@ uintptr_t Simulator::PopAddress() {
} } // namespace assembler::mips } } // namespace assembler::mips
#endif // !defined(__mips) #endif // __mips

View File

@ -38,7 +38,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte, void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte,
uint32_t twenty_four_bits) { uint32_t twenty_four_bits) {
@ -71,7 +71,7 @@ void RegExpMacroAssemblerIrregexp::Emit32(uint32_t word) {
pc_ += 4; pc_ += 4;
} }
#endif // ! V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} } // namespace v8::internal } } // namespace v8::internal

View File

@ -36,7 +36,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector<byte> buffer) RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector<byte> buffer)
: buffer_(buffer), : buffer_(buffer),
@ -459,6 +459,6 @@ void RegExpMacroAssemblerIrregexp::Expand() {
} }
} }
#endif // !V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} } // namespace v8::internal } } // namespace v8::internal

View File

@ -31,7 +31,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
public: public:
@ -134,7 +134,7 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp);
}; };
#endif // !V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} } // namespace v8::internal } } // namespace v8::internal

View File

@ -52,7 +52,7 @@ bool RegExpMacroAssembler::CanReadUnaligned() {
} }
#ifdef V8_NATIVE_REGEXP // Avoid unused code, e.g., on ARM. #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM.
NativeRegExpMacroAssembler::NativeRegExpMacroAssembler() { NativeRegExpMacroAssembler::NativeRegExpMacroAssembler() {
} }
@ -258,5 +258,6 @@ Address NativeRegExpMacroAssembler::GrowStack(Address stack_pointer,
return new_stack_base - stack_content_size; return new_stack_base - stack_content_size;
} }
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} } // namespace v8::internal } } // namespace v8::internal

View File

@ -161,7 +161,7 @@ class RegExpMacroAssembler {
}; };
#ifdef V8_NATIVE_REGEXP // Avoid compiling unused code. #ifndef V8_INTERPRETED_REGEXP // Avoid compiling unused code.
class NativeRegExpMacroAssembler: public RegExpMacroAssembler { class NativeRegExpMacroAssembler: public RegExpMacroAssembler {
public: public:
@ -221,7 +221,7 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler {
int* output); int* output);
}; };
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} } // namespace v8::internal } } // namespace v8::internal

View File

@ -422,7 +422,7 @@ void ExternalReferenceTable::PopulateTable() {
UNCLASSIFIED, UNCLASSIFIED,
21, 21,
"compile_array_push"); "compile_array_push");
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
Add(ExternalReference::re_case_insensitive_compare_uc16().address(), Add(ExternalReference::re_case_insensitive_compare_uc16().address(),
UNCLASSIFIED, UNCLASSIFIED,
22, 22,
@ -439,7 +439,7 @@ void ExternalReferenceTable::PopulateTable() {
UNCLASSIFIED, UNCLASSIFIED,
25, 25,
"NativeRegExpMacroAssembler::word_character_map"); "NativeRegExpMacroAssembler::word_character_map");
#endif #endif // V8_INTERPRETED_REGEXP
// Keyed lookup cache. // Keyed lookup cache.
Add(ExternalReference::keyed_lookup_cache_keys().address(), Add(ExternalReference::keyed_lookup_cache_keys().address(),
UNCLASSIFIED, UNCLASSIFIED,

View File

@ -1212,7 +1212,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
__ movq(rbx, Operand(kScratchRegister, EntryFrameConstants::kArgvOffset)); __ movq(rbx, Operand(kScratchRegister, EntryFrameConstants::kArgvOffset));
// Load the function pointer into rdi. // Load the function pointer into rdi.
__ movq(rdi, rdx); __ movq(rdi, rdx);
#else // !defined(_WIN64) #else // _WIN64
// GCC parameters in: // GCC parameters in:
// rdi : entry (ignored) // rdi : entry (ignored)
// rsi : function // rsi : function

View File

@ -7317,9 +7317,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Just jump directly to runtime if native RegExp is not selected at compile // Just jump directly to runtime if native RegExp is not selected at compile
// time or if regexp entry in generated code is turned off runtime switch or // time or if regexp entry in generated code is turned off runtime switch or
// at compilation. // at compilation.
#ifndef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
#else // V8_NATIVE_REGEXP #else // V8_INTERPRETED_REGEXP
if (!FLAG_regexp_entry_native) { if (!FLAG_regexp_entry_native) {
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
return; return;
@ -7659,7 +7659,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// Do the runtime call to execute the regexp. // Do the runtime call to execute the regexp.
__ bind(&runtime); __ bind(&runtime);
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1); __ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
} }
@ -8262,7 +8262,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// passed in register. // passed in register.
#ifdef _WIN64 #ifdef _WIN64
__ movq(rcx, rax); __ movq(rcx, rax);
#else // ! defined(_WIN64) #else // _WIN64
__ movq(rdi, rax); __ movq(rdi, rax);
#endif #endif
__ movq(kScratchRegister, __ movq(kScratchRegister,
@ -8296,7 +8296,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
__ lea(rdx, Operand(rsp, 4 * kPointerSize)); __ lea(rdx, Operand(rsp, 4 * kPointerSize));
} }
#else // ! defined(_WIN64) #else // _WIN64
// GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9. // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9.
__ movq(rdi, r14); // argc. __ movq(rdi, r14); // argc.
__ movq(rsi, r15); // argv. __ movq(rsi, r15); // argv.

View File

@ -39,7 +39,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
/* /*
* This assembler uses the following register assignment convention * This assembler uses the following register assignment convention
@ -1310,6 +1310,6 @@ void RegExpMacroAssemblerX64::LoadCurrentCharacterUnchecked(int cp_offset,
#undef __ #undef __
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -31,7 +31,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler { class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler {
public: public:
@ -271,7 +271,7 @@ class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler {
Label stack_overflow_label_; Label stack_overflow_label_;
}; };
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
}} // namespace v8::internal }} // namespace v8::internal

View File

@ -5439,7 +5439,7 @@ TEST(DebugBreakInMessageHandler) {
} }
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
// Debug event handler which gets the function on the top frame and schedules a // Debug event handler which gets the function on the top frame and schedules a
// break a number of times. // break a number of times.
static void DebugEventDebugBreak( static void DebugEventDebugBreak(
@ -5506,7 +5506,7 @@ TEST(RegExpDebugBreak) {
CHECK_EQ(1, break_point_hit_count); CHECK_EQ(1, break_point_hit_count);
CHECK_EQ("f", last_function_hit); CHECK_EQ("f", last_function_hit);
} }
#endif // V8_NATIVE_REGEXP #endif // V8_INTERPRETED_REGEXP
// Common part of EvalContextData and NestedBreakEventContextData tests. // Common part of EvalContextData and NestedBreakEventContextData tests.

View File

@ -38,7 +38,9 @@
#include "jsregexp.h" #include "jsregexp.h"
#include "regexp-macro-assembler.h" #include "regexp-macro-assembler.h"
#include "regexp-macro-assembler-irregexp.h" #include "regexp-macro-assembler-irregexp.h"
#ifdef V8_NATIVE_REGEXP #ifdef V8_INTERPRETED_REGEXP
#include "interpreter-irregexp.h"
#else // V8_INTERPRETED_REGEXP
#ifdef V8_TARGET_ARCH_ARM #ifdef V8_TARGET_ARCH_ARM
#include "arm/macro-assembler-arm.h" #include "arm/macro-assembler-arm.h"
#include "arm/regexp-macro-assembler-arm.h" #include "arm/regexp-macro-assembler-arm.h"
@ -51,9 +53,7 @@
#include "ia32/macro-assembler-ia32.h" #include "ia32/macro-assembler-ia32.h"
#include "ia32/regexp-macro-assembler-ia32.h" #include "ia32/regexp-macro-assembler-ia32.h"
#endif #endif
#else #endif // V8_INTERPRETED_REGEXP
#include "interpreter-irregexp.h"
#endif
using namespace v8::internal; using namespace v8::internal;
@ -645,7 +645,7 @@ TEST(ParsePossessiveRepetition) {
// Tests of interpreter. // Tests of interpreter.
#ifdef V8_NATIVE_REGEXP #ifndef V8_INTERPRETED_REGEXP
#if V8_TARGET_ARCH_IA32 #if V8_TARGET_ARCH_IA32
typedef RegExpMacroAssemblerIA32 ArchRegExpMacroAssembler; typedef RegExpMacroAssemblerIA32 ArchRegExpMacroAssembler;
@ -1267,7 +1267,7 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
Top::clear_pending_exception(); Top::clear_pending_exception();
} }
#else // ! V8_REGEX_NATIVE #else // V8_INTERPRETED_REGEXP
TEST(MacroAssembler) { TEST(MacroAssembler) {
V8::Initialize(NULL); V8::Initialize(NULL);
@ -1332,7 +1332,7 @@ TEST(MacroAssembler) {
CHECK_EQ(42, captures[0]); CHECK_EQ(42, captures[0]);
} }
#endif // ! V8_REGEXP_NATIVE #endif // V8_INTERPRETED_REGEXP
TEST(AddInverseToTable) { TEST(AddInverseToTable) {

View File

@ -31,7 +31,6 @@
'gcc_version%': 'unknown', 'gcc_version%': 'unknown',
'target_arch%': 'ia32', 'target_arch%': 'ia32',
'v8_use_snapshot%': 'true', 'v8_use_snapshot%': 'true',
'v8_regexp%': 'native',
}, },
'target_defaults': { 'target_defaults': {
'defines': [ 'defines': [
@ -48,13 +47,11 @@
['target_arch=="ia32"', { ['target_arch=="ia32"', {
'defines': [ 'defines': [
'V8_TARGET_ARCH_IA32', 'V8_TARGET_ARCH_IA32',
'V8_NATIVE_REGEXP',
], ],
}], }],
['target_arch=="x64"', { ['target_arch=="x64"', {
'defines': [ 'defines': [
'V8_TARGET_ARCH_X64', 'V8_TARGET_ARCH_X64',
'V8_NATIVE_REGEXP',
], ],
}], }],
], ],

View File

@ -1650,7 +1650,6 @@
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)", "$(GCC_PREPROCESSOR_DEFINITIONS)",
V8_TARGET_ARCH_IA32, V8_TARGET_ARCH_IA32,
V8_NATIVE_REGEXP,
DEBUG, DEBUG,
V8_ENABLE_CHECKS, V8_ENABLE_CHECKS,
ENABLE_DEBUGGER_SUPPORT, ENABLE_DEBUGGER_SUPPORT,
@ -1666,7 +1665,6 @@
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)", "$(GCC_PREPROCESSOR_DEFINITIONS)",
V8_TARGET_ARCH_IA32, V8_TARGET_ARCH_IA32,
V8_NATIVE_REGEXP,
NDEBUG, NDEBUG,
ENABLE_DEBUGGER_SUPPORT, ENABLE_DEBUGGER_SUPPORT,
); );
@ -1683,7 +1681,6 @@
"$(GCC_PREPROCESSOR_DEFINITIONS)", "$(GCC_PREPROCESSOR_DEFINITIONS)",
ENABLE_DISASSEMBLER, ENABLE_DISASSEMBLER,
V8_TARGET_ARCH_IA32, V8_TARGET_ARCH_IA32,
V8_NATIVE_REGEXP,
ENABLE_LOGGING_AND_PROFILING, ENABLE_LOGGING_AND_PROFILING,
ENABLE_DEBUGGER_SUPPORT, ENABLE_DEBUGGER_SUPPORT,
); );
@ -1700,7 +1697,6 @@
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)", "$(GCC_PREPROCESSOR_DEFINITIONS)",
V8_TARGET_ARCH_IA32, V8_TARGET_ARCH_IA32,
V8_NATIVE_REGEXP,
NDEBUG, NDEBUG,
ENABLE_DEBUGGER_SUPPORT, ENABLE_DEBUGGER_SUPPORT,
); );

View File

@ -8,7 +8,7 @@
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
PreprocessorDefinitions="_USE_32BIT_TIME_T;V8_TARGET_ARCH_ARM;V8_NATIVE_REGEXP" PreprocessorDefinitions="_USE_32BIT_TIME_T;V8_TARGET_ARCH_ARM"
DisableSpecificWarnings="4996" DisableSpecificWarnings="4996"
/> />
</VisualStudioPropertySheet> </VisualStudioPropertySheet>

View File

@ -8,7 +8,7 @@
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
PreprocessorDefinitions="_USE_32BIT_TIME_T;V8_TARGET_ARCH_IA32;V8_NATIVE_REGEXP" PreprocessorDefinitions="_USE_32BIT_TIME_T;V8_TARGET_ARCH_IA32"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"

View File

@ -8,7 +8,7 @@
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
PreprocessorDefinitions="V8_TARGET_ARCH_X64;V8_NATIVE_REGEXP" PreprocessorDefinitions="V8_TARGET_ARCH_X64"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"