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

Unified Diff: src/ast/ast.h

Issue 1734243004: Remove strong mode support from materialized literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test expectations. Created 4 years, 10 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 | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index dc34e8254e3c671c9c152c8f7be5aab3c986a379..a50eee99ee0b9d2f4f272ab619a1821030bd0a14 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -1337,14 +1337,11 @@ class MaterializedLiteral : public Expression {
return depth_;
}
- bool is_strong() const { return is_strong_; }
-
protected:
- MaterializedLiteral(Zone* zone, int literal_index, bool is_strong, int pos)
+ MaterializedLiteral(Zone* zone, int literal_index, int pos)
: Expression(zone, pos),
literal_index_(literal_index),
is_simple_(false),
- is_strong_(is_strong),
depth_(0) {}
// A materialized literal is simple if the values consist of only
@@ -1373,7 +1370,6 @@ class MaterializedLiteral : public Expression {
private:
int literal_index_;
bool is_simple_;
- bool is_strong_;
int depth_;
friend class AstLiteralReindexer;
@@ -1488,9 +1484,6 @@ class ObjectLiteral final : public MaterializedLiteral {
if (disable_mementos) {
flags |= kDisableMementos;
}
- if (is_strong()) {
- flags |= kIsStrong;
- }
return flags;
}
@@ -1499,8 +1492,7 @@ class ObjectLiteral final : public MaterializedLiteral {
kFastElements = 1,
kHasFunction = 1 << 1,
kShallowProperties = 1 << 2,
- kDisableMementos = 1 << 3,
- kIsStrong = 1 << 4
+ kDisableMementos = 1 << 3
};
struct Accessors: public ZoneObject {
@@ -1532,9 +1524,8 @@ class ObjectLiteral final : public MaterializedLiteral {
protected:
ObjectLiteral(Zone* zone, ZoneList<Property*>* properties, int literal_index,
- int boilerplate_properties, bool has_function, bool is_strong,
- int pos)
- : MaterializedLiteral(zone, literal_index, is_strong, pos),
+ int boilerplate_properties, bool has_function, int pos)
+ : MaterializedLiteral(zone, literal_index, pos),
properties_(properties),
boilerplate_properties_(boilerplate_properties),
fast_elements_(false),
@@ -1587,8 +1578,8 @@ class RegExpLiteral final : public MaterializedLiteral {
protected:
RegExpLiteral(Zone* zone, const AstRawString* pattern, int flags,
- int literal_index, bool is_strong, int pos)
- : MaterializedLiteral(zone, literal_index, is_strong, pos),
+ int literal_index, int pos)
+ : MaterializedLiteral(zone, literal_index, pos),
pattern_(pattern),
flags_(flags) {
set_depth(1);
@@ -1633,9 +1624,6 @@ class ArrayLiteral final : public MaterializedLiteral {
if (disable_mementos) {
flags |= kDisableMementos;
}
- if (is_strong()) {
- flags |= kIsStrong;
- }
return flags;
}
@@ -1655,8 +1643,7 @@ class ArrayLiteral final : public MaterializedLiteral {
enum Flags {
kNoFlags = 0,
kShallowElements = 1,
- kDisableMementos = 1 << 1,
- kIsStrong = 1 << 2
+ kDisableMementos = 1 << 1
};
void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
@@ -1665,9 +1652,8 @@ class ArrayLiteral final : public MaterializedLiteral {
protected:
ArrayLiteral(Zone* zone, ZoneList<Expression*>* values,
- int first_spread_index, int literal_index, bool is_strong,
- int pos)
- : MaterializedLiteral(zone, literal_index, is_strong, pos),
+ int first_spread_index, int literal_index, int pos)
+ : MaterializedLiteral(zone, literal_index, pos),
values_(values),
first_spread_index_(first_spread_index) {}
static int parent_num_ids() { return MaterializedLiteral::num_ids(); }
@@ -3242,11 +3228,10 @@ class AstNodeFactory final BASE_EMBEDDED {
int literal_index,
int boilerplate_properties,
bool has_function,
- bool is_strong,
int pos) {
return new (local_zone_)
ObjectLiteral(local_zone_, properties, literal_index,
- boilerplate_properties, has_function, is_strong, pos);
+ boilerplate_properties, has_function, pos);
}
ObjectLiteral::Property* NewObjectLiteralProperty(
@@ -3265,24 +3250,23 @@ class AstNodeFactory final BASE_EMBEDDED {
}
RegExpLiteral* NewRegExpLiteral(const AstRawString* pattern, int flags,
- int literal_index, bool is_strong, int pos) {
- return new (local_zone_) RegExpLiteral(local_zone_, pattern, flags,
- literal_index, is_strong, pos);
+ int literal_index, int pos) {
+ return new (local_zone_)
+ RegExpLiteral(local_zone_, pattern, flags, literal_index, pos);
}
ArrayLiteral* NewArrayLiteral(ZoneList<Expression*>* values,
int literal_index,
- bool is_strong,
int pos) {
return new (local_zone_)
- ArrayLiteral(local_zone_, values, -1, literal_index, is_strong, pos);
+ ArrayLiteral(local_zone_, values, -1, literal_index, pos);
}
ArrayLiteral* NewArrayLiteral(ZoneList<Expression*>* values,
int first_spread_index, int literal_index,
- bool is_strong, int pos) {
+ int pos) {
return new (local_zone_) ArrayLiteral(
- local_zone_, values, first_spread_index, literal_index, is_strong, pos);
+ local_zone_, values, first_spread_index, literal_index, pos);
}
VariableProxy* NewVariableProxy(Variable* var,
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698