Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/src/ast/ast.h b/src/ast/ast.h
index bee0bab..5ae90f8 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -130,7 +130,8 @@
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 @@
};
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 @@
// 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 @@
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 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);
};