OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |