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/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 void FullCodeGenerator::EmitHasProperty() { | 610 void FullCodeGenerator::EmitHasProperty() { |
611 Callable callable = CodeFactory::HasProperty(isolate()); | 611 Callable callable = CodeFactory::HasProperty(isolate()); |
612 PopOperand(callable.descriptor().GetRegisterParameter(1)); | 612 PopOperand(callable.descriptor().GetRegisterParameter(1)); |
613 PopOperand(callable.descriptor().GetRegisterParameter(0)); | 613 PopOperand(callable.descriptor().GetRegisterParameter(0)); |
614 __ Call(callable.code(), RelocInfo::CODE_TARGET); | 614 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
615 RestoreContext(); | 615 RestoreContext(); |
616 } | 616 } |
617 | 617 |
618 bool RecordStatementPosition(MacroAssembler* masm, int pos) { | 618 bool RecordStatementPosition(MacroAssembler* masm, int pos) { |
619 if (pos == RelocInfo::kNoPosition) return false; | 619 if (pos == RelocInfo::kNoPosition) return false; |
620 masm->positions_recorder()->RecordStatementPosition(pos); | 620 return masm->positions_recorder()->RecordStatementPosition(pos); |
621 masm->positions_recorder()->RecordPosition(pos); | |
622 return masm->positions_recorder()->WriteRecordedPositions(); | |
623 } | 621 } |
624 | 622 |
625 | 623 |
626 bool RecordPosition(MacroAssembler* masm, int pos) { | 624 bool RecordPosition(MacroAssembler* masm, int pos) { |
627 if (pos == RelocInfo::kNoPosition) return false; | 625 if (pos == RelocInfo::kNoPosition) return false; |
628 masm->positions_recorder()->RecordPosition(pos); | 626 return masm->positions_recorder()->RecordPosition(pos); |
629 return masm->positions_recorder()->WriteRecordedPositions(); | |
630 } | 627 } |
631 | 628 |
632 | 629 |
633 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { | 630 void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) { |
634 RecordPosition(masm_, fun->start_position()); | 631 RecordPosition(masm_, fun->start_position()); |
635 } | 632 } |
636 | 633 |
637 | 634 |
638 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { | 635 void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) { |
639 // For default constructors, start position equals end position, and there | 636 // For default constructors, start position equals end position, and there |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 return var->scope()->is_nonlinear() || | 1987 return var->scope()->is_nonlinear() || |
1991 var->initializer_position() >= proxy->position(); | 1988 var->initializer_position() >= proxy->position(); |
1992 } | 1989 } |
1993 | 1990 |
1994 | 1991 |
1995 #undef __ | 1992 #undef __ |
1996 | 1993 |
1997 | 1994 |
1998 } // namespace internal | 1995 } // namespace internal |
1999 } // namespace v8 | 1996 } // namespace v8 |
OLD | NEW |