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