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

Unified Diff: runtime/vm/object.h

Issue 1201383002: Port irregexp bytecode compiler and interpreter from V8 r24065. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/intrinsifier_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8a4f8700e687625fec409cdbf587626cb2b56588..b259aace91f16999c855816517e56f68c8c5f363 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -7670,11 +7670,18 @@ class JSRegExp : public Instance {
bool is_ignore_case() const { return (flags() & kIgnoreCase); }
bool is_multi_line() const { return (flags() & kMultiLine); }
+ intptr_t num_registers() const { return raw_ptr()->num_registers_; }
+
RawString* pattern() const { return raw_ptr()->pattern_; }
RawSmi* num_bracket_expressions() const {
return raw_ptr()->num_bracket_expressions_;
}
+ RawTypedData* bytecode(bool is_one_byte) const {
+ return is_one_byte ? raw_ptr()->one_byte_bytecode_
+ : raw_ptr()->two_byte_bytecode_;
+ }
+
static intptr_t function_offset(intptr_t cid) {
switch (cid) {
case kOneByteStringCid:
@@ -7702,6 +7709,7 @@ class JSRegExp : public Instance {
void set_pattern(const String& pattern) const;
void set_function(intptr_t cid, const Function& value) const;
+ void set_bytecode(bool is_one_byte, const TypedData& bytecode) const;
void set_num_bracket_expressions(intptr_t value) const;
void set_is_global() const { set_flags(flags() | kGlobal); }
@@ -7709,6 +7717,9 @@ class JSRegExp : public Instance {
void set_is_multi_line() const { set_flags(flags() | kMultiLine); }
void set_is_simple() const { set_type(kSimple); }
void set_is_complex() const { set_type(kComplex); }
+ void set_num_registers(intptr_t value) const {
+ StoreNonPointer(&raw_ptr()->num_registers_, value);
+ }
void* GetDataStartAddress() const;
static RawJSRegExp* FromDataStartAddress(void* data);
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698