Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 void FullCodeGenerator::EmitHasProperty() { 655 void FullCodeGenerator::EmitHasProperty() {
656 Callable callable = CodeFactory::HasProperty(isolate()); 656 Callable callable = CodeFactory::HasProperty(isolate());
657 PopOperand(callable.descriptor().GetRegisterParameter(1)); 657 PopOperand(callable.descriptor().GetRegisterParameter(1));
658 PopOperand(callable.descriptor().GetRegisterParameter(0)); 658 PopOperand(callable.descriptor().GetRegisterParameter(0));
659 __ Call(callable.code(), RelocInfo::CODE_TARGET); 659 __ Call(callable.code(), RelocInfo::CODE_TARGET);
660 RestoreContext(); 660 RestoreContext();
661 } 661 }
662 662
663 void FullCodeGenerator::RecordStatementPosition(int pos) { 663 void FullCodeGenerator::RecordStatementPosition(int pos) {
664 DCHECK_NE(kNoSourcePosition, pos); 664 DCHECK_NE(kNoSourcePosition, pos);
665 source_position_table_builder_.AddPosition(masm_->pc_offset(), pos, true); 665 source_position_table_builder_.AddPosition(masm_->pc_offset(),
666 SourcePosition(pos), true);
666 } 667 }
667 668
668 void FullCodeGenerator::RecordPosition(int pos) { 669 void FullCodeGenerator::RecordPosition(int pos) {
669 DCHECK_NE(kNoSourcePosition, pos); 670 DCHECK_NE(kNoSourcePosition, pos);
670 source_position_table_builder_.AddPosition(masm_->pc_offset(), pos, false); 671 source_position_table_builder_.AddPosition(masm_->pc_offset(),
672 SourcePosition(pos), false);
671 } 673 }
672 674
673 675
674 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { 676 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
675 RecordPosition(fun->start_position()); 677 RecordPosition(fun->start_position());
676 } 678 }
677 679
678 680
679 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { 681 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
680 // For default constructors, start position equals end position, and there 682 // For default constructors, start position equals end position, and there
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1988 return info_->has_simple_parameters(); 1990 return info_->has_simple_parameters();
1989 } 1991 }
1990 1992
1991 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 1993 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
1992 1994
1993 #undef __ 1995 #undef __
1994 1996
1995 1997
1996 } // namespace internal 1998 } // namespace internal
1997 } // namespace v8 1999 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/ia32/assembler-ia32.h » ('j') | src/source-position.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698