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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { | 645 void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
646 EmitIntrinsicAsStubCall(expr, CodeFactory::ToNumber(isolate())); | 646 EmitIntrinsicAsStubCall(expr, CodeFactory::ToNumber(isolate())); |
647 } | 647 } |
648 | 648 |
649 | 649 |
650 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { | 650 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
651 EmitIntrinsicAsStubCall(expr, CodeFactory::ToObject(isolate())); | 651 EmitIntrinsicAsStubCall(expr, CodeFactory::ToObject(isolate())); |
652 } | 652 } |
653 | 653 |
654 | 654 |
655 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | |
656 EmitIntrinsicAsStubCall(expr, CodeFactory::RegExpConstructResult(isolate())); | |
657 } | |
658 | |
659 void FullCodeGenerator::EmitHasProperty() { | 655 void FullCodeGenerator::EmitHasProperty() { |
660 Callable callable = CodeFactory::HasProperty(isolate()); | 656 Callable callable = CodeFactory::HasProperty(isolate()); |
661 PopOperand(callable.descriptor().GetRegisterParameter(1)); | 657 PopOperand(callable.descriptor().GetRegisterParameter(1)); |
662 PopOperand(callable.descriptor().GetRegisterParameter(0)); | 658 PopOperand(callable.descriptor().GetRegisterParameter(0)); |
663 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 659 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
664 RestoreContext(); | 660 RestoreContext(); |
665 } | 661 } |
666 | 662 |
667 void FullCodeGenerator::RecordStatementPosition(int pos) { | 663 void FullCodeGenerator::RecordStatementPosition(int pos) { |
668 DCHECK_NE(kNoSourcePosition, pos); | 664 DCHECK_NE(kNoSourcePosition, pos); |
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1992 return info_->has_simple_parameters(); | 1988 return info_->has_simple_parameters(); |
1993 } | 1989 } |
1994 | 1990 |
1995 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1991 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
1996 | 1992 |
1997 #undef __ | 1993 #undef __ |
1998 | 1994 |
1999 | 1995 |
2000 } // namespace internal | 1996 } // namespace internal |
2001 } // namespace v8 | 1997 } // namespace v8 |
OLD | NEW |