Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 4a8c65d6939374b6009230f61b4646979bd62012..41dc76efc655374836f8e8377661a87bbee237ae 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5817,6 +5817,10 @@ FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
return FunctionTemplateInfo::cast(function_data()); |
} |
+void SharedFunctionInfo::set_api_func_data(FunctionTemplateInfo* data) { |
+ DCHECK(function_data()->IsUndefined()); |
+ set_function_data(data); |
+} |
bool SharedFunctionInfo::HasBuiltinFunctionId() { |
return function_data()->IsSmi(); |
@@ -5828,6 +5832,10 @@ BuiltinFunctionId SharedFunctionInfo::builtin_function_id() { |
return static_cast<BuiltinFunctionId>(Smi::cast(function_data())->value()); |
} |
+void SharedFunctionInfo::set_builtin_function_id(BuiltinFunctionId id) { |
+ DCHECK(function_data()->IsUndefined()); |
+ set_function_data(Smi::FromInt(id)); |
+} |
bool SharedFunctionInfo::HasBytecodeArray() { |
return function_data()->IsBytecodeArray(); |
@@ -5839,6 +5847,11 @@ BytecodeArray* SharedFunctionInfo::bytecode_array() { |
return BytecodeArray::cast(function_data()); |
} |
+void SharedFunctionInfo::set_bytecode_array(Object* bytecode) { |
+ DCHECK(bytecode->IsBytecodeArray() || bytecode->IsUndefined()); |
rmcilroy
2016/02/25 14:18:06
Is this ever set to undefined other than the test
Michael Starzinger
2016/02/25 14:43:43
Done. Only done in the test. Added the ClearByteco
|
+ DCHECK(function_data()->IsUndefined() || HasBytecodeArray()); |
+ set_function_data(bytecode); |
+} |
int SharedFunctionInfo::ic_age() { |
return ICAgeBits::decode(counters()); |