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

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

Issue 2654423004: [async-functions] support await expressions in finally statements (Closed)
Patch Set: make -Wunused-variable bots happy maybe 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
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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 1077
1078 1078
1079 // static 1079 // static
1080 bool Literal::Match(void* literal1, void* literal2) { 1080 bool Literal::Match(void* literal1, void* literal2) {
1081 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1081 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1082 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1082 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1083 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 1083 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1084 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1084 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1085 } 1085 }
1086 1086
1087 const char* InternalVariable::name() const {
1088 switch (type()) {
1089 case kGeneratorObject:
1090 return ".generator_object";
1091 default:
1092 break;
1093 }
1094 UNREACHABLE();
1095 return nullptr;
1096 }
1097
1087 const char* CallRuntime::debug_name() { 1098 const char* CallRuntime::debug_name() {
1088 #ifdef DEBUG 1099 #ifdef DEBUG
1089 return NameForNativeContextIntrinsicIndex(context_index_); 1100 return is_jsruntime() ? NameForNativeContextIntrinsicIndex(context_index_)
1101 : function_->name;
1090 #else 1102 #else
1091 return is_jsruntime() ? "(context function)" : function_->name; 1103 return is_jsruntime() ? "(context function)" : function_->name;
1092 #endif // DEBUG 1104 #endif // DEBUG
1093 } 1105 }
1094 1106
1095 } // namespace internal 1107 } // namespace internal
1096 } // namespace v8 1108 } // namespace v8
OLDNEW
« src/ast/ast.h ('K') | « src/ast/ast.h ('k') | src/ast/ast-expression-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698