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

Unified Diff: src/ast/ast.cc

Issue 1814823005: Remove obsolete isolate from CompareOperation predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.cc
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index c055545c4ef4e715fb33cd4fe731cbe03fdc7cf4..e8b6269648ed394e27dc2af919c4f9db8e49b6fa 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -62,8 +62,7 @@ bool Expression::IsNullLiteral() const {
return IsLiteral() && AsLiteral()->value()->IsNull();
}
-
-bool Expression::IsUndefinedLiteral(Isolate* isolate) const {
+bool Expression::IsUndefinedLiteral() const {
if (IsLiteral() && AsLiteral()->value()->IsUndefined()) {
return true;
}
@@ -669,24 +668,21 @@ static bool IsVoidOfLiteral(Expression* expr) {
static bool MatchLiteralCompareUndefined(Expression* left,
Token::Value op,
Expression* right,
- Expression** expr,
- Isolate* isolate) {
+ Expression** expr) {
if (IsVoidOfLiteral(left) && Token::IsEqualityOp(op)) {
*expr = right;
return true;
}
- if (left->IsUndefinedLiteral(isolate) && Token::IsEqualityOp(op)) {
+ if (left->IsUndefinedLiteral() && Token::IsEqualityOp(op)) {
*expr = right;
return true;
}
return false;
}
-
-bool CompareOperation::IsLiteralCompareUndefined(
- Expression** expr, Isolate* isolate) {
- return MatchLiteralCompareUndefined(left_, op_, right_, expr, isolate) ||
- MatchLiteralCompareUndefined(right_, op_, left_, expr, isolate);
+bool CompareOperation::IsLiteralCompareUndefined(Expression** expr) {
+ return MatchLiteralCompareUndefined(left_, op_, right_, expr) ||
+ MatchLiteralCompareUndefined(right_, op_, left_, expr);
}
« no previous file with comments | « src/ast/ast.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698