// with deoptimization support.
if (isolate_->serializer_enabled()) EnableDeoptimizationSupport();
- if (FLAG_context_specialization) MarkAsContextSpecializing();
+ if (FLAG_function_context_specialization) MarkAsFunctionContextSpecializing();
if (FLAG_turbo_inlining) MarkAsInliningEnabled();
if (FLAG_turbo_source_positions) MarkAsSourcePositionsEnabled();
if (FLAG_turbo_splitting) MarkAsSplittingEnabled();
if (info()->shared_info()->asm_function()) {
if (info()->osr_frame()) info()->MarkAsFrameSpecializing();
- info()->MarkAsContextSpecializing();
+ info()->MarkAsFunctionContextSpecializing();
} else if (FLAG_turbo_type_feedback) {
info()->MarkAsTypeFeedbackEnabled();
info()->EnsureFeedbackVector();
if (code->kind() != Code::OPTIMIZED_FUNCTION) return; // Nothing to do.
// Context specialization folds-in the context, so no sharing can occur.
- if (info->is_context_specializing()) return;
- // Frame specialization implies context specialization.
+ if (info->is_function_context_specializing()) return;
+ // Frame specialization implies function context specialization.
DCHECK(!info->is_frame_specializing());
// Do not cache bound functions.
// Cache optimized context-independent code.
if (FLAG_turbo_cache_shared_code && code->is_turbofanned()) {
- DCHECK(!info->is_context_specializing());
+ DCHECK(!info->is_function_context_specializing());
DCHECK(info->osr_ast_id().IsNone());
Handle<SharedFunctionInfo> shared(function->shared());
SharedFunctionInfo::AddSharedCodeToOptimizedCodeMap(shared, code);
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info);
info.SetFunctionType(stub->GetCallInterfaceDescriptor().GetFunctionType());
- info.MarkAsContextSpecializing();
+ info.MarkAsFunctionContextSpecializing();
info.MarkAsDeoptimizationEnabled();
info.SetStub(stub);
kDeoptimizationSupport = 1 << 5,
kDebug = 1 << 6,
kSerializing = 1 << 7,
- kContextSpecializing = 1 << 8,
+ kFunctionContextSpecializing = 1 << 8,
kFrameSpecializing = 1 << 9,
kInliningEnabled = 1 << 10,
kTypingEnabled = 1 << 11,
bool will_serialize() const { return GetFlag(kSerializing); }
- void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); }
+ void MarkAsFunctionContextSpecializing() {
+ SetFlag(kFunctionContextSpecializing);
+ }
- bool is_context_specializing() const { return GetFlag(kContextSpecializing); }
+ bool is_function_context_specializing() const {
+ return GetFlag(kFunctionContextSpecializing);
+ }
void MarkAsFrameSpecializing() { SetFlag(kFrameSpecializing); }
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
data->common(), data->machine());
JSContextSpecialization context_specialization(
- &graph_reducer, data->jsgraph(), data->info()->is_context_specializing()
- ? data->info()->context()
- : MaybeHandle<Context>());
+ &graph_reducer, data->jsgraph(),
+ data->info()->is_function_context_specializing()
+ ? data->info()->context()
+ : MaybeHandle<Context>());
JSFrameSpecialization frame_specialization(data->info()->osr_frame(),
data->jsgraph());
JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled()
DEFINE_BOOL(turbo_source_positions, false,
"track source code positions when building TurboFan IR")
DEFINE_IMPLICATION(trace_turbo, turbo_source_positions)
-DEFINE_BOOL(context_specialization, false,
- "enable context specialization in TurboFan")
+DEFINE_BOOL(function_context_specialization, false,
+ "enable function context specialization in TurboFan")
DEFINE_BOOL(turbo_inlining, false, "enable inlining in TurboFan")
DEFINE_BOOL(trace_turbo_inlining, false, "trace TurboFan inlining")
DEFINE_BOOL(loop_assignment_analysis, true, "perform loop assignment analysis")
function((FLAG_allow_natives_syntax = true, NewFunction(source))),
flags_(flags) {
Compile(function);
- const uint32_t supported_flags = CompilationInfo::kContextSpecializing |
- CompilationInfo::kInliningEnabled |
- CompilationInfo::kTypingEnabled;
+ const uint32_t supported_flags =
+ CompilationInfo::kFunctionContextSpecializing |
+ CompilationInfo::kInliningEnabled | CompilationInfo::kTypingEnabled;
CHECK_EQ(0u, flags_ & ~supported_flags);
}
CHECK(Parser::ParseStatic(info.parse_info()));
info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
- if (flags_ & CompilationInfo::kContextSpecializing) {
- info.MarkAsContextSpecializing();
+ if (flags_ & CompilationInfo::kFunctionContextSpecializing) {
+ info.MarkAsFunctionContextSpecializing();
}
if (flags_ & CompilationInfo::kInliningEnabled) {
info.MarkAsInliningEnabled();
const uint32_t kRestrictedInliningFlags =
- CompilationInfo::kContextSpecializing | CompilationInfo::kTypingEnabled;
+ CompilationInfo::kFunctionContextSpecializing |
+ CompilationInfo::kTypingEnabled;
const uint32_t kInlineFlags = CompilationInfo::kInliningEnabled |
- CompilationInfo::kContextSpecializing |
+ CompilationInfo::kFunctionContextSpecializing |
CompilationInfo::kTypingEnabled;
} // namespace
values_buffer.start(), array_type, arraysize(kValues),
values_buffer.start(), array_type, array_type);
- FunctionTester T(
- source_buffer.start(),
- CompilationInfo::kContextSpecializing | CompilationInfo::kTypingEnabled);
+ FunctionTester T(source_buffer.start(),
+ CompilationInfo::kFunctionContextSpecializing |
+ CompilationInfo::kTypingEnabled);
for (size_t i = 0; i < arraysize(kValues); ++i) {
for (size_t j = 0; j < arraysize(kValues); ++j) {
volatile U value_a = static_cast<U>(kValues[i]);
values_buffer.start(), array_type, arraysize(kValues),
values_buffer.start(), array_type, array_type);
- FunctionTester T(
- source_buffer.start(),
- CompilationInfo::kContextSpecializing | CompilationInfo::kTypingEnabled);
+ FunctionTester T(source_buffer.start(),
+ CompilationInfo::kFunctionContextSpecializing |
+ CompilationInfo::kTypingEnabled);
for (size_t i = 0; i < arraysize(kValues); ++i) {
for (size_t j = 0; j < arraysize(kValues); ++j) {
volatile U value_a = static_cast<U>(kValues[i]);
return;
#endif
// Disable experimental natives that are loaded after deserialization.
- FLAG_context_specialization = false;
+ FLAG_function_context_specialization = false;
FLAG_always_opt = true;
const char* flag = "--turbo-filter=foo";
FlagList::SetFlagsFromString(flag, StrLength(flag));
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --context-specialization
+// Flags: --allow-natives-syntax --function-context-specialization
// Flags: --turbo-filter=f --turbo-inlining
var f = (function() {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --context-specialization --turbo-filter=f
+// Flags: --allow-natives-syntax --function-context-specialization
+// Flags: --turbo-filter=f
(function() {
"use strict";