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

Issue 300037: Fast compiler support for regexp literals.... (Closed)

Created:
11 years, 2 months ago by fschneider
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fast compiler support for regexp literals. For .result = /abc.*/g we generate the following IA-32 code: ... mov ebx,[edi+0x17] mov eax,[ebx+0xb] cmp eax, 0xf5d0e135 ;; object: 0xf5d0e135 <undefined> jnz done push ebx push 0x2 push 0xf5d13805 ;; object: 0xf5d13805 <String[5]: abc.*> push 0xf5d13815 ;; object: 0xf5d13815 <String[1]: g> call RuntimeStub_MaterializeRegExpLiteral done: push eax pop [ebp+0xf4] ... This is very similar to the code previously generated except we do not generate deferred code for the case where we call the runtime. On ARM we use the stm instruction to make pushing the arguments more compact. Committed: http://code.google.com/p/v8/source/detail?r=3109

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -11 lines) Patch
M src/arm/fast-codegen-arm.cc View 1 2 2 chunks +33 lines, -0 lines 0 comments Download
M src/compiler.cc View 2 chunks +1 line, -6 lines 0 comments Download
M src/fast-codegen.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M src/ia32/fast-codegen-ia32.cc View 1 2 2 chunks +35 lines, -0 lines 0 comments Download
M src/x64/fast-codegen-x64.cc View 1 2 2 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
fschneider
RegExpLiteral support in the fast compiler for all 3 platforms.
11 years, 2 months ago (2009-10-21 15:39:16 UTC) #1
Kevin Millikin (Chromium)
LGMT with a few small comments. http://codereview.chromium.org/300037/diff/4001/4006 File src/arm/fast-codegen-arm.cc (right): http://codereview.chromium.org/300037/diff/4001/4006#newcode238 Line 238: __ stm(db_w, ...
11 years, 2 months ago (2009-10-22 04:33:45 UTC) #2
fschneider
11 years, 2 months ago (2009-10-22 09:27:28 UTC) #3
http://codereview.chromium.org/300037/diff/4001/4006
File src/arm/fast-codegen-arm.cc (right):

http://codereview.chromium.org/300037/diff/4001/4006#newcode238
Line 238: __ stm(db_w, sp, r1.bit() | r2.bit() | r3.bit() | r4.bit());
On 2009/10/22 04:33:45, Kevin Millikin wrote:
> I find it helpful to write these left to right in argument order:
> 
> __ stm(db_w, sp, r4.bit() | r3.bit() | r2.bit() | r1.bit())

Done.

http://codereview.chromium.org/300037/diff/4001/4002
File src/ia32/fast-codegen-ia32.cc (right):

http://codereview.chromium.org/300037/diff/4001/4002#newcode365
Line 365: // so do nothing to do here.
On 2009/10/22 04:33:45, Kevin Millikin wrote:
> Extra 'do' in the comment.

Done.

http://codereview.chromium.org/300037/diff/4001/4005
File src/x64/fast-codegen-x64.cc (right):

http://codereview.chromium.org/300037/diff/4001/4005#newcode237
Line 237: __ Cmp(rax, Factory::undefined_value());
On 2009/10/22 04:33:45, Kevin Millikin wrote:
> There is a MacroAssembler::CompareRoot function that you should use here.

Done.

Powered by Google App Engine
This is Rietveld 408576698