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

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

Issue 2355793003: [stubs] Port SubStringStub to TurboFan (Closed)
Patch Set: Address comments Created 4 years, 3 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
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 2670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 result_var.Bind(assembler->ChangeFloat64ToTagged(fdec_result)); 2681 result_var.Bind(assembler->ChangeFloat64ToTagged(fdec_result));
2682 assembler->Goto(&end); 2682 assembler->Goto(&end);
2683 } 2683 }
2684 2684
2685 assembler->Bind(&end); 2685 assembler->Bind(&end);
2686 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector, 2686 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector,
2687 slot_id); 2687 slot_id);
2688 return result_var.value(); 2688 return result_var.value();
2689 } 2689 }
2690 2690
2691 // ES6 section 21.1.3.19 String.prototype.substring ( start, end )
Igor Sheludko 2016/09/22 12:23:37 It's already section 21.1.3.21
jgruber 2016/09/22 13:22:41 In ES6 it's still 21.1.3.19: http://www.ecma-inter
2692 compiler::Node* SubStringStub::Generate(CodeStubAssembler* assembler,
2693 compiler::Node* string,
2694 compiler::Node* from,
2695 compiler::Node* to,
2696 compiler::Node* context) {
2697 return assembler->SubString(context, string, from, to);
2698 }
2699
2691 // ES6 section 7.1.13 ToObject (argument) 2700 // ES6 section 7.1.13 ToObject (argument)
2692 void ToObjectStub::GenerateAssembly(CodeStubAssembler* assembler) const { 2701 void ToObjectStub::GenerateAssembly(CodeStubAssembler* assembler) const {
2693 typedef compiler::Node Node; 2702 typedef compiler::Node Node;
2694 typedef CodeStubAssembler::Label Label; 2703 typedef CodeStubAssembler::Label Label;
2695 typedef CodeStubAssembler::Variable Variable; 2704 typedef CodeStubAssembler::Variable Variable;
2696 2705
2697 Label if_number(assembler, Label::kDeferred), if_notsmi(assembler), 2706 Label if_number(assembler, Label::kDeferred), if_notsmi(assembler),
2698 if_jsreceiver(assembler), if_noconstructor(assembler, Label::kDeferred), 2707 if_jsreceiver(assembler), if_noconstructor(assembler, Label::kDeferred),
2699 if_wrapjsvalue(assembler); 2708 if_wrapjsvalue(assembler);
2700 2709
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after
6308 6317
6309 if (type == MachineType::Pointer()) { 6318 if (type == MachineType::Pointer()) {
6310 return Representation::External(); 6319 return Representation::External();
6311 } 6320 }
6312 6321
6313 return Representation::Tagged(); 6322 return Representation::Tagged();
6314 } 6323 }
6315 6324
6316 } // namespace internal 6325 } // namespace internal
6317 } // namespace v8 6326 } // namespace v8
OLDNEW
« src/code-stubs.h ('K') | « 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