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/compile-time-value.h" | 9 #include "src/ast/compile-time-value.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "src/type-info.h" | 21 #include "src/type-info.h" |
22 | 22 |
23 namespace v8 { | 23 namespace v8 { |
24 namespace internal { | 24 namespace internal { |
25 | 25 |
26 // ---------------------------------------------------------------------------- | 26 // ---------------------------------------------------------------------------- |
27 // Implementation of other node functionality. | 27 // Implementation of other node functionality. |
28 | 28 |
29 #ifdef DEBUG | 29 #ifdef DEBUG |
30 | 30 |
| 31 void AstNode::Print() { Print(Isolate::Current()); } |
| 32 |
31 void AstNode::Print(Isolate* isolate) { | 33 void AstNode::Print(Isolate* isolate) { |
32 AstPrinter::PrintOut(isolate, this); | 34 AstPrinter::PrintOut(isolate, this); |
33 } | 35 } |
34 | 36 |
35 | 37 |
36 #endif // DEBUG | 38 #endif // DEBUG |
37 | 39 |
38 #define RETURN_NODE(Node) \ | 40 #define RETURN_NODE(Node) \ |
39 case k##Node: \ | 41 case k##Node: \ |
40 return static_cast<Node*>(this); | 42 return static_cast<Node*>(this); |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 // static | 960 // static |
959 bool Literal::Match(void* literal1, void* literal2) { | 961 bool Literal::Match(void* literal1, void* literal2) { |
960 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 962 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
961 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 963 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
962 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 964 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
963 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 965 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
964 } | 966 } |
965 | 967 |
966 } // namespace internal | 968 } // namespace internal |
967 } // namespace v8 | 969 } // namespace v8 |
OLD | NEW |