Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/objects-inl.h

Issue 1722003: Added ability to remove prototype from function. In this case, [[Construct]] ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Fixes according to Erik's comments Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698