Index: src/parser.h |
diff --git a/src/parser.h b/src/parser.h |
index 4d60272497cebbb264aec0de1794fbd1603b75ed..58ef47acac34b1931fe0296ab949bf76626e4862 100644 |
--- a/src/parser.h |
+++ b/src/parser.h |
@@ -593,20 +593,18 @@ class ParserTraits { |
class TemplateLiteral : public ZoneObject { |
public: |
TemplateLiteral(Zone* zone, int pos) |
- : cooked_(8, zone), |
- lengths_(8, zone), |
- expressions_(8, zone), |
- pos_(pos) {} |
+ : cooked_(8, zone), raw_(8, zone), expressions_(8, zone), pos_(pos) {} |
const ZoneList<Expression*>* cooked() const { return &cooked_; } |
- const ZoneList<int>* lengths() const { return &lengths_; } |
+ const ZoneList<Expression*>* raw() const { return &raw_; } |
const ZoneList<Expression*>* expressions() const { return &expressions_; } |
int position() const { return pos_; } |
- void AddTemplateSpan(Literal* cooked, int end, Zone* zone) { |
+ void AddTemplateSpan(Literal* cooked, Literal* raw, int end, Zone* zone) { |
DCHECK_NOT_NULL(cooked); |
+ DCHECK_NOT_NULL(raw); |
cooked_.Add(cooked, zone); |
- lengths_.Add(end - cooked->position(), zone); |
+ raw_.Add(raw, zone); |
} |
void AddExpression(Expression* expression, Zone* zone) { |
@@ -616,7 +614,7 @@ class ParserTraits { |
private: |
ZoneList<Expression*> cooked_; |
- ZoneList<int> lengths_; |
+ ZoneList<Expression*> raw_; |
ZoneList<Expression*> expressions_; |
int pos_; |
}; |
@@ -884,8 +882,8 @@ class Parser : public ParserBase<ParserTraits> { |
Expression* expression); |
Expression* CloseTemplateLiteral(TemplateLiteralState* state, int start, |
Expression* tag); |
- ZoneList<Expression*>* TemplateRawStrings(const TemplateLiteral* lit, |
- uint32_t* hash); |
+ uint32_t ComputeTemplateLiteralHash(const TemplateLiteral* lit); |
+ |
Scanner scanner_; |
PreParser* reusable_preparser_; |
Scope* original_scope_; // for ES5 function declarations in sloppy eval |