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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2587973002: Revert of [crankshaft] Fix IsClassOfTest helper method (Closed)
Patch Set: Created 4 years 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/prettyprinter.cc ('k') | test/mjsunit/regress/regress-5749.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10906 matching lines...) Expand 10 before | Expand all | Expand 10 after
10917 10917
10918 10918
10919 // Check for the form (%_ClassOf(foo) === 'BarClass'). 10919 // Check for the form (%_ClassOf(foo) === 'BarClass').
10920 static bool IsClassOfTest(CompareOperation* expr) { 10920 static bool IsClassOfTest(CompareOperation* expr) {
10921 if (expr->op() != Token::EQ_STRICT) return false; 10921 if (expr->op() != Token::EQ_STRICT) return false;
10922 CallRuntime* call = expr->left()->AsCallRuntime(); 10922 CallRuntime* call = expr->left()->AsCallRuntime();
10923 if (call == NULL) return false; 10923 if (call == NULL) return false;
10924 Literal* literal = expr->right()->AsLiteral(); 10924 Literal* literal = expr->right()->AsLiteral();
10925 if (literal == NULL) return false; 10925 if (literal == NULL) return false;
10926 if (!literal->value()->IsString()) return false; 10926 if (!literal->value()->IsString()) return false;
10927 if (call->is_jsruntime()) return false; 10927 if (!call->is_jsruntime() &&
10928 if (call->function()->function_id != Runtime::kInlineClassOf) return false; 10928 call->function()->function_id != Runtime::kInlineClassOf) {
10929 DCHECK_EQ(call->arguments()->length(), 1); 10929 return false;
10930 }
10931 DCHECK(call->arguments()->length() == 1);
10930 return true; 10932 return true;
10931 } 10933 }
10932 10934
10935
10933 void HOptimizedGraphBuilder::VisitBinaryOperation(BinaryOperation* expr) { 10936 void HOptimizedGraphBuilder::VisitBinaryOperation(BinaryOperation* expr) {
10934 DCHECK(!HasStackOverflow()); 10937 DCHECK(!HasStackOverflow());
10935 DCHECK(current_block() != NULL); 10938 DCHECK(current_block() != NULL);
10936 DCHECK(current_block()->HasPredecessor()); 10939 DCHECK(current_block()->HasPredecessor());
10937 switch (expr->op()) { 10940 switch (expr->op()) {
10938 case Token::COMMA: 10941 case Token::COMMA:
10939 return VisitComma(expr); 10942 return VisitComma(expr);
10940 case Token::OR: 10943 case Token::OR:
10941 case Token::AND: 10944 case Token::AND:
10942 return VisitLogicalExpression(expr); 10945 return VisitLogicalExpression(expr);
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after
12976 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12979 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12977 } 12980 }
12978 12981
12979 #ifdef DEBUG 12982 #ifdef DEBUG
12980 graph_->Verify(false); // No full verify. 12983 graph_->Verify(false); // No full verify.
12981 #endif 12984 #endif
12982 } 12985 }
12983 12986
12984 } // namespace internal 12987 } // namespace internal
12985 } // namespace v8 12988 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/prettyprinter.cc ('k') | test/mjsunit/regress/regress-5749.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698