summaryrefslogtreecommitdiff
path: root/chromium/v8/src/torque/cpp-builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/torque/cpp-builder.cc')
-rw-r--r--chromium/v8/src/torque/cpp-builder.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chromium/v8/src/torque/cpp-builder.cc b/chromium/v8/src/torque/cpp-builder.cc
index 425fae920ea..f48ca562e9b 100644
--- a/chromium/v8/src/torque/cpp-builder.cc
+++ b/chromium/v8/src/torque/cpp-builder.cc
@@ -14,6 +14,8 @@ void Function::PrintDeclarationHeader(std::ostream& stream,
if (!description_.empty()) {
stream << std::string(indentation, ' ') << "// " << description_ << "\n";
}
+ stream << std::string(indentation, ' ') << "// " << PositionAsString(pos_)
+ << "\n";
stream << std::string(indentation, ' ');
if (IsExport()) stream << "V8_EXPORT_PRIVATE ";
if (IsV8Inline())
@@ -36,6 +38,9 @@ void Function::PrintDeclarationHeader(std::ostream& stream,
}
void Function::PrintDeclaration(std::ostream& stream, int indentation) const {
+ if (indentation == kAutomaticIndentation) {
+ indentation = owning_class_ ? 2 : 0;
+ }
PrintDeclarationHeader(stream, indentation);
stream << ";\n";
}
@@ -63,6 +68,8 @@ void Function::PrintInlineDefinition(
void Function::PrintBeginDefinition(std::ostream& stream,
int indentation) const {
+ stream << std::string(indentation, ' ') << "// " << PositionAsString(pos_)
+ << "\n";
std::string scope;
if (owning_class_) {
scope = owning_class_->GetName();
@@ -116,7 +123,7 @@ void File::BeginIncludeGuard(const std::string& name) {
s() << "#ifndef " << name
<< "\n"
"#define "
- << name << "\n";
+ << name << "\n\n";
}
void File::EndIncludeGuard(const std::string& name) {