aboutsummaryrefslogtreecommitdiff
path: root/src/ast/ast.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2016-09-16 13:49:30 +0100
committerBen Murdoch <benm@google.com>2016-09-23 11:30:04 +0100
commit13e2dadd00298019ed862f2b2fc5068bba730bcf (patch)
tree8d68955e70aae5b4afbfad61346ac5d6b9b1862e /src/ast/ast.h
parent50c70ae05086e6572e0064594c698ae182e4a8bd (diff)
downloadv8-13e2dadd00298019ed862f2b2fc5068bba730bcf.tar.gz
Merge V8 5.3.332.45.
Test: Manual Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
Diffstat (limited to 'src/ast/ast.h')
-rw-r--r--src/ast/ast.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/ast/ast.h b/src/ast/ast.h
index bee0bab4..5ae90f8d 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -130,7 +130,8 @@ class FeedbackVectorSlotCache {
public:
explicit FeedbackVectorSlotCache(Zone* zone)
: zone_(zone),
- hash_map_(HashMap::PointersMatch, ZoneHashMap::kDefaultHashMapCapacity,
+ hash_map_(base::HashMap::PointersMatch,
+ ZoneHashMap::kDefaultHashMapCapacity,
ZoneAllocationPolicy(zone)) {}
void Put(Variable* variable, FeedbackVectorSlot slot) {
@@ -1501,9 +1502,10 @@ class ObjectLiteral final : public MaterializedLiteral {
};
struct Accessors: public ZoneObject {
- Accessors() : getter(NULL), setter(NULL) {}
+ Accessors() : getter(NULL), setter(NULL), bailout_id(BailoutId::None()) {}
ObjectLiteralProperty* getter;
ObjectLiteralProperty* setter;
+ BailoutId bailout_id;
};
BailoutId CreateLiteralId() const { return BailoutId(local_id(0)); }
@@ -1551,13 +1553,14 @@ class ObjectLiteral final : public MaterializedLiteral {
// A map from property names to getter/setter pairs allocated in the zone.
-class AccessorTable : public TemplateHashMap<Literal, ObjectLiteral::Accessors,
- ZoneAllocationPolicy> {
+class AccessorTable
+ : public base::TemplateHashMap<Literal, ObjectLiteral::Accessors,
+ ZoneAllocationPolicy> {
public:
explicit AccessorTable(Zone* zone)
- : TemplateHashMap<Literal, ObjectLiteral::Accessors,
- ZoneAllocationPolicy>(Literal::Match,
- ZoneAllocationPolicy(zone)),
+ : base::TemplateHashMap<Literal, ObjectLiteral::Accessors,
+ ZoneAllocationPolicy>(Literal::Match,
+ ZoneAllocationPolicy(zone)),
zone_(zone) {}
Iterator lookup(Literal* literal) {
@@ -2004,6 +2007,9 @@ class CallNew final : public Expression {
void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
FeedbackVectorSlotCache* cache) override {
callnew_feedback_slot_ = spec->AddGeneralSlot();
+ // Construct calls have two slots, one right after the other.
+ // The second slot stores the call count for monomorphic calls.
+ spec->AddGeneralSlot();
}
FeedbackVectorSlot CallNewFeedbackSlot() {
@@ -3053,20 +3059,26 @@ class AstVisitor BASE_EMBEDDED {
class AstTraversalVisitor : public AstVisitor {
public:
explicit AstTraversalVisitor(Isolate* isolate);
+ explicit AstTraversalVisitor(uintptr_t stack_limit);
virtual ~AstTraversalVisitor() {}
// Iteration left-to-right.
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
void VisitStatements(ZoneList<Statement*>* statements) override;
- void VisitExpressions(ZoneList<Expression*>* expressions) override;
// Individual nodes
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
+ protected:
+ int depth() { return depth_; }
+
private:
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
+
+ int depth_;
+
DISALLOW_COPY_AND_ASSIGN(AstTraversalVisitor);
};