Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 18f45f3ba8a66516b1323dc51034d46e3e702753..4cc9b9f8340238549a12136218672eb205771007 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -2361,8 +2361,7 @@ ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
ACCESSORS(SharedFunctionInfo, name, Object, kNameOffset) |
ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
kInstanceClassNameOffset) |
-ACCESSORS(SharedFunctionInfo, function_data, Object, |
- kExternalReferenceDataOffset) |
+ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
ACCESSORS(SharedFunctionInfo, script, Object, kScriptOffset) |
ACCESSORS(SharedFunctionInfo, debug_info, Object, kDebugInfoOffset) |
ACCESSORS(SharedFunctionInfo, inferred_name, String, kInferredNameOffset) |
@@ -2453,6 +2452,22 @@ bool SharedFunctionInfo::is_compiled() { |
} |
+bool SharedFunctionInfo::IsApiFunction() { |
+ return function_data()->IsFunctionTemplateInfo(); |
+} |
+ |
+ |
+FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
+ ASSERT(IsApiFunction()); |
+ return FunctionTemplateInfo::cast(function_data()); |
+} |
+ |
+ |
+bool SharedFunctionInfo::HasCustomCallGenerator() { |
+ return function_data()->IsProxy(); |
+} |
+ |
+ |
bool JSFunction::IsBoilerplate() { |
return map() == Heap::boilerplate_function_map(); |
} |