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

Unified Diff: src/parser.cc

Issue 101763003: Replace 'operator*' with explicit 'get' method on SmartPointer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload to make rietveld happy Created 7 years 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/objects-printer.cc ('k') | src/regexp-macro-assembler-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index b1689191ad357d96671206edea6e3d4fbcfe3317..bfb5bd1955caedbf9a79647c904c24e4ae1ab761 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -600,7 +600,7 @@ FunctionLiteral* Parser::ParseProgram() {
} else if (info()->script()->name()->IsString()) {
String* name = String::cast(info()->script()->name());
SmartArrayPointer<char> name_chars = name->ToCString();
- PrintF("[parsing script: %s", *name_chars);
+ PrintF("[parsing script: %s", name_chars.get());
} else {
PrintF("[parsing script");
}
@@ -729,7 +729,7 @@ FunctionLiteral* Parser::ParseLazy() {
if (FLAG_trace_parse && result != NULL) {
double ms = timer.Elapsed().InMillisecondsF();
SmartArrayPointer<char> name_chars = result->debug_name()->ToCString();
- PrintF("[parsing function: %s - took %0.3f ms]\n", *name_chars, ms);
+ PrintF("[parsing function: %s - took %0.3f ms]\n", name_chars.get(), ms);
}
return result;
}
@@ -1521,7 +1521,7 @@ void Parser::Declare(Declaration* declaration, bool resolve, bool* ok) {
// In harmony mode we treat re-declarations as early errors. See
// ES5 16 for a definition of early errors.
SmartArrayPointer<char> c_string = name->ToCString(DISALLOW_NULLS);
- const char* elms[2] = { "Variable", *c_string };
+ const char* elms[2] = { "Variable", c_string.get() };
Vector<const char*> args(elms, 2);
ReportMessage("redeclaration", args);
*ok = false;
@@ -2145,7 +2145,7 @@ Statement* Parser::ParseExpressionOrLabelledStatement(ZoneStringList* labels,
// make later anyway so we should go back and fix this then.
if (ContainsLabel(labels, label) || TargetStackContainsLabel(label)) {
SmartArrayPointer<char> c_string = label->ToCString(DISALLOW_NULLS);
- const char* elms[2] = { "Label", *c_string };
+ const char* elms[2] = { "Label", c_string.get() };
Vector<const char*> args(elms, 2);
ReportMessage("redeclaration", args);
*ok = false;
@@ -3512,7 +3512,7 @@ void Parser::ReportUnexpectedToken(Token::Value token) {
void Parser::ReportInvalidPreparseData(Handle<String> name, bool* ok) {
SmartArrayPointer<char> name_string = name->ToCString(DISALLOW_NULLS);
- const char* element[1] = { *name_string };
+ const char* element[1] = { name_string.get() };
ReportMessage("invalid_preparser_data",
Vector<const char*>(element, 1));
*ok = false;
@@ -4601,7 +4601,7 @@ void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) {
// errors. See ES5 16 for a definition of early errors.
Handle<String> name = decl->proxy()->name();
SmartArrayPointer<char> c_string = name->ToCString(DISALLOW_NULLS);
- const char* elms[2] = { "Variable", *c_string };
+ const char* elms[2] = { "Variable", c_string.get() };
Vector<const char*> args(elms, 2);
int position = decl->proxy()->position();
Scanner::Location location = position == RelocInfo::kNoPosition
« no previous file with comments | « src/objects-printer.cc ('k') | src/regexp-macro-assembler-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698