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

Unified Diff: src/parsing/rewriter.cc

Issue 2109773004: Move RelocInfo::kNoPosition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@removedead
Patch Set: rebase Created 4 years, 6 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 | « src/parsing/preparser.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/rewriter.cc
diff --git a/src/parsing/rewriter.cc b/src/parsing/rewriter.cc
index 915a464bf455f6a8be063d1b128dcb52fca6ed17..09ee8f77f28bc92559ea2e9f19a2b7fc5cf7a823 100644
--- a/src/parsing/rewriter.cc
+++ b/src/parsing/rewriter.cc
@@ -51,7 +51,7 @@ class Processor: public AstVisitor {
result_assigned_ = true;
VariableProxy* result_proxy = factory()->NewVariableProxy(result_);
return factory()->NewAssignment(Token::ASSIGN, result_proxy, value,
- RelocInfo::kNoPosition);
+ kNoSourcePosition);
}
// Inserts '.result = undefined' in front of the given statement.
@@ -93,13 +93,12 @@ class Processor: public AstVisitor {
Statement* Processor::AssignUndefinedBefore(Statement* s) {
Expression* result_proxy = factory()->NewVariableProxy(result_);
- Expression* undef = factory()->NewUndefinedLiteral(RelocInfo::kNoPosition);
- Expression* assignment = factory()->NewAssignment(
- Token::ASSIGN, result_proxy, undef, RelocInfo::kNoPosition);
- Block* b = factory()->NewBlock(NULL, 2, false, RelocInfo::kNoPosition);
+ Expression* undef = factory()->NewUndefinedLiteral(kNoSourcePosition);
+ Expression* assignment = factory()->NewAssignment(Token::ASSIGN, result_proxy,
+ undef, kNoSourcePosition);
+ Block* b = factory()->NewBlock(NULL, 2, false, kNoSourcePosition);
b->statements()->Add(
- factory()->NewExpressionStatement(assignment, RelocInfo::kNoPosition),
- zone());
+ factory()->NewExpressionStatement(assignment, kNoSourcePosition), zone());
b->statements()->Add(s, zone());
return b;
}
@@ -232,15 +231,13 @@ void Processor::VisitTryFinallyStatement(TryFinallyStatement* node) {
Expression* backup_proxy = factory()->NewVariableProxy(backup);
Expression* result_proxy = factory()->NewVariableProxy(result_);
Expression* save = factory()->NewAssignment(
- Token::ASSIGN, backup_proxy, result_proxy, RelocInfo::kNoPosition);
+ Token::ASSIGN, backup_proxy, result_proxy, kNoSourcePosition);
Expression* restore = factory()->NewAssignment(
- Token::ASSIGN, result_proxy, backup_proxy, RelocInfo::kNoPosition);
+ Token::ASSIGN, result_proxy, backup_proxy, kNoSourcePosition);
node->finally_block()->statements()->InsertAt(
- 0, factory()->NewExpressionStatement(save, RelocInfo::kNoPosition),
- zone());
+ 0, factory()->NewExpressionStatement(save, kNoSourcePosition), zone());
node->finally_block()->statements()->Add(
- factory()->NewExpressionStatement(restore, RelocInfo::kNoPosition),
- zone());
+ factory()->NewExpressionStatement(restore, kNoSourcePosition), zone());
}
is_set_ = set_after;
Visit(node->try_block());
@@ -355,7 +352,7 @@ bool Rewriter::Rewrite(ParseInfo* info) {
if (processor.HasStackOverflow()) return false;
if (processor.result_assigned()) {
- int pos = RelocInfo::kNoPosition;
+ int pos = kNoSourcePosition;
VariableProxy* result_proxy =
processor.factory()->NewVariableProxy(result, pos);
Statement* result_statement =
@@ -383,8 +380,7 @@ bool Rewriter::Rewrite(Parser* parser, DoExpression* expr,
if (!processor.result_assigned()) {
AstNodeFactory* node_factory = processor.factory();
- Expression* undef =
- node_factory->NewUndefinedLiteral(RelocInfo::kNoPosition);
+ Expression* undef = node_factory->NewUndefinedLiteral(kNoSourcePosition);
Statement* completion = node_factory->NewExpressionStatement(
processor.SetResult(undef), expr->position());
body->Add(completion, factory->zone());
« no previous file with comments | « src/parsing/preparser.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698