| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 void FullCodeGenerator::EmitHasProperty() { | 658 void FullCodeGenerator::EmitHasProperty() { |
| 659 Callable callable = CodeFactory::HasProperty(isolate()); | 659 Callable callable = CodeFactory::HasProperty(isolate()); |
| 660 PopOperand(callable.descriptor().GetRegisterParameter(1)); | 660 PopOperand(callable.descriptor().GetRegisterParameter(1)); |
| 661 PopOperand(callable.descriptor().GetRegisterParameter(0)); | 661 PopOperand(callable.descriptor().GetRegisterParameter(0)); |
| 662 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 662 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 663 RestoreContext(); | 663 RestoreContext(); |
| 664 } | 664 } |
| 665 | 665 |
| 666 void FullCodeGenerator::RecordStatementPosition(int pos) { | 666 void FullCodeGenerator::RecordStatementPosition(int pos) { |
| 667 DCHECK_NE(kNoSourcePosition, pos); | 667 DCHECK_NE(kNoSourcePosition, pos); |
| 668 source_position_table_builder_.AddPosition(masm_->pc_offset(), pos, true); | 668 source_position_table_builder_.AddPosition(masm_->pc_offset(), |
| 669 SourcePosition(pos), true); |
| 669 } | 670 } |
| 670 | 671 |
| 671 void FullCodeGenerator::RecordPosition(int pos) { | 672 void FullCodeGenerator::RecordPosition(int pos) { |
| 672 DCHECK_NE(kNoSourcePosition, pos); | 673 DCHECK_NE(kNoSourcePosition, pos); |
| 673 source_position_table_builder_.AddPosition(masm_->pc_offset(), pos, false); | 674 source_position_table_builder_.AddPosition(masm_->pc_offset(), |
| 675 SourcePosition(pos), false); |
| 674 } | 676 } |
| 675 | 677 |
| 676 | 678 |
| 677 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { | 679 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { |
| 678 RecordPosition(fun->start_position()); | 680 RecordPosition(fun->start_position()); |
| 679 } | 681 } |
| 680 | 682 |
| 681 | 683 |
| 682 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { | 684 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { |
| 683 // For default constructors, start position equals end position, and there | 685 // For default constructors, start position equals end position, and there |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 return info_->has_simple_parameters(); | 1993 return info_->has_simple_parameters(); |
| 1992 } | 1994 } |
| 1993 | 1995 |
| 1994 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 1996 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 1995 | 1997 |
| 1996 #undef __ | 1998 #undef __ |
| 1997 | 1999 |
| 1998 | 2000 |
| 1999 } // namespace internal | 2001 } // namespace internal |
| 2000 } // namespace v8 | 2002 } // namespace v8 |
| OLD | NEW |