OLD | NEW |
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/ast.h" | 5 #include "src/ast/ast.h" |
6 | 6 |
7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
8 | 8 |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 } | 863 } |
864 | 864 |
865 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {} | 865 void AstTraversalVisitor::VisitVariableDeclaration(VariableDeclaration* decl) {} |
866 | 866 |
867 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) { | 867 void AstTraversalVisitor::VisitFunctionDeclaration(FunctionDeclaration* decl) { |
868 RECURSE(Visit(decl->fun())); | 868 RECURSE(Visit(decl->fun())); |
869 } | 869 } |
870 | 870 |
871 void AstTraversalVisitor::VisitImportDeclaration(ImportDeclaration* decl) {} | 871 void AstTraversalVisitor::VisitImportDeclaration(ImportDeclaration* decl) {} |
872 | 872 |
873 void AstTraversalVisitor::VisitExportDeclaration(ExportDeclaration* decl) {} | |
874 | |
875 void AstTraversalVisitor::VisitBlock(Block* stmt) { | 873 void AstTraversalVisitor::VisitBlock(Block* stmt) { |
876 RECURSE(VisitStatements(stmt->statements())); | 874 RECURSE(VisitStatements(stmt->statements())); |
877 } | 875 } |
878 | 876 |
879 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) { | 877 void AstTraversalVisitor::VisitExpressionStatement(ExpressionStatement* stmt) { |
880 RECURSE(Visit(stmt->expression())); | 878 RECURSE(Visit(stmt->expression())); |
881 } | 879 } |
882 | 880 |
883 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {} | 881 void AstTraversalVisitor::VisitEmptyStatement(EmptyStatement* stmt) {} |
884 | 882 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 bool Literal::Match(void* literal1, void* literal2) { | 1139 bool Literal::Match(void* literal1, void* literal2) { |
1142 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1140 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
1143 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1141 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
1144 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 1142 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
1145 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1143 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
1146 } | 1144 } |
1147 | 1145 |
1148 | 1146 |
1149 } // namespace internal | 1147 } // namespace internal |
1150 } // namespace v8 | 1148 } // namespace v8 |
OLD | NEW |