Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 19d0ef40b48b2aa3d5b3fc7dda0a4577ecf00707..5ad4d229d28783fadcfef876e3c676f2a675bec6 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -639,6 +639,7 @@ class RawFunction : public RawObject { |
kMethodExtractor, // converts method into implicit closure on the receiver. |
kNoSuchMethodDispatcher, // invokes noSuchMethod. |
kInvokeFieldDispatcher, // invokes a field as a closure. |
+ kIrregexpFunction, // represents a generated irregexp matcher function. |
}; |
enum AsyncModifier { |
@@ -657,6 +658,7 @@ class RawFunction : public RawObject { |
RawString* name_; |
RawObject* owner_; // Class or patch class or mixin class |
// where this function is defined. |
+ RawJSRegExp* regexp_; // The corresponding regexp for irregexp functions. |
Florian Schneider
2014/10/01 17:04:14
Maybe re-use the owner field for this? It is not u
Vyacheslav Egorov (Google)
2014/10/01 20:13:21
Kill this field by being more explicit about compi
jgruber1
2014/10/03 18:59:52
As discussed, the regexp object pointer is now sto
jgruber1
2014/10/03 18:59:53
As discussed, the regexp object pointer is now sto
|
RawAbstractType* result_type_; |
RawArray* parameter_types_; |
RawArray* parameter_names_; |
@@ -684,6 +686,7 @@ class RawFunction : public RawObject { |
uint32_t kind_tag_; // See Function::KindTagBits. |
uint16_t optimized_instruction_count_; |
uint16_t optimized_call_site_count_; |
+ intptr_t regexp_specialization_; |
Florian Schneider
2014/10/01 17:04:14
As mentioned, try using the data_ field for that.
Vyacheslav Egorov (Google)
2014/10/01 20:13:21
Ditto.
jgruber1
2014/10/03 18:59:52
As discussed, changed to int16_t and moved 3 lines
jgruber1
2014/10/03 18:59:53
As discussed, changed to int16_t and moved 3 lines
|
}; |
@@ -1776,8 +1779,16 @@ class RawJSRegExp : public RawInstance { |
RawSmi* data_length_; |
RawSmi* num_bracket_expressions_; |
RawString* pattern_; // Pattern to be used for matching. |
+ RawFunction* one_byte_function_; |
+ RawFunction* two_byte_function_; |
+ RawFunction* external_one_byte_function_; |
+ RawFunction* external_two_byte_function_; |
+ RawString* one_byte_subject_; |
Vyacheslav Egorov (Google)
2014/10/01 20:13:21
This four subject fields smell like memory leak to
jgruber1
2014/10/03 18:59:53
Done.
|
+ RawString* two_byte_subject_; |
+ RawString* external_one_byte_subject_; |
+ RawString* external_two_byte_subject_; |
RawObject** to() { |
- return reinterpret_cast<RawObject**>(&ptr()->pattern_); |
+ return reinterpret_cast<RawObject**>(&ptr()->external_two_byte_subject_); |
} |
// A bitfield with two fields: |