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

Unified Diff: src/objects.h

Issue 1360403002: Revert of [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 27ab86541832f88f6320286b40007dce0e7f9bb1..af077278043d75a52d073d5e2779921ae3f84f50 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1033,9 +1033,6 @@
// ES6, section 7.2.3 IsCallable.
INLINE(bool IsCallable() const);
- // ES6, section 7.2.4 IsConstructor.
- INLINE(bool IsConstructor() const);
-
INLINE(bool IsSpecObject()) const;
INLINE(bool IsTemplateInfo()) const;
INLINE(bool IsNameDictionary() const);
@@ -5365,10 +5362,11 @@
inline void set_non_instance_prototype(bool value);
inline bool has_non_instance_prototype();
- // Tells whether the instance has a [[Construct]] internal method.
- // This property is implemented according to ES6, section 7.2.4.
- inline void set_is_constructor(bool value);
- inline bool is_constructor() const;
+ // Tells whether function has special prototype property. If not, prototype
+ // property will not be created when accessed (will return undefined),
+ // and construction from this function will not be allowed.
+ inline void set_function_with_prototype(bool value);
+ inline bool function_with_prototype();
// Tells whether the instance with this map should be ignored by the
// Object.getPrototypeOf() function and the __proto__ accessor.
@@ -5396,7 +5394,7 @@
inline void set_is_observed();
inline bool is_observed();
- // Tells whether the instance has a [[Call]] internal method.
+ // Tells whether the instance has a [[Call]] internal field.
// This property is implemented according to ES6, section 7.2.3.
inline void set_is_callable();
inline bool is_callable() const;
@@ -5726,7 +5724,6 @@
inline bool IsPrimitiveMap();
inline bool IsJSObjectMap();
inline bool IsJSArrayMap();
- inline bool IsJSFunctionMap();
inline bool IsStringMap();
inline bool IsJSProxyMap();
inline bool IsJSGlobalProxyMap();
@@ -5831,7 +5828,7 @@
static const int kIsUndetectable = 4;
static const int kIsObserved = 5;
static const int kIsAccessCheckNeeded = 6;
- static const int kIsConstructor = 7;
+ class FunctionWithPrototype: public BitField<bool, 7, 1> {};
// Bit positions for bit field 2
static const int kIsExtensible = 0;
@@ -7133,6 +7130,7 @@
// After prototype is removed, it will not be created when accessed, and
// [[Construct]] from this function will not be allowed.
bool RemovePrototype();
+ inline bool should_have_prototype();
// Accessor for this function's initial map's [[class]]
// property. This is primarily used by ECMA native functions. This
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698