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

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

Issue 2591923003: [regexp] Remove IsRegExp intrinsic (Closed)
Patch Set: Rebase Created 3 years, 11 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/crankshaft/hydrogen.h ('k') | src/debug/debug.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 11936 matching lines...) Expand 10 before | Expand all | Expand 10 after
11947 void HOptimizedGraphBuilder::GenerateIsTypedArray(CallRuntime* call) { 11947 void HOptimizedGraphBuilder::GenerateIsTypedArray(CallRuntime* call) {
11948 DCHECK(call->arguments()->length() == 1); 11948 DCHECK(call->arguments()->length() == 1);
11949 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11949 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11950 HValue* value = Pop(); 11950 HValue* value = Pop();
11951 HHasInstanceTypeAndBranch* result = 11951 HHasInstanceTypeAndBranch* result =
11952 New<HHasInstanceTypeAndBranch>(value, JS_TYPED_ARRAY_TYPE); 11952 New<HHasInstanceTypeAndBranch>(value, JS_TYPED_ARRAY_TYPE);
11953 return ast_context()->ReturnControl(result, call->id()); 11953 return ast_context()->ReturnControl(result, call->id());
11954 } 11954 }
11955 11955
11956 11956
11957 void HOptimizedGraphBuilder::GenerateIsRegExp(CallRuntime* call) {
11958 DCHECK(call->arguments()->length() == 1);
11959 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11960 HValue* value = Pop();
11961 HHasInstanceTypeAndBranch* result =
11962 New<HHasInstanceTypeAndBranch>(value, JS_REGEXP_TYPE);
11963 return ast_context()->ReturnControl(result, call->id());
11964 }
11965
11966
11967 void HOptimizedGraphBuilder::GenerateToInteger(CallRuntime* call) { 11957 void HOptimizedGraphBuilder::GenerateToInteger(CallRuntime* call) {
11968 DCHECK_EQ(1, call->arguments()->length()); 11958 DCHECK_EQ(1, call->arguments()->length());
11969 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11959 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11970 HValue* input = Pop(); 11960 HValue* input = Pop();
11971 if (input->type().IsSmi()) { 11961 if (input->type().IsSmi()) {
11972 return ast_context()->ReturnValue(input); 11962 return ast_context()->ReturnValue(input);
11973 } else { 11963 } else {
11974 Callable callable = CodeFactory::ToInteger(isolate()); 11964 Callable callable = CodeFactory::ToInteger(isolate());
11975 HValue* stub = Add<HConstant>(callable.code()); 11965 HValue* stub = Add<HConstant>(callable.code());
11976 HValue* values[] = {input}; 11966 HValue* values[] = {input};
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
13009 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12999 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13010 } 13000 }
13011 13001
13012 #ifdef DEBUG 13002 #ifdef DEBUG
13013 graph_->Verify(false); // No full verify. 13003 graph_->Verify(false); // No full verify.
13014 #endif 13004 #endif
13015 } 13005 }
13016 13006
13017 } // namespace internal 13007 } // namespace internal
13018 } // namespace v8 13008 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/debug/debug.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698