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

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

Issue 2711003007: [ast] Allow dereferencing handles in Print helper. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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/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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698