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

Issue 683433003: Integrate the Irregexp Regular Expression Engine. (Closed)

Created:
6 years, 1 month ago by zerny-google
Modified:
6 years ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Integrate the Irregexp Regular Expression Engine. This rebases the original irregexp port [1] on top our copy of V8 r24065 [2]. [1]: https://codereview.chromium.org/539153002/ [2]: https://codereview.chromium.org/678193004/ BUG=

Patch Set 1 #

Patch Set 2 : remove DispatchTable #

Patch Set 3 : typo #

Patch Set 4 : unneeded edits #

Patch Set 5 : rebase #

Total comments: 7

Patch Set 6 : rebase, enable tests, remove *CodeUnitsAt #

Total comments: 8

Patch Set 7 : rebase on copy: avoid "add" of V8 files #

Patch Set 8 : rebase and comments (assert, initialize, jscre flag) #

Patch Set 9 : indentation #

Patch Set 10 : rm some TODOs #

Patch Set 11 : byte-order assert & context-var #

Total comments: 22

Patch Set 12 : more comments #

Total comments: 17

Patch Set 13 : intrinsics #

Patch Set 14 : formatting and removed binds-in-args #

Total comments: 7

Patch Set 15 : more comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6478 lines, -4284 lines) Patch
M runtime/lib/regexp.cc View 1 2 3 4 5 6 7 8 3 chunks +36 lines, -2 lines 0 comments Download
M runtime/lib/regexp_patch.dart View 1 2 3 4 5 6 7 5 chunks +123 lines, -3 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 12 chunks +130 lines, -17 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +28 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_range_analysis.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +36 lines, -0 lines 0 comments Download
M runtime/vm/growable_array.h View 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +35 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 15 chunks +214 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +30 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 3 4 5 6 7 3 chunks +146 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_arm64.cc View 1 2 3 4 5 6 7 3 chunks +117 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +167 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 3 4 5 6 7 3 chunks +117 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +129 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -1 line 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +38 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -0 lines 0 comments Download
M runtime/vm/method_recognizer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +49 lines, -1 line 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +36 lines, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +9 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +30 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -1 line 0 comments Download
M runtime/vm/raw_object_snapshot.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M runtime/vm/regexp.h View 1 2 3 4 5 6 7 8 9 10 11 43 chunks +387 lines, -439 lines 0 comments Download
M runtime/vm/regexp.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 192 chunks +1307 lines, -1573 lines 0 comments Download
M runtime/vm/regexp_assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +539 lines, -74 lines 0 comments Download
M runtime/vm/regexp_assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1836 lines, -4 lines 0 comments Download
M runtime/vm/regexp_ast.h View 2 3 4 5 6 7 chunks +187 lines, -181 lines 0 comments Download
M runtime/vm/regexp_ast.cc View 2 3 4 5 6 10 chunks +101 lines, -103 lines 0 comments Download
M runtime/vm/regexp_parser.h View 2 3 4 5 6 8 chunks +53 lines, -55 lines 0 comments Download
M runtime/vm/regexp_parser.cc View 2 3 4 5 6 48 chunks +280 lines, -205 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +38 lines, -0 lines 0 comments Download
M runtime/vm/unibrow.h View 1 2 3 4 5 6 7 2 chunks +25 lines, -29 lines 0 comments Download
M runtime/vm/unibrow.cc View 2 3 4 5 6 13 chunks +47 lines, -1574 lines 0 comments Download
M runtime/vm/unibrow-inl.h View 2 3 4 5 6 3 chunks +6 lines, -10 lines 0 comments Download
M runtime/vm/unicode.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/vm_sources.gypi View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 2 chunks +0 lines, -6 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (1 generated)
zerny-google
Rebased Jakob's CL on the latest V8. PTAL. Once the tests are landed, I'll rebase ...
6 years, 1 month ago (2014-10-28 08:34:06 UTC) #2
Ivan Posva
https://codereview.chromium.org/683433003/diff/80001/runtime/lib/regexp.cc File runtime/lib/regexp.cc (right): https://codereview.chromium.org/683433003/diff/80001/runtime/lib/regexp.cc#newcode29 runtime/lib/regexp.cc:29: #if defined(USE_JSCRE) Let's figure out whether this is even ...
6 years, 1 month ago (2014-10-31 07:32:38 UTC) #3
zerny-google
Thanks for the comments. https://codereview.chromium.org/683433003/diff/80001/runtime/lib/regexp.cc File runtime/lib/regexp.cc (right): https://codereview.chromium.org/683433003/diff/80001/runtime/lib/regexp.cc#newcode29 runtime/lib/regexp.cc:29: #if defined(USE_JSCRE) On 2014/10/31 07:32:37, ...
6 years, 1 month ago (2014-10-31 11:54:26 UTC) #4
zerny-google
> After some discussion with Florian, we have decided to avoid this dart code and ...
6 years, 1 month ago (2014-10-31 15:01:39 UTC) #5
zerny-google
Rebased properly on top of the "V8 copy" CL. The latest patch set now shows ...
6 years, 1 month ago (2014-11-03 08:48:32 UTC) #6
Ivan Posva
Some more comments as discussed in person already. Also I would prefer to either make ...
6 years, 1 month ago (2014-11-03 08:52:21 UTC) #7
zerny-google
Thanks for the new round of comments. I've added FLAG_use_jscre with default value 'false' and ...
6 years, 1 month ago (2014-11-03 14:03:41 UTC) #8
Ivan Posva
https://codereview.chromium.org/683433003/diff/200001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/object.cc#newcode5453 runtime/vm/object.cc:5453: ASSERT(obj.IsJSRegExp()); The Cast below is executing this assertion exactly. ...
6 years, 1 month ago (2014-11-05 07:55:10 UTC) #9
Ivan Posva
https://codereview.chromium.org/683433003/diff/200001/runtime/vm/parser.cc File runtime/vm/parser.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/parser.cc#newcode224 runtime/vm/parser.cc:224: const intptr_t num_params = function().num_fixed_parameters();; As far as I ...
6 years, 1 month ago (2014-11-05 07:56:31 UTC) #10
zerny-google
Thanks for the comments! https://codereview.chromium.org/683433003/diff/200001/runtime/vm/object.cc File runtime/vm/object.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/object.cc#newcode5453 runtime/vm/object.cc:5453: ASSERT(obj.IsJSRegExp()); On 2014/11/05 07:55:09, Ivan ...
6 years, 1 month ago (2014-11-05 11:52:00 UTC) #11
Ivan Posva
https://codereview.chromium.org/683433003/diff/200001/runtime/vm/regexp.cc File runtime/vm/regexp.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/regexp.cc#newcode5107 runtime/vm/regexp.cc:5107: Function::New(String::Handle(isolate, Symbols::New("RegExp")), On 2014/11/05 11:52:00, zerny-google wrote: > On ...
6 years, 1 month ago (2014-11-07 08:46:54 UTC) #12
Ivan Posva
Next round of questions... -Ivan https://codereview.chromium.org/683433003/diff/200001/runtime/vm/flow_graph_range_analysis.cc File runtime/vm/flow_graph_range_analysis.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/flow_graph_range_analysis.cc#newcode2835 runtime/vm/flow_graph_range_analysis.cc:2835: RangeBoundary::FromConstant(kMaxUint32)); Would we ever ...
6 years, 1 month ago (2014-11-10 08:16:24 UTC) #13
zerny-google
Thanks again. Answers are inlined below. https://codereview.chromium.org/683433003/diff/200001/runtime/vm/flow_graph_range_analysis.cc File runtime/vm/flow_graph_range_analysis.cc (right): https://codereview.chromium.org/683433003/diff/200001/runtime/vm/flow_graph_range_analysis.cc#newcode2835 runtime/vm/flow_graph_range_analysis.cc:2835: RangeBoundary::FromConstant(kMaxUint32)); On 2014/11/10 ...
6 years, 1 month ago (2014-11-10 09:10:42 UTC) #14
Ivan Posva
https://codereview.chromium.org/683433003/diff/220001/runtime/vm/intrinsifier.cc File runtime/vm/intrinsifier.cc (right): https://codereview.chromium.org/683433003/diff/220001/runtime/vm/intrinsifier.cc#newcode73 runtime/vm/intrinsifier.cc:73: CORE_REGEXP_LIB_INTRINSIC_LIST(SETUP_FUNCTION); Did you add an intrinsic for JSCRE? https://codereview.chromium.org/683433003/diff/220001/runtime/vm/intrinsifier_arm.cc ...
6 years, 1 month ago (2014-11-14 08:42:50 UTC) #15
zerny-google
Thanks for the comments. Addressed in the latest patch set. https://codereview.chromium.org/683433003/diff/220001/runtime/vm/intrinsifier.cc File runtime/vm/intrinsifier.cc (right): https://codereview.chromium.org/683433003/diff/220001/runtime/vm/intrinsifier.cc#newcode73 ...
6 years, 1 month ago (2014-11-14 12:18:57 UTC) #16
Ivan Posva
Generally LGTM especially with the follow up patches. Please work with John to make sure ...
6 years ago (2014-11-24 06:49:02 UTC) #17
zerny-google
6 years ago (2014-11-24 13:07:03 UTC) #18
Thanks for the reviews! The observatory looks reasonable (entries are marked by
RegExp.irregexp) and I'll talk with John about possible improvements. Regarding
tests, the tests are not verified to be compatible with jsshell and other
browser backends so I'll leave the non-d8/vm skip in place.

