Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1078)

Unified Diff: runtime/vm/raw_object.h

Issue 539153002: Port and integrate the irregexp engine from V8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed Ivan's comments. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 9e48fac0af64fcdb95096cdfdd6d3ce973a789c2..1b446d189d702b0bf0f65c1162f512156f3dfc40 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -631,6 +631,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 {
@@ -673,6 +674,7 @@ class RawFunction : public RawObject {
int16_t num_fixed_parameters_;
int16_t num_optional_parameters_; // > 0: positional; < 0: named.
int16_t deoptimization_counter_;
+ int16_t regexp_cid_;
uint32_t kind_tag_; // See Function::KindTagBits.
uint16_t optimized_instruction_count_;
uint16_t optimized_call_site_count_;
@@ -1768,8 +1770,12 @@ 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_;
RawObject** to() {
- return reinterpret_cast<RawObject**>(&ptr()->pattern_);
+ return reinterpret_cast<RawObject**>(&ptr()->external_two_byte_function_);
}
// A bitfield with two fields:
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698