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

Side by Side Diff: src/full-codegen.h

Issue 3107033: Remove the full codegen syntax checker completely but be... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 #define V8_FULL_CODEGEN_H_ 29 #define V8_FULL_CODEGEN_H_
30 30
31 #include "v8.h" 31 #include "v8.h"
32 32
33 #include "ast.h" 33 #include "ast.h"
34 #include "compiler.h" 34 #include "compiler.h"
35 35
36 namespace v8 { 36 namespace v8 {
37 namespace internal { 37 namespace internal {
38 38
39 class FullCodeGenSyntaxChecker: public AstVisitor {
40 public:
41 FullCodeGenSyntaxChecker() : has_supported_syntax_(true) {}
42
43 void Check(FunctionLiteral* fun);
44
45 bool has_supported_syntax() { return has_supported_syntax_; }
46
47 private:
48 void VisitDeclarations(ZoneList<Declaration*>* decls);
49 void VisitStatements(ZoneList<Statement*>* stmts);
50
51 // AST node visit functions.
52 #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
53 AST_NODE_LIST(DECLARE_VISIT)
54 #undef DECLARE_VISIT
55
56 bool has_supported_syntax_;
57
58 DISALLOW_COPY_AND_ASSIGN(FullCodeGenSyntaxChecker);
59 };
60
61
62 // AST node visitor which can tell whether a given statement will be breakable 39 // AST node visitor which can tell whether a given statement will be breakable
63 // when the code is compiled by the full compiler in the debugger. This means 40 // when the code is compiled by the full compiler in the debugger. This means
64 // that there will be an IC (load/store/call) in the code generated for the 41 // that there will be an IC (load/store/call) in the code generated for the
65 // debugger to piggybag on. 42 // debugger to piggybag on.
66 class BreakableStatementChecker: public AstVisitor { 43 class BreakableStatementChecker: public AstVisitor {
67 public: 44 public:
68 BreakableStatementChecker() : is_breakable_(false) {} 45 BreakableStatementChecker() : is_breakable_(false) {}
69 46
70 void Check(Statement* stmt); 47 void Check(Statement* stmt);
71 void Check(Expression* stmt); 48 void Check(Expression* stmt);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 457
481 friend class NestedStatement; 458 friend class NestedStatement;
482 459
483 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 460 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
484 }; 461 };
485 462
486 463
487 } } // namespace v8::internal 464 } } // namespace v8::internal
488 465
489 #endif // V8_FULL_CODEGEN_H_ 466 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698