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

Issue 2840018: [Isolates] Moved more compilation-related globals (builtins, runtime, &c.)... (Closed)

Created:
10 years, 6 months ago by zarko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

[Isolates] Moved more compilation-related globals (builtins, runtime, &c.) Most changes are mechanical. This CL and the previous CL were built by choosing static symbols from libv8_g.a and lifting them to Isolate. The effects on the codebase as a whole are difficult to predict (eg, adding const to ensure that Runtime::Function*s aren't modified hits a bunch of files, but fixing up the pretty printer is self-contained). -------------------------------------------------------------------------------- isolate.h / isolate.cc (as always). -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- builtins.h, builtins.cc -------------------------------------------------------------------------------- The old Isolate::builtins() was renamed to js_builtins_object(). Per-isolate data (generated code) moved to Isolate; global data (eg, javascript_argc_) kept in place. Moved the initialization of the builtin function table around to avoid a local static variable. -------------------------------------------------------------------------------- codegen.cc, */codegen-*.h, runtime.h, runtime.cc, codegen.h -------------------------------------------------------------------------------- Runtime::Function* accessors were made to return const pointers. kInlineRuntimeLUT is actually non-constant (it can be patched). Moved the table into Isolate; the initialization logic and declaration of the table type itself are in runtime.cc/runtime.h. Statics from runtime.cc moved into RuntimeState class. -------------------------------------------------------------------------------- liveedit.h, liveedit.cc: -------------------------------------------------------------------------------- -> active_function_info_listener -> liveedit_compare_substrings_buf1 -> liveedit_compare_substrings_buf2 LiveEditFunctionTracker now takes a pointer to an Isolate but keeps it around only in debug builds. -------------------------------------------------------------------------------- vm-state.h, vm-state.cc, vm-state-inl.h: -------------------------------------------------------------------------------- -> vm_state -------------------------------------------------------------------------------- compiler.cc: -------------------------------------------------------------------------------- -> compiler_safe_string_input_buffer -------------------------------------------------------------------------------- assembler.h: -------------------------------------------------------------------------------- -> external_reference_redirector -------------------------------------------------------------------------------- ast.h, ast.cc, parser.cc: -------------------------------------------------------------------------------- -> always_allow_natives_syntax moved various sentinels to AstSentinels class (it was unclear that these things were being used as constants.) -------------------------------------------------------------------------------- prettyprinter.h, prettyprinter.cc: -------------------------------------------------------------------------------- Unnecessary global moved to instance variable (no need to touch Isolate). -------------------------------------------------------------------------------- Simple replacement/const+: -------------------------------------------------------------------------------- arm/builtins-arm.cc arm/codegen-arm.cc arm/full-codegen-arm.cc arm/macro-assembler-arm.h arm/macro-assembler-arm.cc arm/stub-cache-arm.cc arm/virtual-frame-arm.h arm/virtual-frame-arm.cc assembler.cc bootstrapper.cc debug.cc disassembler.cc execution.cc factory.cc frames.cc heap.cc ia32/builtins-ia32.cc ia32/codegen-ia32.cc ia32/full-codegen-ia32.cc ia32/macro-assembler-ia32.h ia32/macro-assembler-ia32.cc ia32/stub-cache-ia32.cc ia32/virtual-frame-ia32.h ia32/virtual-frame-ia32.cc ic.h ic.cc messages.cc stub-cache.cc top.cc x64/builtins-x64.cc x64/codegen-x64.cc x64/macro-assembler-x64.h x64/macro-assembler-x64.cc x64/stub-cache-x64.cc x64/virtual-frame-x64.h x64/virtual-frame-x64.cc test-alloc.cc test-debug.cc test-disasm-ia32.cc test-log-stack-tracker.cc apply.js (merged in from bleeding_edge) Committed: http://code.google.com/p/v8/source/detail?r=4956

Patch Set 1 #

Total comments: 11

Patch Set 2 : rebase and address comments #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1155 lines, -785 lines) Patch
M src/SConscript View 2 1 chunk +0 lines, -1 line 0 comments Download
M src/api.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/builtins-arm.cc View 1 2 7 chunks +14 lines, -11 lines 0 comments Download
M src/arm/codegen-arm.h View 1 2 2 chunks +6 lines, -11 lines 0 comments Download
M src/arm/codegen-arm.cc View 1 2 8 chunks +15 lines, -9 lines 0 comments Download
M src/arm/full-codegen-arm.cc View 1 2 16 chunks +32 lines, -16 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 1 2 8 chunks +15 lines, -9 lines 0 comments Download
M src/arm/virtual-frame-arm.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/arm/virtual-frame-arm.cc View 1 2 6 chunks +11 lines, -6 lines 0 comments Download
M src/assembler.h View 1 2 3 chunks +12 lines, -12 lines 0 comments Download
M src/assembler.cc View 1 2 2 chunks +2 lines, -5 lines 0 comments Download
M src/ast.h View 1 2 7 chunks +35 lines, -24 lines 0 comments Download
M src/ast.cc View 1 2 2 chunks +9 lines, -6 lines 0 comments Download
M src/bootstrapper.cc View 1 2 10 chunks +19 lines, -10 lines 0 comments Download
M src/builtins.h View 1 2 4 chunks +30 lines, -14 lines 0 comments Download
M src/builtins.cc View 1 2 3 chunks +84 lines, -48 lines 0 comments Download
M src/codegen.h View 2 1 chunk +0 lines, -35 lines 0 comments Download
M src/codegen.cc View 1 2 4 chunks +13 lines, -23 lines 0 comments Download
M src/compiler.cc View 1 2 17 chunks +24 lines, -19 lines 0 comments Download
M src/debug.cc View 1 2 7 chunks +20 lines, -14 lines 0 comments Download
M src/disassembler.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/execution.cc View 1 2 6 chunks +8 lines, -6 lines 0 comments Download
M src/factory.cc View 1 2 4 chunks +8 lines, -12 lines 0 comments Download
M src/frames.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M src/heap.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 8 chunks +16 lines, -11 lines 0 comments Download
M src/ia32/codegen-ia32.h View 1 2 3 chunks +8 lines, -12 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 6 chunks +11 lines, -6 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 2 16 chunks +32 lines, -16 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 8 chunks +15 lines, -9 lines 0 comments Download
M src/ia32/virtual-frame-ia32.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/virtual-frame-ia32.cc View 1 2 6 chunks +11 lines, -6 lines 0 comments Download
M src/ic.h View 1 2 4 chunks +28 lines, -14 lines 0 comments Download
M src/ic.cc View 1 2 6 chunks +33 lines, -18 lines 0 comments Download
M src/isolate.h View 1 2 8 chunks +44 lines, -1 line 0 comments Download
M src/isolate.cc View 1 2 6 chunks +8 lines, -2 lines 0 comments Download
M src/liveedit.h View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M src/liveedit.cc View 1 2 12 chunks +39 lines, -30 lines 0 comments Download
M src/messages.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/parser.cc View 1 2 14 chunks +21 lines, -48 lines 0 comments Download
M src/prettyprinter.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/prettyprinter.cc View 1 2 4 chunks +5 lines, -15 lines 0 comments Download
M src/runtime.h View 1 2 4 chunks +178 lines, -2 lines 1 comment Download
M src/runtime.cc View 1 2 54 chunks +164 lines, -153 lines 0 comments Download
M src/stub-cache.cc View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M src/top.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/vm-state.h View 1 2 3 chunks +8 lines, -6 lines 0 comments Download
D src/vm-state.cc View 1 2 1 chunk +0 lines, -39 lines 0 comments Download
M src/vm-state-inl.h View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 8 chunks +16 lines, -12 lines 0 comments Download
M src/x64/codegen-x64.h View 1 2 3 chunks +9 lines, -11 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 2 6 chunks +11 lines, -6 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 2 16 chunks +32 lines, -16 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 8 chunks +15 lines, -9 lines 0 comments Download
M src/x64/virtual-frame-x64.h View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M src/x64/virtual-frame-x64.cc View 1 2 4 chunks +7 lines, -4 lines 0 comments Download
M test/cctest/test-alloc.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M test/cctest/test-debug.cc View 1 2 3 chunks +9 lines, -4 lines 0 comments Download
M test/cctest/test-disasm-ia32.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M test/cctest/test-log-stack-tracer.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M test/mjsunit/apply.js View 2 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
zarko
Almost through all the symbols! Thanks Luke
10 years, 6 months ago (2010-06-24 19:46:28 UTC) #1
Vitaly Repeshko
Thanks for the detailed change description! I'll need another quick pass. -- Vitaly http://codereview.chromium.org/2840018/diff/1/17 File ...
10 years, 6 months ago (2010-06-25 13:30:31 UTC) #2
zarko
I think I fixed the issues you brought up; thanks for the help. http://codereview.chromium.org/2840018/diff/1/41 File ...
10 years, 6 months ago (2010-06-25 21:26:59 UTC) #3
Vitaly Repeshko
LGTM. http://codereview.chromium.org/2840018/diff/60003/64049 File src/runtime.h (right): http://codereview.chromium.org/2840018/diff/60003/64049#newcode602 src/runtime.h:602: class InlineRuntimeFunctionsTable { Even though it has "Runtime" ...
10 years, 6 months ago (2010-06-25 22:26:28 UTC) #4
zarko
On 2010/06/25 22:26:28, Vitaly wrote: > LGTM. > > http://codereview.chromium.org/2840018/diff/60003/64049 > File src/runtime.h (right): > ...
10 years, 6 months ago (2010-06-25 22:35:36 UTC) #5
Vitaly Repeshko
10 years, 6 months ago (2010-06-25 22:40:15 UTC) #6
On 2010/06/25 22:35:36, zarko wrote:
> On 2010/06/25 22:26:28, Vitaly wrote:
> > LGTM.
> > 
> > http://codereview.chromium.org/2840018/diff/60003/64049
> > File src/runtime.h (right):
> > 
> > http://codereview.chromium.org/2840018/diff/60003/64049#newcode602
> > src/runtime.h:602: class InlineRuntimeFunctionsTable {
> > Even though it has "Runtime" in its name it's really a part of the code
> > generator. Please move it to codegen.h (if possible). Also consider moving
> > lookup/patching functions from the code generator to this class.
> 
> I tried this while I was building the patch-- but the compiler becomes very
> upset when isolate.h begins to depend on codegen.h, and I think that doing the
> inlining is important. (I can try to change this in another, smaller patch if
it
> turns out to be really unpalatable.)

Inlining the inline runtime functions table into the Isolate class should not be
critical for performance. Please try using a pointer to it. One extra
indirection during code generation is not an issue.


Thanks,
Vitaly

Powered by Google App Engine
This is Rietveld 408576698