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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 543 |
544 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { | 544 void FullCodeGenerator::EmitSubString(CallRuntime* expr) { |
545 // Load the arguments on the stack and call the stub. | 545 // Load the arguments on the stack and call the stub. |
546 SubStringStub stub(isolate()); | 546 SubStringStub stub(isolate()); |
547 ZoneList<Expression*>* args = expr->arguments(); | 547 ZoneList<Expression*>* args = expr->arguments(); |
548 DCHECK(args->length() == 3); | 548 DCHECK(args->length() == 3); |
549 VisitForStackValue(args->at(0)); | 549 VisitForStackValue(args->at(0)); |
550 VisitForStackValue(args->at(1)); | 550 VisitForStackValue(args->at(1)); |
551 VisitForStackValue(args->at(2)); | 551 VisitForStackValue(args->at(2)); |
552 __ CallStub(&stub); | 552 __ CallStub(&stub); |
553 RestoreContext(); | |
554 OperandStackDepthDecrement(3); | 553 OperandStackDepthDecrement(3); |
555 context()->Plug(result_register()); | 554 context()->Plug(result_register()); |
556 } | 555 } |
557 | 556 |
558 | 557 |
559 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { | 558 void FullCodeGenerator::EmitRegExpExec(CallRuntime* expr) { |
560 // Load the arguments on the stack and call the stub. | 559 // Load the arguments on the stack and call the stub. |
561 RegExpExecStub stub(isolate()); | 560 RegExpExecStub stub(isolate()); |
562 ZoneList<Expression*>* args = expr->arguments(); | 561 ZoneList<Expression*>* args = expr->arguments(); |
563 DCHECK(args->length() == 4); | 562 DCHECK(args->length() == 4); |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 return info_->has_simple_parameters(); | 2031 return info_->has_simple_parameters(); |
2033 } | 2032 } |
2034 | 2033 |
2035 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2034 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
2036 | 2035 |
2037 #undef __ | 2036 #undef __ |
2038 | 2037 |
2039 | 2038 |
2040 } // namespace internal | 2039 } // namespace internal |
2041 } // namespace v8 | 2040 } // namespace v8 |
OLD | NEW |