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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { | 562 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
563 // Load the arguments on the stack and call the stub. | 563 // Load the arguments on the stack and call the stub. |
564 SubStringStub stub(isolate()); | 564 SubStringStub stub(isolate()); |
565 ZoneList<Expression*>* args = expr->arguments(); | 565 ZoneList<Expression*>* args = expr->arguments(); |
566 DCHECK(args->length() == 3); | 566 DCHECK(args->length() == 3); |
567 VisitForStackValue(args->at(0)); | 567 VisitForStackValue(args->at(0)); |
568 VisitForStackValue(args->at(1)); | 568 VisitForStackValue(args->at(1)); |
569 VisitForStackValue(args->at(2)); | 569 VisitForStackValue(args->at(2)); |
570 __ CallStub(&stub); | 570 __ CallStub(&stub); |
571 RestoreContext(); | |
572 OperandStackDepthDecrement(3); | 571 OperandStackDepthDecrement(3); |
573 context()->Plug(result_register()); | 572 context()->Plug(result_register()); |
574 } | 573 } |
575 | 574 |
576 | 575 |
577 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { | 576 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { |
578 // Load the arguments on the stack and call the stub. | 577 // Load the arguments on the stack and call the stub. |
579 RegExpExecStub stub(isolate()); | 578 RegExpExecStub stub(isolate()); |
580 ZoneList<Expression*>* args = expr->arguments(); | 579 ZoneList<Expression*>* args = expr->arguments(); |
581 DCHECK(args->length() == 4); | 580 DCHECK(args->length() == 4); |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 return info_->has_simple_parameters(); | 2050 return info_->has_simple_parameters(); |
2052 } | 2051 } |
2053 | 2052 |
2054 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2053 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
2055 | 2054 |
2056 #undef __ | 2055 #undef __ |
2057 | 2056 |
2058 | 2057 |
2059 } // namespace internal | 2058 } // namespace internal |
2060 } // namespace v8 | 2059 } // namespace v8 |
OLD | NEW |