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

Side by Side Diff: src/ast/prettyprinter.cc

Issue 2324783002: Include only stuff you need, part 9: variables.h (Closed)
Patch Set: rebased Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/ast/context-slot-cache.cc ('k') | src/ast/scopeinfo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/ast/prettyprinter.h" 5 #include "src/ast/prettyprinter.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
11 #include "src/base/platform/platform.h" 11 #include "src/base/platform/platform.h"
12 #include "src/globals.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 16
16 CallPrinter::CallPrinter(Isolate* isolate, bool is_builtin) 17 CallPrinter::CallPrinter(Isolate* isolate, bool is_builtin)
17 : builder_(isolate) { 18 : builder_(isolate) {
18 isolate_ = isolate; 19 isolate_ = isolate;
19 position_ = 0; 20 position_ = 0;
20 num_prints_ = 0; 21 num_prints_ = 0;
21 found_ = false; 22 found_ = false;
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 597 }
597 598
598 599
599 void AstPrinter::PrintLiteralWithModeIndented(const char* info, 600 void AstPrinter::PrintLiteralWithModeIndented(const char* info,
600 Variable* var, 601 Variable* var,
601 Handle<Object> value) { 602 Handle<Object> value) {
602 if (var == NULL) { 603 if (var == NULL) {
603 PrintLiteralIndented(info, value, true); 604 PrintLiteralIndented(info, value, true);
604 } else { 605 } else {
605 EmbeddedVector<char, 256> buf; 606 EmbeddedVector<char, 256> buf;
606 int pos = SNPrintF(buf, "%s (mode = %s", info, 607 int pos =
607 Variable::Mode2String(var->mode())); 608 SNPrintF(buf, "%s (mode = %s", info, VariableMode2String(var->mode()));
608 SNPrintF(buf + pos, ")"); 609 SNPrintF(buf + pos, ")");
609 PrintLiteralIndented(buf.start(), value, true); 610 PrintLiteralIndented(buf.start(), value, true);
610 } 611 }
611 } 612 }
612 613
613 614
614 void AstPrinter::PrintLabelsIndented(ZoneList<const AstRawString*>* labels) { 615 void AstPrinter::PrintLabelsIndented(ZoneList<const AstRawString*>* labels) {
615 if (labels == NULL || labels->length() == 0) return; 616 if (labels == NULL || labels->length() == 0) return;
616 PrintIndented("LABELS "); 617 PrintIndented("LABELS ");
617 PrintLabels(labels); 618 PrintLabels(labels);
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 1184
1184 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { 1185 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) {
1185 Visit(node->expression()); 1186 Visit(node->expression());
1186 } 1187 }
1187 1188
1188 1189
1189 #endif // DEBUG 1190 #endif // DEBUG
1190 1191
1191 } // namespace internal 1192 } // namespace internal
1192 } // namespace v8 1193 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/context-slot-cache.cc ('k') | src/ast/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698