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

Side by Side Diff: src/compiler/ast-graph-builder.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 unified diff | Download patch
« no previous file with comments | « src/ast/ast.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/ast-loop-assignment-analyzer.h" 9 #include "src/compiler/ast-loop-assignment-analyzer.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 2824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2835 2835
2836 void AstGraphBuilder::VisitCompareOperation(CompareOperation* expr) { 2836 void AstGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
2837 // Check for a few fast cases. The AST visiting behavior must be in sync 2837 // Check for a few fast cases. The AST visiting behavior must be in sync
2838 // with the full codegen: We don't push both left and right values onto 2838 // with the full codegen: We don't push both left and right values onto
2839 // the expression stack when one side is a special-case literal. 2839 // the expression stack when one side is a special-case literal.
2840 Expression* sub_expr = nullptr; 2840 Expression* sub_expr = nullptr;
2841 Handle<String> check; 2841 Handle<String> check;
2842 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { 2842 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) {
2843 return VisitLiteralCompareTypeof(expr, sub_expr, check); 2843 return VisitLiteralCompareTypeof(expr, sub_expr, check);
2844 } 2844 }
2845 if (expr->IsLiteralCompareUndefined(&sub_expr, isolate())) { 2845 if (expr->IsLiteralCompareUndefined(&sub_expr)) {
2846 return VisitLiteralCompareNil(expr, sub_expr, 2846 return VisitLiteralCompareNil(expr, sub_expr,
2847 jsgraph()->UndefinedConstant()); 2847 jsgraph()->UndefinedConstant());
2848 } 2848 }
2849 if (expr->IsLiteralCompareNull(&sub_expr)) { 2849 if (expr->IsLiteralCompareNull(&sub_expr)) {
2850 return VisitLiteralCompareNil(expr, sub_expr, jsgraph()->NullConstant()); 2850 return VisitLiteralCompareNil(expr, sub_expr, jsgraph()->NullConstant());
2851 } 2851 }
2852 2852
2853 const Operator* op; 2853 const Operator* op;
2854 switch (expr->op()) { 2854 switch (expr->op()) {
2855 case Token::EQ: 2855 case Token::EQ:
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 // Phi does not exist yet, introduce one. 4372 // Phi does not exist yet, introduce one.
4373 value = NewPhi(inputs, value, control); 4373 value = NewPhi(inputs, value, control);
4374 value->ReplaceInput(inputs - 1, other); 4374 value->ReplaceInput(inputs - 1, other);
4375 } 4375 }
4376 return value; 4376 return value;
4377 } 4377 }
4378 4378
4379 } // namespace compiler 4379 } // namespace compiler
4380 } // namespace internal 4380 } // namespace internal
4381 } // namespace v8 4381 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698