Index: src/objects-inl.h |
=================================================================== |
--- src/objects-inl.h (revision 4462) |
+++ src/objects-inl.h (working copy) |
@@ -2113,6 +2113,20 @@ |
} |
+void Map::set_function_with_prototype(bool value) { |
+ if (value) { |
+ set_bit_field2(bit_field2() | (1 << kFunctionWithPrototype)); |
+ } else { |
+ set_bit_field2(bit_field2() & ~(1 << kFunctionWithPrototype)); |
+ } |
+} |
+ |
+ |
+bool Map::function_with_prototype() { |
+ return ((1 << kFunctionWithPrototype) & bit_field2()) != 0; |
+} |
+ |
+ |
void Map::set_is_access_check_needed(bool access_check_needed) { |
if (access_check_needed) { |
set_bit_field(bit_field() | (1 << kIsAccessCheckNeeded)); |
@@ -2568,7 +2582,11 @@ |
return instance_prototype(); |
} |
+bool JSFunction::should_have_prototype() { |
+ return map()->function_with_prototype(); |
+} |
+ |
bool JSFunction::is_compiled() { |
return shared()->is_compiled(); |
} |