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

Issue 3034060: Create a new RegExp object for every evaluation of a RegExp literal. (Closed)

Created:
10 years, 4 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Create a new RegExp object for every evaluation of a RegExp literal. Changes necessary to following ES5 semantics and matching Safari - in ES3 the same RegExp object was generated by each evaluation of the RegExp literal. Fixes bug 704.

Patch Set 1 #

Total comments: 17

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+562 lines, -85 lines) Patch
M src/arm/codegen-arm.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 5 chunks +58 lines, -14 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 3 chunks +56 lines, -4 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M src/codegen.h View 2 chunks +19 lines, -20 lines 0 comments Download
M src/full-codegen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/ia32/codegen-ia32.cc View 4 chunks +84 lines, -3 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 2 chunks +76 lines, -10 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 chunk +20 lines, -7 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/regexp.js View 3 chunks +3 lines, -3 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M src/string.js View 4 chunks +8 lines, -5 lines 0 comments Download
M src/x64/codegen-x64.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 3 chunks +83 lines, -2 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 2 chunks +75 lines, -9 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 chunk +12 lines, -4 lines 0 comments Download
M test/mjsunit/object-literal.js View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Lasse Reichstein
@kmillikin, please check the virtual frame usage in ia32 and x64 for any misunderstandings.
10 years, 4 months ago (2010-08-06 09:16:09 UTC) #1
Rodolph Perfetta
http://codereview.chromium.org/3034060/diff/1/2 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/3034060/diff/1/2#newcode5356 src/arm/codegen-arm.cc:5356: __ tst(tmp, Operand(kSmiTagMask)); the eor and tst could be ...
10 years, 4 months ago (2010-08-06 10:19:13 UTC) #2
Lasse Reichstein
http://codereview.chromium.org/3034060/diff/1/2 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/3034060/diff/1/2#newcode5356 src/arm/codegen-arm.cc:5356: __ tst(tmp, Operand(kSmiTagMask)); If I understand it corretly, the ...
10 years, 4 months ago (2010-08-06 10:32:28 UTC) #3
Rodolph Perfetta
http://codereview.chromium.org/3034060/diff/1/2 File src/arm/codegen-arm.cc (right): http://codereview.chromium.org/3034060/diff/1/2#newcode5356 src/arm/codegen-arm.cc:5356: __ tst(tmp, Operand(kSmiTagMask)); You are right, I went a ...
10 years, 4 months ago (2010-08-06 11:01:23 UTC) #4
Erik Corry
LGTM but we need a test that feeds Smis into the regexp cache routines (test ...
10 years, 4 months ago (2010-08-06 11:16:28 UTC) #5
Lasse Reichstein
10 years, 4 months ago (2010-08-06 13:03:10 UTC) #6
http://codereview.chromium.org/3034060/diff/1/2
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/3034060/diff/1/2#newcode3312
src/arm/codegen-arm.cc:3312: literal = frame_->PopToRegister(r0);
Comment added.

http://codereview.chromium.org/3034060/diff/1/2#newcode3316
src/arm/codegen-arm.cc:3316: __ str(tmp, FieldMemOperand(r0, i));
Macro added. For now it just does the same, but with a larger overhead.

http://codereview.chromium.org/3034060/diff/1/2#newcode5347
src/arm/codegen-arm.cc:5347: Register tmp = r2;
Changed to scratch0/scratch1.

http://codereview.chromium.org/3034060/diff/1/2#newcode5350
src/arm/codegen-arm.cc:5350: Label done;
Added comment

http://codereview.chromium.org/3034060/diff/1/4
File src/arm/full-codegen-arm.cc (right):

http://codereview.chromium.org/3034060/diff/1/4#newcode1140
src/arm/full-codegen-arm.cc:1140: __ str(r2, FieldMemOperand(r0, i));
Too.

http://codereview.chromium.org/3034060/diff/1/14
File src/runtime.cc (right):

http://codereview.chromium.org/3034060/diff/1/14#newcode7600
src/runtime.cc:7600: RUNTIME_ASSERT(size <= Heap::MaxObjectSizeInNewSpace());
Added constant for Heap::InitialSemiSpaceSize() * 3/4

http://codereview.chromium.org/3034060/diff/1/16
File src/string.js (right):

http://codereview.chromium.org/3034060/diff/1/16#newcode625
src/string.js:625: // Reuse lastIndex field for split limit when type is
"split".
Apparently we didn't hit it.

Powered by Google App Engine
This is Rietveld 408576698