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

Side by Side Diff: src/full-codegen/full-codegen.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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 527
528 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { 528 void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
529 // Load the arguments on the stack and call the stub. 529 // Load the arguments on the stack and call the stub.
530 SubStringStub stub(isolate()); 530 SubStringStub stub(isolate());
531 ZoneList<Expression*>* args = expr->arguments(); 531 ZoneList<Expression*>* args = expr->arguments();
532 DCHECK(args->length() == 3); 532 DCHECK(args->length() == 3);
533 VisitForStackValue(args->at(0)); 533 VisitForStackValue(args->at(0));
534 VisitForStackValue(args->at(1)); 534 VisitForStackValue(args->at(1));
535 VisitForStackValue(args->at(2)); 535 VisitForStackValue(args->at(2));
536 __ CallStub(&stub); 536 __ CallStub(&stub);
537 RestoreContext();
537 OperandStackDepthDecrement(3); 538 OperandStackDepthDecrement(3);
538 context()->Plug(result_register()); 539 context()->Plug(result_register());
539 } 540 }
540 541
541 542
542 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { 543 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) {
543 // Load the arguments on the stack and call the stub. 544 // Load the arguments on the stack and call the stub.
544 RegExpExecStub stub(isolate()); 545 RegExpExecStub stub(isolate());
545 ZoneList<Expression*>* args = expr->arguments(); 546 ZoneList<Expression*>* args = expr->arguments();
546 DCHECK(args->length() == 4); 547 DCHECK(args->length() == 4);
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 return info_->has_simple_parameters(); 2016 return info_->has_simple_parameters();
2016 } 2017 }
2017 2018
2018 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 2019 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
2019 2020
2020 #undef __ 2021 #undef __
2021 2022
2022 2023
2023 } // namespace internal 2024 } // namespace internal
2024 } // namespace v8 2025 } // namespace v8
OLDNEW
« src/code-stubs.cc ('K') | « src/code-stubs.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698