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

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

Issue 1994733003: Rewrite decodeURL as builtin function, remove now unused runtime functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 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 <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 12599 matching lines...) Expand 10 before | Expand all | Expand 10 after
12610 { 12610 {
12611 // If the object is not a value return the object. 12611 // If the object is not a value return the object.
12612 Push(object); 12612 Push(object);
12613 Add<HSimulate>(call->id(), FIXED_SIMULATE); 12613 Add<HSimulate>(call->id(), FIXED_SIMULATE);
12614 } 12614 }
12615 if_objectisvalue.End(); 12615 if_objectisvalue.End();
12616 return ast_context()->ReturnValue(Pop()); 12616 return ast_context()->ReturnValue(Pop());
12617 } 12617 }
12618 12618
12619 12619
12620 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar(
12621 CallRuntime* call) {
12622 DCHECK(call->arguments()->length() == 3);
12623 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12624 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12625 CHECK_ALIVE(VisitForValue(call->arguments()->at(2)));
12626 HValue* string = Pop();
12627 HValue* value = Pop();
12628 HValue* index = Pop();
12629 Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string,
12630 index, value);
12631 Add<HSimulate>(call->id(), FIXED_SIMULATE);
12632 return ast_context()->ReturnValue(graph()->GetConstantUndefined());
12633 }
12634
12635
12636 void HOptimizedGraphBuilder::GenerateTwoByteSeqStringSetChar(
12637 CallRuntime* call) {
12638 DCHECK(call->arguments()->length() == 3);
12639 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12640 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12641 CHECK_ALIVE(VisitForValue(call->arguments()->at(2)));
12642 HValue* string = Pop();
12643 HValue* value = Pop();
12644 HValue* index = Pop();
12645 Add<HSeqStringSetChar>(String::TWO_BYTE_ENCODING, string,
12646 index, value);
12647 Add<HSimulate>(call->id(), FIXED_SIMULATE);
12648 return ast_context()->ReturnValue(graph()->GetConstantUndefined());
12649 }
12650
12651
12652 // Fast support for charCodeAt(n). 12620 // Fast support for charCodeAt(n).
12653 void HOptimizedGraphBuilder::GenerateStringCharCodeAt(CallRuntime* call) { 12621 void HOptimizedGraphBuilder::GenerateStringCharCodeAt(CallRuntime* call) {
12654 DCHECK(call->arguments()->length() == 2); 12622 DCHECK(call->arguments()->length() == 2);
12655 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12623 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12656 CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); 12624 CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
12657 HValue* index = Pop(); 12625 HValue* index = Pop();
12658 HValue* string = Pop(); 12626 HValue* string = Pop();
12659 HInstruction* result = BuildStringCharCodeAt(string, index); 12627 HInstruction* result = BuildStringCharCodeAt(string, index);
12660 return ast_context()->ReturnInstruction(result, call->id()); 12628 return ast_context()->ReturnInstruction(result, call->id());
12661 } 12629 }
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
13687 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13655 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13688 } 13656 }
13689 13657
13690 #ifdef DEBUG 13658 #ifdef DEBUG
13691 graph_->Verify(false); // No full verify. 13659 graph_->Verify(false); // No full verify.
13692 #endif 13660 #endif
13693 } 13661 }
13694 13662
13695 } // namespace internal 13663 } // namespace internal
13696 } // namespace v8 13664 } // 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