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

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

Issue 2592383002: Revert of [regexp] Remove IsRegExp intrinsic (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/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 11925 matching lines...) Expand 10 before | Expand all | Expand 10 after
11936 void HOptimizedGraphBuilder::GenerateIsTypedArray(CallRuntime* call) { 11936 void HOptimizedGraphBuilder::GenerateIsTypedArray(CallRuntime* call) {
11937 DCHECK(call->arguments()->length() == 1); 11937 DCHECK(call->arguments()->length() == 1);
11938 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11938 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11939 HValue* value = Pop(); 11939 HValue* value = Pop();
11940 HHasInstanceTypeAndBranch* result = 11940 HHasInstanceTypeAndBranch* result =
11941 New<HHasInstanceTypeAndBranch>(value, JS_TYPED_ARRAY_TYPE); 11941 New<HHasInstanceTypeAndBranch>(value, JS_TYPED_ARRAY_TYPE);
11942 return ast_context()->ReturnControl(result, call->id()); 11942 return ast_context()->ReturnControl(result, call->id());
11943 } 11943 }
11944 11944
11945 11945
11946 void HOptimizedGraphBuilder::GenerateIsRegExp(CallRuntime* call) {
11947 DCHECK(call->arguments()->length() == 1);
11948 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11949 HValue* value = Pop();
11950 HHasInstanceTypeAndBranch* result =
11951 New<HHasInstanceTypeAndBranch>(value, JS_REGEXP_TYPE);
11952 return ast_context()->ReturnControl(result, call->id());
11953 }
11954
11955
11946 void HOptimizedGraphBuilder::GenerateToInteger(CallRuntime* call) { 11956 void HOptimizedGraphBuilder::GenerateToInteger(CallRuntime* call) {
11947 DCHECK_EQ(1, call->arguments()->length()); 11957 DCHECK_EQ(1, call->arguments()->length());
11948 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 11958 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
11949 HValue* input = Pop(); 11959 HValue* input = Pop();
11950 if (input->type().IsSmi()) { 11960 if (input->type().IsSmi()) {
11951 return ast_context()->ReturnValue(input); 11961 return ast_context()->ReturnValue(input);
11952 } else { 11962 } else {
11953 Callable callable = CodeFactory::ToInteger(isolate()); 11963 Callable callable = CodeFactory::ToInteger(isolate());
11954 HValue* stub = Add<HConstant>(callable.code()); 11964 HValue* stub = Add<HConstant>(callable.code());
11955 HValue* values[] = {input}; 11965 HValue* values[] = {input};
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
13001 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13011 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13002 } 13012 }
13003 13013
13004 #ifdef DEBUG 13014 #ifdef DEBUG
13005 graph_->Verify(false); // No full verify. 13015 graph_->Verify(false); // No full verify.
13006 #endif 13016 #endif
13007 } 13017 }
13008 13018
13009 } // namespace internal 13019 } // namespace internal
13010 } // namespace v8 13020 } // 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