Commit 98708041 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent 94d6a136
...@@ -122,7 +122,7 @@ RegExpMacroAssemblerARM::RegExpMacroAssemblerARM( ...@@ -122,7 +122,7 @@ RegExpMacroAssemblerARM::RegExpMacroAssemblerARM(
int registers_to_save, int registers_to_save,
Zone* zone) Zone* zone)
: NativeRegExpMacroAssembler(zone), : NativeRegExpMacroAssembler(zone),
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)), masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
mode_(mode), mode_(mode),
num_registers_(registers_to_save), num_registers_(registers_to_save),
num_saved_registers_(registers_to_save), num_saved_registers_(registers_to_save),
......
...@@ -104,7 +104,7 @@ RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32( ...@@ -104,7 +104,7 @@ RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32(
int registers_to_save, int registers_to_save,
Zone* zone) Zone* zone)
: NativeRegExpMacroAssembler(zone), : NativeRegExpMacroAssembler(zone),
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)), masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
mode_(mode), mode_(mode),
num_registers_(registers_to_save), num_registers_(registers_to_save),
num_saved_registers_(registers_to_save), num_saved_registers_(registers_to_save),
......
...@@ -122,7 +122,7 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS( ...@@ -122,7 +122,7 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(
int registers_to_save, int registers_to_save,
Zone* zone) Zone* zone)
: NativeRegExpMacroAssembler(zone), : NativeRegExpMacroAssembler(zone),
masm_(new MacroAssembler(Isolate::Current(), NULL, kRegExpCodeSize)), masm_(new MacroAssembler(zone->isolate(), NULL, kRegExpCodeSize)),
mode_(mode), mode_(mode),
num_registers_(registers_to_save), num_registers_(registers_to_save),
num_saved_registers_(registers_to_save), num_saved_registers_(registers_to_save),
......
...@@ -44,8 +44,8 @@ RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector<byte> buffer, ...@@ -44,8 +44,8 @@ RegExpMacroAssemblerIrregexp::RegExpMacroAssemblerIrregexp(Vector<byte> buffer,
buffer_(buffer), buffer_(buffer),
pc_(0), pc_(0),
own_buffer_(false), own_buffer_(false),
advance_current_end_(kInvalidPC) { advance_current_end_(kInvalidPC),
} isolate_(zone->isolate()) { }
RegExpMacroAssemblerIrregexp::~RegExpMacroAssemblerIrregexp() { RegExpMacroAssemblerIrregexp::~RegExpMacroAssemblerIrregexp() {
...@@ -445,7 +445,7 @@ Handle<HeapObject> RegExpMacroAssemblerIrregexp::GetCode( ...@@ -445,7 +445,7 @@ Handle<HeapObject> RegExpMacroAssemblerIrregexp::GetCode(
Handle<String> source) { Handle<String> source) {
Bind(&backtrack_); Bind(&backtrack_);
Emit(BC_POP_BT, 0); Emit(BC_POP_BT, 0);
Handle<ByteArray> array = FACTORY->NewByteArray(length()); Handle<ByteArray> array = isolate_->factory()->NewByteArray(length());
Copy(array->GetDataStartAddress()); Copy(array->GetDataStartAddress());
return array; return array;
} }
......
...@@ -134,6 +134,8 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler { ...@@ -134,6 +134,8 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
int advance_current_offset_; int advance_current_offset_;
int advance_current_end_; int advance_current_end_;
Isolate* isolate_;
static const int kInvalidPC = -1; static const int kInvalidPC = -1;
DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp); DISALLOW_IMPLICIT_CONSTRUCTORS(RegExpMacroAssemblerIrregexp);
......
...@@ -120,7 +120,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64( ...@@ -120,7 +120,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(
int registers_to_save, int registers_to_save,
Zone* zone) Zone* zone)
: NativeRegExpMacroAssembler(zone), : NativeRegExpMacroAssembler(zone),
masm_(Isolate::Current(), NULL, kRegExpCodeSize), masm_(zone->isolate(), NULL, kRegExpCodeSize),
no_root_array_scope_(&masm_), no_root_array_scope_(&masm_),
code_relative_fixup_positions_(4, zone), code_relative_fixup_positions_(4, zone),
mode_(mode), mode_(mode),
......
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