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

Issue 6824071: Cleanup of ScannerConstants, now named UnicodeCache. (Closed)

Created:
9 years, 8 months ago by Lasse Reichstein
Modified:
9 years, 6 months ago
Reviewers:
Karl Klose
CC:
v8-dev
Visibility:
Public.

Description

Cleanup of ScannerConstants, now named UnicodeCache. The ScannerConstants class was originally static fields on the scanner class. During creation of the stand-alone preparser and later isolates, it has been moved into a separate class with a per-isolate instance. It is used to hold caching unicode Predicate values. This change renames the class to UnicodeCache, and passes a reference to the instance down to methods that doesn't have an easy access to an isolate (to avoid, e.g., having to do an Isolate::Current() for every number parsed). Committed: http://code.google.com/p/v8/source/detail?r=7584

Patch Set 1 #

Total comments: 18

Patch Set 2 : Addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+281 lines, -252 lines) Patch
M src/conversions.h View 1 3 chunks +14 lines, -5 lines 0 comments Download
M src/conversions.cc View 1 19 chunks +40 lines, -43 lines 0 comments Download
M src/dateparser.h View 1 5 chunks +6 lines, -6 lines 0 comments Download
M src/dateparser-inl.h View 1 2 chunks +5 lines, -3 lines 0 comments Download
M src/heap.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/isolate.h View 1 4 chunks +5 lines, -5 lines 0 comments Download
M src/isolate.cc View 1 4 chunks +5 lines, -5 lines 0 comments Download
M src/objects.cc View 4 chunks +20 lines, -4 lines 0 comments Download
M src/parser.h View 1 chunk +1 line, -1 line 0 comments Download
M src/parser.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M src/preparser-api.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M src/runtime.cc View 1 5 chunks +12 lines, -6 lines 0 comments Download
M src/scanner.h View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/scanner.cc View 1 4 chunks +6 lines, -5 lines 0 comments Download
M src/scanner-base.h View 7 chunks +9 lines, -10 lines 0 comments Download
M src/scanner-base.cc View 1 14 chunks +20 lines, -38 lines 0 comments Download
M test/cctest/test-conversions.cc View 4 chunks +111 lines, -96 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 8 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Lasse Reichstein
9 years, 8 months ago (2011-04-12 07:28:59 UTC) #1
Karl Klose
LGTM with comments. The UnicodeCache parameter is used in different positions; in some function it ...
9 years, 8 months ago (2011-04-12 07:55:39 UTC) #2
Lasse Reichstein
9 years, 8 months ago (2011-04-12 08:18:47 UTC) #3
Update all years.

http://codereview.chromium.org/6824071/diff/1/src/dateparser.h
File src/dateparser.h (right):

http://codereview.chromium.org/6824071/diff/1/src/dateparser.h#newcode70
src/dateparser.h:70: explicit InputReader(UnicodeCache* unicode_cache,
Vector<Char> s)
Removed.

http://codereview.chromium.org/6824071/diff/1/src/scanner-base.cc
File src/scanner-base.cc (right):

http://codereview.chromium.org/6824071/diff/1/src/scanner-base.cc#newcode42
src/scanner-base.cc:42: octal_pos_(kNoOctalLocation) {
Done.

http://codereview.chromium.org/6824071/diff/1/test/cctest/test-parsing.cc
File test/cctest/test-parsing.cc (right):

http://codereview.chromium.org/6824071/diff/1/test/cctest/test-parsing.cc#new...
test/cctest/test-parsing.cc:268: i::V8JavaScriptScanner
scanner(ISOLATE->unicode_cache());
I've removed the ISOLATE macro everywhere, but just by replacing it with
i::Isolate::Current(). Let's not optimize our test-cases prematurely.

Powered by Google App Engine
This is Rietveld 408576698