| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index f22c96ccdfc7a2f3972202844c500ab78bfab1ce..c63090687b96a912975b39a69522a647d7d8a458 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -171,7 +171,6 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
|
|
|
| enum AstPropertiesFlag {
|
| kDontInline,
|
| - kDontOptimize,
|
| kDontSelfOptimize,
|
| kDontSoftInline,
|
| kDontCache
|
| @@ -289,6 +288,14 @@ class SmallMapList V8_FINAL {
|
| Add(map, zone);
|
| }
|
|
|
| + void FilterForPossibleTransitions(Map* root_map) {
|
| + for (int i = list_.length() - 1; i >= 0; i--) {
|
| + if (at(i)->FindRootMap() != root_map) {
|
| + list_.RemoveElement(list_.at(i));
|
| + }
|
| + }
|
| + }
|
| +
|
| void Add(Handle<Map> handle, Zone* zone) {
|
| list_.Add(handle.location(), zone);
|
| }
|
| @@ -367,12 +374,6 @@ class Expression : public AstNode {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
| - Handle<Map> GetMonomorphicReceiverType() {
|
| - ASSERT(IsMonomorphic());
|
| - SmallMapList* types = GetReceiverTypes();
|
| - ASSERT(types != NULL && types->length() == 1);
|
| - return types->at(0);
|
| - }
|
| virtual KeyedAccessStoreMode GetStoreMode() {
|
| UNREACHABLE();
|
| return STANDARD_STORE;
|
| @@ -2038,7 +2039,8 @@ class CompareOperation V8_FINAL : public Expression {
|
| op_(op),
|
| left_(left),
|
| right_(right),
|
| - pos_(pos) {
|
| + pos_(pos),
|
| + combined_type_(Type::Null(), isolate) {
|
| ASSERT(Token::IsCompareOp(op));
|
| }
|
|
|
| @@ -2315,6 +2317,12 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| ast_properties_ = *ast_properties;
|
| }
|
|
|
| + bool dont_optimize() { return dont_optimize_reason_ != kNoReason; }
|
| + BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
|
| + void set_dont_optimize_reason(BailoutReason reason) {
|
| + dont_optimize_reason_ = reason;
|
| + }
|
| +
|
| protected:
|
| FunctionLiteral(Isolate* isolate,
|
| Handle<String> name,
|
| @@ -2334,6 +2342,7 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| scope_(scope),
|
| body_(body),
|
| inferred_name_(isolate->factory()->empty_string()),
|
| + dont_optimize_reason_(kNoReason),
|
| materialized_literal_count_(materialized_literal_count),
|
| expected_property_count_(expected_property_count),
|
| handler_count_(handler_count),
|
| @@ -2355,6 +2364,7 @@ class FunctionLiteral V8_FINAL : public Expression {
|
| ZoneList<Statement*>* body_;
|
| Handle<String> inferred_name_;
|
| AstProperties ast_properties_;
|
| + BailoutReason dont_optimize_reason_;
|
|
|
| int materialized_literal_count_;
|
| int expected_property_count_;
|
| @@ -2829,9 +2839,10 @@ private: \
|
|
|
| class AstConstructionVisitor BASE_EMBEDDED {
|
| public:
|
| - AstConstructionVisitor() { }
|
| + AstConstructionVisitor() : dont_optimize_reason_(kNoReason) { }
|
|
|
| AstProperties* ast_properties() { return &properties_; }
|
| + BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
|
|
|
| private:
|
| template<class> friend class AstNodeFactory;
|
| @@ -2844,8 +2855,12 @@ class AstConstructionVisitor BASE_EMBEDDED {
|
|
|
| void increase_node_count() { properties_.add_node_count(1); }
|
| void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); }
|
| + void set_dont_optimize_reason(BailoutReason reason) {
|
| + dont_optimize_reason_ = reason;
|
| + }
|
|
|
| AstProperties properties_;
|
| + BailoutReason dont_optimize_reason_;
|
| };
|
|
|
|
|
|
|