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

Unified Diff: runtime/vm/object.cc

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, 6 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 1249a5ea2d4d2d5ae71b0d883a220070c1a783bc..b21af1d6157d9c25c24410547412baf28f59bd80 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -20747,6 +20747,15 @@ void JSRegExp::set_function(intptr_t cid, const Function& value) const {
}
+void JSRegExp::set_bytecode(bool is_one_byte, const TypedData& bytecode) const {
+ if (is_one_byte) {
+ StorePointer(&raw_ptr()->one_byte_bytecode_, bytecode.raw());
+ } else {
+ StorePointer(&raw_ptr()->two_byte_bytecode_, bytecode.raw());
+ }
srdjan 2015/07/07 19:30:25 If you set one, do you want to make sure that the
rmacnak 2015/07/07 21:42:53 They can both be set if one tries to match the reg
+}
+
+
void JSRegExp::set_num_bracket_expressions(intptr_t value) const {
StoreSmi(&raw_ptr()->num_bracket_expressions_, Smi::New(value));
}
@@ -20762,6 +20771,7 @@ RawJSRegExp* JSRegExp::New(Heap::Space space) {
result ^= raw;
result.set_type(kUnitialized);
result.set_flags(0);
+ result.set_num_registers(-1);
}
return result.raw();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/regexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698