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 2378693002: [intrinsics] Nuke the %_StringCharFromCode intrinsic. (Closed)
Patch Set: Created 4 years, 2 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/full-codegen/arm/full-codegen-arm.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 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 12287 matching lines...) Expand 10 before | Expand all | Expand 10 after
12298 DCHECK(call->arguments()->length() == 2); 12298 DCHECK(call->arguments()->length() == 2);
12299 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12299 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12300 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 12300 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12301 HValue* index = Pop(); 12301 HValue* index = Pop();
12302 HValue* string = Pop(); 12302 HValue* string = Pop();
12303 HInstruction* result = BuildStringCharCodeAt(string, index); 12303 HInstruction* result = BuildStringCharCodeAt(string, index);
12304 return ast_context()->ReturnInstruction(result, call->id()); 12304 return ast_context()->ReturnInstruction(result, call->id());
12305 } 12305 }
12306 12306
12307 12307
12308 // Fast support for string.charAt(n) and string[n].
12309 void HOptimizedGraphBuilder::GenerateStringCharFromCode(CallRuntime* call) {
12310 DCHECK(call->arguments()->length() == 1);
12311 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12312 HValue* char_code = Pop();
12313 HInstruction* result = NewUncasted<HStringCharFromCode>(char_code);
12314 return ast_context()->ReturnInstruction(result, call->id());
12315 }
12316
12317
12318 // Fast support for SubString. 12308 // Fast support for SubString.
12319 void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) { 12309 void HOptimizedGraphBuilder::GenerateSubString(CallRuntime* call) {
12320 DCHECK_EQ(3, call->arguments()->length()); 12310 DCHECK_EQ(3, call->arguments()->length());
12321 CHECK_ALIVE(VisitExpressions(call->arguments())); 12311 CHECK_ALIVE(VisitExpressions(call->arguments()));
12322 Callable callable = CodeFactory::SubString(isolate()); 12312 Callable callable = CodeFactory::SubString(isolate());
12323 HValue* stub = Add<HConstant>(callable.code()); 12313 HValue* stub = Add<HConstant>(callable.code());
12324 HValue* to = Pop(); 12314 HValue* to = Pop();
12325 HValue* from = Pop(); 12315 HValue* from = Pop();
12326 HValue* string = Pop(); 12316 HValue* string = Pop();
12327 HValue* values[] = {context(), string, from, to}; 12317 HValue* values[] = {context(), string, from, to};
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
13288 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13278 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13289 } 13279 }
13290 13280
13291 #ifdef DEBUG 13281 #ifdef DEBUG
13292 graph_->Verify(false); // No full verify. 13282 graph_->Verify(false); // No full verify.
13293 #endif 13283 #endif
13294 } 13284 }
13295 13285
13296 } // namespace internal 13286 } // namespace internal
13297 } // namespace v8 13287 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698