This CL has been merged with the other irregexp CLs into which is ready for
commit: https://codereview.chromium.org/744853003/

https://codereview.chromium.org/683433003/diff/260001/runtime/vm/compiler.cc
File runtime/vm/compiler.cc (right):

https://codereview.chromium.org/683433003/diff/260001/runtime/vm/compiler.cc#...
runtime/vm/compiler.cc:86: class DefaultCompilationPipeline : public
CompilationPipeline {
On 2014/11/24 06:49:02, Ivan Posva wrote:
> Maybe this should be DartCompilationPipeline?

Done.

https://codereview.chromium.org/683433003/diff/260001/runtime/vm/compiler.cc#...
runtime/vm/compiler.cc:110: class IrregexpCompilationPipeline : public
DefaultCompilationPipeline {
On 2014/11/24 06:49:02, Ivan Posva wrote:
> Shouldn't this inherit from CompilationPipeline directly? There is nothing to
be
> inherited from the default Dart compilation pipeline.

Done.

https://codereview.chromium.org/683433003/diff/260001/runtime/vm/method_recog...
File runtime/vm/method_recognizer.h (right):

https://codereview.chromium.org/683433003/diff/260001/runtime/vm/method_recog...
runtime/vm/method_recognizer.h:203: #define CORE_REGEXP_LIB_INTRINSIC_LIST(V)   
                                  \
On 2014/11/24 06:49:02, Ivan Posva wrote:
> Is this special handling still needed now that the intrinsifier properly deals
> with JSCRE being enabled?

Not needed any more. Folded it into CORE_LIB_INTRINSIC_LIST.

Powered by Google App Engine
This is Rietveld 408576698