Remove use of Isolate::Current in regexp macro assemblers.
BUG= R=hpayer@chromium.org Review URL: https://chromiumcodereview.appspot.com/16026020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
94d6a13682
commit
987080415e
@ -122,7 +122,7 @@ RegExpMacroAssemblerARM::RegExpMacroAssemblerARM(
|
||||
int registers_to_save,
|
||||
Zone* zone)
|
||||
: NativeRegExpMacroAssembler(zone),
|
||||
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -104,7 +104,7 @@ RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32(
|
||||
int registers_to_save,
|
||||
Zone* zone)
|
||||
: NativeRegExpMacroAssembler(zone),
|
||||
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -122,7 +122,7 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(
|
||||
int registers_to_save,
|
||||
Zone* zone)
|
||||
: NativeRegExpMacroAssembler(zone),
|
||||
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -44,8 +44,8 @@ RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector<byte> buffer,
|
||||
buffer_(buffer),
|
||||
pc_(0),
|
||||
own_buffer_(false),
|
||||
advance_current_end_(kInvalidPC) {
|
||||
}
|
||||
advance_current_end_(kInvalidPC),
|
||||
isolate_(zone->isolate()) { }
|
||||
|
||||
|
||||
RegExpMacroAssemblerIrregexp::~RegExpMacroAssemblerIrregexp() {
|
||||
@ -445,7 +445,7 @@ Handle<HeapObject> RegExpMacroAssemblerIrregexp::GetCode(
|
||||
Handle<String> source) {
|
||||
Bind(&backtrack_);
|
||||
Emit(BC_POP_BT, 0);
|
||||
Handle<ByteArray> array = FACTORY->NewByteArray(length());
|
||||
Handle<ByteArray> array = isolate_->factory()->NewByteArray(length());
|
||||
Copy(array->GetDataStartAddress());
|
||||
return array;
|
||||
}
|
||||
|
@ -134,6 +134,8 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
|
||||
int advance_current_offset_;
|
||||
int advance_current_end_;
|
||||
|
||||
Isolate* isolate_;
|
||||
|
||||
static const int kInvalidPC = -1;
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp);
|
||||
|
@ -120,7 +120,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(
|
||||
int registers_to_save,
|
||||
Zone* zone)
|
||||
: NativeRegExpMacroAssembler(zone),
|
||||
masm_(Isolate::Current(), NULL, kRegExpCodeSize),
|
||||
masm_(zone->isolate(), NULL, kRegExpCodeSize),
|
||||
no_root_array_scope_(&masm_),
|
||||
code_relative_fixup_positions_(4, zone),
|
||||
mode_(mode),
|
||||
|
Loading…
Reference in New Issue
Block a user