diff options
Diffstat (limited to 'src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h')
-rw-r--r-- | src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h b/src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h index 78cd069..7aea385 100644 --- a/src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h +++ b/src/3rdparty/v8/src/ia32/regexp-macro-assembler-ia32.h @@ -1,4 +1,4 @@ -// Copyright 2008-2009 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -34,17 +34,10 @@ namespace v8 { namespace internal { -#ifdef V8_INTERPRETED_REGEXP -class RegExpMacroAssemblerIA32: public RegExpMacroAssembler { - public: - RegExpMacroAssemblerIA32() { } - virtual ~RegExpMacroAssemblerIA32() { } -}; - -#else // V8_INTERPRETED_REGEXP +#ifndef V8_INTERPRETED_REGEXP class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { public: - RegExpMacroAssemblerIA32(Mode mode, int registers_to_save); + RegExpMacroAssemblerIA32(Mode mode, int registers_to_save, Zone* zone); virtual ~RegExpMacroAssemblerIA32(); virtual int stack_limit_slack(); virtual void AdvanceCurrentPosition(int by); @@ -69,7 +62,6 @@ class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { virtual void CheckNotBackReference(int start_reg, Label* on_no_match); virtual void CheckNotBackReferenceIgnoreCase(int start_reg, Label* on_no_match); - virtual void CheckNotRegistersEqual(int reg1, int reg2, Label* on_not_equal); virtual void CheckNotCharacter(uint32_t c, Label* on_not_equal); virtual void CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask, @@ -111,7 +103,7 @@ class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { virtual void ReadStackPointerFromRegister(int reg); virtual void SetCurrentPositionFromEnd(int by); virtual void SetRegister(int register_index, int to); - virtual void Succeed(); + virtual bool Succeed(); virtual void WriteCurrentPositionToRegister(int reg, int cp_offset); virtual void ClearRegisters(int reg_from, int reg_to); virtual void WriteStackPointerToRegister(int reg); @@ -135,7 +127,11 @@ class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { static const int kInputStart = kStartIndex + kPointerSize; static const int kInputEnd = kInputStart + kPointerSize; static const int kRegisterOutput = kInputEnd + kPointerSize; - static const int kStackHighEnd = kRegisterOutput + kPointerSize; + // For the case of global regular expression, we have room to store at least + // one set of capture results. For the case of non-global regexp, we ignore + // this value. + static const int kNumOutputRegisters = kRegisterOutput + kPointerSize; + static const int kStackHighEnd = kNumOutputRegisters + kPointerSize; static const int kDirectCall = kStackHighEnd + kPointerSize; static const int kIsolate = kDirectCall + kPointerSize; // Below the frame pointer - local stack variables. @@ -144,7 +140,8 @@ class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler { static const int kBackup_esi = kFramePointer - kPointerSize; static const int kBackup_edi = kBackup_esi - kPointerSize; static const int kBackup_ebx = kBackup_edi - kPointerSize; - static const int kInputStartMinusOne = kBackup_ebx - kPointerSize; + static const int kSuccessfulCaptures = kBackup_ebx - kPointerSize; + static const int kInputStartMinusOne = kSuccessfulCaptures - kPointerSize; // First register address. Following registers are below it on the stack. static const int kRegisterZero = kInputStartMinusOne - kPointerSize; |