Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 753c80e5bb4db517c0815dfee109e550448d3ad5..619fb778ecd637d7f1a960460644c6550d7353b6 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5589,8 +5589,8 @@ ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
-ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
- |
+ACCESSORS(SharedFunctionInfo, function_identifier, Object, |
+ kFunctionIdentifierOffset) |
SMI_ACCESSORS(FunctionTemplateInfo, length, kLengthOffset) |
BOOL_ACCESSORS(FunctionTemplateInfo, flag, hidden_prototype, |
@@ -5923,21 +5923,6 @@ void SharedFunctionInfo::set_api_func_data(FunctionTemplateInfo* data) { |
set_function_data(data); |
} |
-bool SharedFunctionInfo::HasBuiltinFunctionId() { |
- return function_data()->IsSmi(); |
-} |
- |
- |
-BuiltinFunctionId SharedFunctionInfo::builtin_function_id() { |
- DCHECK(HasBuiltinFunctionId()); |
- return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); |
-} |
- |
-void SharedFunctionInfo::set_builtin_function_id(BuiltinFunctionId id) { |
- DCHECK(function_data()->IsUndefined() || HasBuiltinFunctionId()); |
- set_function_data(Smi::FromInt(id)); |
-} |
- |
bool SharedFunctionInfo::HasBytecodeArray() { |
return function_data()->IsBytecodeArray(); |
} |
@@ -5958,6 +5943,37 @@ void SharedFunctionInfo::ClearBytecodeArray() { |
set_function_data(GetHeap()->undefined_value()); |
} |
+bool SharedFunctionInfo::HasBuiltinFunctionId() { |
+ return function_identifier()->IsSmi(); |
+} |
+ |
+BuiltinFunctionId SharedFunctionInfo::builtin_function_id() { |
+ DCHECK(HasBuiltinFunctionId()); |
+ return static_cast<BuiltinFunctionId>( |
+ Smi::cast(function_identifier())->value()); |
+} |
+ |
+void SharedFunctionInfo::set_builtin_function_id(BuiltinFunctionId id) { |
+ set_function_identifier(Smi::FromInt(id)); |
+} |
+ |
+bool SharedFunctionInfo::HasInferredName() { |
+ return function_identifier()->IsString(); |
+} |
+ |
+String* SharedFunctionInfo::inferred_name() { |
+ if (HasInferredName()) { |
+ return String::cast(function_identifier()); |
+ } |
+ DCHECK(function_identifier()->IsUndefined() || HasBuiltinFunctionId()); |
+ return GetIsolate()->heap()->empty_string(); |
+} |
+ |
+void SharedFunctionInfo::set_inferred_name(String* inferred_name) { |
+ DCHECK(function_identifier()->IsUndefined() || HasInferredName()); |
+ set_function_identifier(inferred_name); |
+} |
+ |
int SharedFunctionInfo::ic_age() { |
return ICAgeBits::decode(counters()); |
} |