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

Issue 9187005: Enable optimization of top-level code. (Closed)

Created:
8 years, 11 months ago by fschneider
Modified:
8 years, 10 months ago
CC:
v8-dev
Visibility:
Public.

Description

Enable optimization of top-level code and generate deoptimization support lazily. This change enables optimization of top-level and eval-code. For this to work, it adds support for declaring global variables in optimized code. At the same time it disables the eager generation of deoptimization support data in the full code generator (originally introduced in r10040). This speeds up initial compilation and saves memory for functions that won't be optimized. It requires recompiling the function with deoptimization support when we decide to optimize it. Committed: https://code.google.com/p/v8/source/detail?r=10700

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6

Patch Set 3 : fixed problem with eval code, addressed comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -84 lines) Patch
M src/arm/full-codegen-arm.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M src/arm/lithium-arm.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M src/ast.h View 1 8 chunks +24 lines, -9 lines 0 comments Download
M src/compiler.h View 1 2 3 chunks +3 lines, -9 lines 0 comments Download
M src/compiler.cc View 1 2 8 chunks +15 lines, -10 lines 3 comments Download
M src/full-codegen.h View 1 1 chunk +12 lines, -9 lines 0 comments Download
M src/full-codegen.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M src/hydrogen.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 5 chunks +63 lines, -8 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 chunks +28 lines, -0 lines 0 comments Download
M src/ia32/full-codegen-ia32.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 chunks +12 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 chunks +9 lines, -6 lines 0 comments Download
M src/objects.cc View 1 2 2 chunks +3 lines, -6 lines 0 comments Download
M src/objects-inl.h View 1 1 chunk +3 lines, -2 lines 0 comments Download
M src/parser.cc View 1 8 chunks +18 lines, -10 lines 0 comments Download
M src/runtime-profiler.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/x64/full-codegen-x64.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
fschneider
Right now I only changed the default runtime profiler to only look at ticks from ...
8 years, 10 months ago (2012-02-14 08:36:07 UTC) #1
Jakob Kummerow
Looks good so far, just a few comments. Waiting for an update because of that ...
8 years, 10 months ago (2012-02-14 10:08:26 UTC) #2
fschneider
https://chromiumcodereview.appspot.com/9187005/diff/6001/src/compiler.h File src/compiler.h (right): https://chromiumcodereview.appspot.com/9187005/diff/6001/src/compiler.h#newcode1 src/compiler.h:1: // Copyright 2011 the V8 project authors. All rights ...
8 years, 10 months ago (2012-02-14 13:03:11 UTC) #3
Jakob Kummerow
LGTM!
8 years, 10 months ago (2012-02-14 13:08:09 UTC) #4
Tobias Burnus
8 years, 10 months ago (2012-02-14 21:22:55 UTC) #5
Using GCC 4.7, I get "set but not used" warnings. As warnings are fatal
(-Werror), the v8 build fails.

While GCC 4.7 is not (yet) a supported compiler, I would be great if it could be
fixed nevertheless.

https://chromiumcodereview.appspot.com/9187005/diff/15002/src/compiler.cc
File src/compiler.cc (right):

https://chromiumcodereview.appspot.com/9187005/diff/15002/src/compiler.cc#new...
src/compiler.cc:218: Handle<JSFunction> closure = info->closure();
GCC 4.7 warns that closure no longer used but only set. Can the closure() line
be removed?

The patch changed the line:
  info->shared_info()->DisableOptimization(*closure);
to
  info->shared_info()->DisableOptimization();


../src/compiler.cc: In function 'bool
v8::internal::MakeCrankshaftCode(v8::internal::CompilationInfo*)':
../src/compiler.cc:218:24: error: variable 'closure' set but not used
[-Werror=unused-but-set-variable]
../src/compiler.cc:239:24: error: variable 'closure' set but not used
[-Werror=unused-but-set-variable]
../src/compiler.cc:318:24: error: variable 'closure' set but not used
[-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors

https://chromiumcodereview.appspot.com/9187005/diff/15002/src/compiler.cc#new...
src/compiler.cc:239: Handle<JSFunction> closure = info->closure();
Ditto.

https://chromiumcodereview.appspot.com/9187005/diff/15002/src/compiler.cc#new...
src/compiler.cc:318: Handle<JSFunction> closure = info->closure();
Ditto.

Powered by Google App Engine
This is Rietveld 408576698