Index: src/factory.cc |
=================================================================== |
--- src/factory.cc (revision 1489) |
+++ src/factory.cc (working copy) |
@@ -851,12 +851,13 @@ |
} |
-void Factory::SetRegExpData(Handle<JSRegExp> regexp, |
- JSRegExp::Type type, |
- Handle<String> source, |
- JSRegExp::Flags flags, |
- Handle<Object> data) { |
- Handle<FixedArray> store = NewFixedArray(JSRegExp::kDataSize); |
+void Factory::SetRegExpAtomData(Handle<JSRegExp> regexp, |
+ JSRegExp::Type type, |
+ Handle<String> source, |
+ JSRegExp::Flags flags, |
+ Handle<Object> data) { |
+ Handle<FixedArray> store = NewFixedArray(JSRegExp::kAtomDataSize); |
+ |
store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); |
store->set(JSRegExp::kSourceIndex, *source); |
store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value())); |
@@ -864,7 +865,26 @@ |
regexp->set_data(*store); |
} |
+void Factory::SetRegExpIrregexpData(Handle<JSRegExp> regexp, |
+ JSRegExp::Type type, |
+ Handle<String> source, |
+ JSRegExp::Flags flags, |
+ int capture_count) { |
+ Handle<FixedArray> store = NewFixedArray(JSRegExp::kIrregexpDataSize); |
+ store->set(JSRegExp::kTagIndex, Smi::FromInt(type)); |
+ store->set(JSRegExp::kSourceIndex, *source); |
+ store->set(JSRegExp::kFlagsIndex, Smi::FromInt(flags.value())); |
+ store->set(JSRegExp::kIrregexpASCIICodeIndex, Heap::the_hole_value()); |
+ store->set(JSRegExp::kIrregexpUC16CodeIndex, Heap::the_hole_value()); |
+ store->set(JSRegExp::kIrregexpMaxRegisterCountIndex, Smi::FromInt(0)); |
+ store->set(JSRegExp::kIrregexpCaptureCountIndex, |
+ Smi::FromInt(capture_count)); |
+ regexp->set_data(*store); |
+} |
+ |
+ |
+ |
void Factory::ConfigureInstance(Handle<FunctionTemplateInfo> desc, |
Handle<JSObject> instance, |
bool* pending_exception) { |