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

Side by Side Diff: src/code-stubs.cc

Issue 2355793003: [stubs] Port SubStringStub to TurboFan (Closed)
Patch Set: Address comments 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/code-stubs.h ('k') | src/full-codegen/full-codegen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/code-stubs.h" 5 #include "src/code-stubs.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 result_var.Bind(assembler->ChangeFloat64ToTagged(fdec_result)); 2712 result_var.Bind(assembler->ChangeFloat64ToTagged(fdec_result));
2713 assembler->Goto(&end); 2713 assembler->Goto(&end);
2714 } 2714 }
2715 2715
2716 assembler->Bind(&end); 2716 assembler->Bind(&end);
2717 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector, 2717 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector,
2718 slot_id); 2718 slot_id);
2719 return result_var.value(); 2719 return result_var.value();
2720 } 2720 }
2721 2721
2722 // ES6 section 21.1.3.19 String.prototype.substring ( start, end )
2723 compiler::Node* SubStringStub::Generate(CodeStubAssembler* assembler,
2724 compiler::Node* string,
2725 compiler::Node* from,
2726 compiler::Node* to,
2727 compiler::Node* context) {
2728 return assembler->SubString(context, string, from, to);
2729 }
2730
2722 // ES6 section 7.1.13 ToObject (argument) 2731 // ES6 section 7.1.13 ToObject (argument)
2723 void ToObjectStub::GenerateAssembly(CodeStubAssembler* assembler) const { 2732 void ToObjectStub::GenerateAssembly(CodeStubAssembler* assembler) const {
2724 typedef compiler::Node Node; 2733 typedef compiler::Node Node;
2725 typedef CodeStubAssembler::Label Label; 2734 typedef CodeStubAssembler::Label Label;
2726 typedef CodeStubAssembler::Variable Variable; 2735 typedef CodeStubAssembler::Variable Variable;
2727 2736
2728 Label if_number(assembler, Label::kDeferred), if_notsmi(assembler), 2737 Label if_number(assembler, Label::kDeferred), if_notsmi(assembler),
2729 if_jsreceiver(assembler), if_noconstructor(assembler, Label::kDeferred), 2738 if_jsreceiver(assembler), if_noconstructor(assembler, Label::kDeferred),
2730 if_wrapjsvalue(assembler); 2739 if_wrapjsvalue(assembler);
2731 2740
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after
5897 5906
5898 if (type == MachineType::Pointer()) { 5907 if (type == MachineType::Pointer()) {
5899 return Representation::External(); 5908 return Representation::External();
5900 } 5909 }
5901 5910
5902 return Representation::Tagged(); 5911 return Representation::Tagged();
5903 } 5912 }
5904 5913
5905 } // namespace internal 5914 } // namespace internal
5906 } // namespace v8 5915 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698