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

Unified Diff: src/objects.h

Issue 2125163004: Correctly format builtin constructors in stack traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160704-string-number-builtins
Patch Set: Rebase Created 4 years, 5 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/isolate.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 3495c8740da669e2d1661a99de059bc3fe4e1fb3..1ee2a987bf23bbf4319093e5f4404045a147d2ec 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -5063,6 +5063,12 @@ class Code: public HeapObject {
inline bool can_have_weak_objects();
inline void set_can_have_weak_objects(bool value);
+ // [is_construct_stub]: For kind BUILTIN, tells whether the code object
+ // represents a hand-written construct stub
+ // (e.g., NumberConstructor_ConstructStub).
+ inline bool is_construct_stub();
+ inline void set_is_construct_stub(bool value);
+
// [has_deoptimization_support]: For FUNCTION kind, tells if it has
// deoptimization support.
inline bool has_deoptimization_support();
@@ -5398,9 +5404,11 @@ class Code: public HeapObject {
kStackSlotsFirstBit + kStackSlotsBitCount;
static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1;
static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1;
+ // Could be moved to overlap previous bits when we need more space.
+ static const int kIsConstructStub = kCanHaveWeakObjects + 1;
STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
- STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32);
+ STATIC_ASSERT(kIsConstructStub + 1 <= 32);
class StackSlotsField: public BitField<int,
kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT
@@ -5410,6 +5418,8 @@ class Code: public HeapObject {
}; // NOLINT
class CanHaveWeakObjectsField
: public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT
+ class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> {
+ }; // NOLINT
// KindSpecificFlags2 layout (ALL)
static const int kIsCrankshaftedBit = 0;
@@ -6878,6 +6888,10 @@ class SharedFunctionInfo: public HeapObject {
// [construct stub]: Code stub for constructing instances of this function.
DECL_ACCESSORS(construct_stub, Code)
+ // Sets the given code as the construct stub, and marks builtin code objects
+ // as a construct stub.
+ void SetConstructStub(Code* code);
+
// Returns if this function has been compiled to native code yet.
inline bool is_compiled();
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698