Skip to content

Commit 73ec559

Browse files
rmcilroyCommit Bot
authored andcommitted
Reland "[Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile"
This is a reland of 21da12a Original change's description: > [Compiler] Remove CompileDebugCode and EnsureBytecode and replace with Compile > > Removes the Compiler::CompileDebugCode and Compiler::EnsureBytecode functions > and replaces them with a Compiler::Compile(Handle<SharedFunctionInfo> shared) > function. The code in compiler.cc is refactored to use this function to compile > the SharedFunctionInfo when compiling a JSFunction. > > Also does some other cleanup: > - Removes CompileUnoptimizedFunction and inlines into new Compiler function > - Moves code to create top level SharedFunctionInfo into CompilerTopLevel and > out of FinalizeUnoptimizedCompile. > > BUG=v8:6409 > > Change-Id: Ic54afcd8eb005c17f3ae6b2355060846e3091ca3 > Reviewed-on: https://chromium-review.googlesource.com/613760 > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Cr-Commit-Position: refs/heads/master@{#47394} TBR=yangguo@chromium.org TBR=jarin@chromium.org Bug: v8:6409 Change-Id: If2eae66a85f129e746a5ca5c04935540f3f86b04 Reviewed-on: https://chromium-review.googlesource.com/618886 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#47399}
1 parent d74ec7e commit 73ec559

17 files changed

+204
-320
lines changed

src/compilation-info.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ CompilationInfo::CompilationInfo(Zone* zone, Isolate* isolate,
3030
literal_ = literal;
3131
source_range_map_ = parse_info->source_range_map();
3232

33-
if (parse_info->is_debug()) MarkAsDebug();
3433
if (parse_info->is_eval()) MarkAsEval();
3534
if (parse_info->is_native()) MarkAsNative();
3635
if (parse_info->will_serialize()) MarkAsSerializing();

src/compilation-info.h

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,17 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
3636
// Various configuration flags for a compilation, as well as some properties
3737
// of the compiled code produced by a compilation.
3838
enum Flag {
39-
kIsDebug = 1 << 0,
40-
kIsEval = 1 << 1,
41-
kIsNative = 1 << 2,
42-
kSerializing = 1 << 3,
43-
kAccessorInliningEnabled = 1 << 4,
44-
kFunctionContextSpecializing = 1 << 5,
45-
kInliningEnabled = 1 << 6,
46-
kDisableFutureOptimization = 1 << 7,
47-
kSplittingEnabled = 1 << 8,
48-
kSourcePositionsEnabled = 1 << 9,
49-
kBailoutOnUninitialized = 1 << 10,
50-
kLoopPeelingEnabled = 1 << 11,
39+
kIsEval = 1 << 0,
40+
kIsNative = 1 << 1,
41+
kSerializing = 1 << 2,
42+
kAccessorInliningEnabled = 1 << 3,
43+
kFunctionContextSpecializing = 1 << 4,
44+
kInliningEnabled = 1 << 5,
45+
kDisableFutureOptimization = 1 << 6,
46+
kSplittingEnabled = 1 << 7,
47+
kSourcePositionsEnabled = 1 << 8,
48+
kBailoutOnUninitialized = 1 << 9,
49+
kLoopPeelingEnabled = 1 << 10,
5150
};
5251

5352
// Construct a compilation info for unoptimized compilation.
@@ -108,11 +107,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
108107

109108
// Flags used by unoptimized compilation.
110109

111-
// Compiles marked as debug produce unoptimized code with debug break slots.
112-
// Inner functions that cannot be compiled w/o context are compiled eagerly.
113-
void MarkAsDebug() { SetFlag(kIsDebug); }
114-
bool is_debug() const { return GetFlag(kIsDebug); }
115-
116110
void MarkAsSerializing() { SetFlag(kSerializing); }
117111
bool will_serialize() const { return GetFlag(kSerializing); }
118112

@@ -161,7 +155,7 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
161155
// Generate a pre-aged prologue if we are optimizing for size, which
162156
// will make code old more aggressive. Only apply to Code::FUNCTION,
163157
// since only functions are aged in the compilation cache.
164-
return FLAG_optimize_for_size && FLAG_age_code && !is_debug() &&
158+
return FLAG_optimize_for_size && FLAG_age_code &&
165159
output_code_kind() == Code::FUNCTION;
166160
}
167161

0 commit comments

Comments
 (0)