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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 default: | 44 default: |
45 break; | 45 break; |
46 } | 46 } |
47 | 47 |
48 return "UnknownIntrinsicIndex"; | 48 return "UnknownIntrinsicIndex"; |
49 } | 49 } |
50 | 50 |
51 void AstNode::Print() { Print(Isolate::Current()); } | 51 void AstNode::Print() { Print(Isolate::Current()); } |
52 | 52 |
53 void AstNode::Print(Isolate* isolate) { | 53 void AstNode::Print(Isolate* isolate) { |
| 54 AllowHandleDereference allow_deref; |
54 AstPrinter::PrintOut(isolate, this); | 55 AstPrinter::PrintOut(isolate, this); |
55 } | 56 } |
56 | 57 |
57 | 58 |
58 #endif // DEBUG | 59 #endif // DEBUG |
59 | 60 |
60 #define RETURN_NODE(Node) \ | 61 #define RETURN_NODE(Node) \ |
61 case k##Node: \ | 62 case k##Node: \ |
62 return static_cast<Node*>(this); | 63 return static_cast<Node*>(this); |
63 | 64 |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 #ifdef DEBUG | 1114 #ifdef DEBUG |
1114 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) | 1115 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_) |
1115 : function_->name; | 1116 : function_->name; |
1116 #else | 1117 #else |
1117 return is_jsruntime() ? "(context function)" : function_->name; | 1118 return is_jsruntime() ? "(context function)" : function_->name; |
1118 #endif // DEBUG | 1119 #endif // DEBUG |
1119 } | 1120 } |
1120 | 1121 |
1121 } // namespace internal | 1122 } // namespace internal |
1122 } // namespace v8 | 1123 } // namespace v8 |
OLD | NEW |