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

Side by Side Diff: src/assembler.h

Issue 6321012: Version 3.0.9... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 17 matching lines...) Expand all
28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 30
31 // The original source code covered by the above license above has been 31 // The original source code covered by the above license above has been
32 // modified significantly by Google Inc. 32 // modified significantly by Google Inc.
33 // Copyright 2006-2009 the V8 project authors. All rights reserved. 33 // Copyright 2006-2009 the V8 project authors. All rights reserved.
34 34
35 #ifndef V8_ASSEMBLER_H_ 35 #ifndef V8_ASSEMBLER_H_
36 #define V8_ASSEMBLER_H_ 36 #define V8_ASSEMBLER_H_
37 37
38 #include "gdb-jit.h"
38 #include "runtime.h" 39 #include "runtime.h"
39 #include "top.h" 40 #include "top.h"
40 #include "token.h" 41 #include "token.h"
41 42
42 namespace v8 { 43 namespace v8 {
43 namespace internal { 44 namespace internal {
44 45
45 46
46 // ----------------------------------------------------------------------------- 47 // -----------------------------------------------------------------------------
47 // Common double constants. 48 // Common double constants.
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 int written_position; 631 int written_position;
631 632
632 int current_statement_position; 633 int current_statement_position;
633 int written_statement_position; 634 int written_statement_position;
634 }; 635 };
635 636
636 637
637 class PositionsRecorder BASE_EMBEDDED { 638 class PositionsRecorder BASE_EMBEDDED {
638 public: 639 public:
639 explicit PositionsRecorder(Assembler* assembler) 640 explicit PositionsRecorder(Assembler* assembler)
640 : assembler_(assembler) {} 641 : assembler_(assembler) {
642 #ifdef ENABLE_GDB_JIT_INTERFACE
643 gdbjit_lineinfo_ = NULL;
644 #endif
645 }
646
647 #ifdef ENABLE_GDB_JIT_INTERFACE
648 ~PositionsRecorder() {
649 delete gdbjit_lineinfo_;
650 }
651
652 void StartGDBJITLineInfoRecording() {
653 if (FLAG_gdbjit) {
654 gdbjit_lineinfo_ = new GDBJITLineInfo();
655 }
656 }
657
658 GDBJITLineInfo* DetachGDBJITLineInfo() {
659 GDBJITLineInfo* lineinfo = gdbjit_lineinfo_;
660 gdbjit_lineinfo_ = NULL; // To prevent deallocation in destructor.
661 return lineinfo;
662 }
663 #endif
641 664
642 // Set current position to pos. 665 // Set current position to pos.
643 void RecordPosition(int pos); 666 void RecordPosition(int pos);
644 667
645 // Set current statement position to pos. 668 // Set current statement position to pos.
646 void RecordStatementPosition(int pos); 669 void RecordStatementPosition(int pos);
647 670
648 // Write recorded positions to relocation information. 671 // Write recorded positions to relocation information.
649 bool WriteRecordedPositions(); 672 bool WriteRecordedPositions();
650 673
651 int current_position() const { return state_.current_position; } 674 int current_position() const { return state_.current_position; }
652 675
653 int current_statement_position() const { 676 int current_statement_position() const {
654 return state_.current_statement_position; 677 return state_.current_statement_position;
655 } 678 }
656 679
657 private: 680 private:
658 Assembler* assembler_; 681 Assembler* assembler_;
659 PositionState state_; 682 PositionState state_;
683 #ifdef ENABLE_GDB_JIT_INTERFACE
684 GDBJITLineInfo* gdbjit_lineinfo_;
685 #endif
660 686
661 friend class PreservePositionScope; 687 friend class PreservePositionScope;
662 688
663 DISALLOW_COPY_AND_ASSIGN(PositionsRecorder); 689 DISALLOW_COPY_AND_ASSIGN(PositionsRecorder);
664 }; 690 };
665 691
666 692
667 class PreservePositionScope BASE_EMBEDDED { 693 class PreservePositionScope BASE_EMBEDDED {
668 public: 694 public:
669 explicit PreservePositionScope(PositionsRecorder* positions_recorder) 695 explicit PreservePositionScope(PositionsRecorder* positions_recorder)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 return num_bits_set; 745 return num_bits_set;
720 } 746 }
721 747
722 // Computes pow(x, y) with the special cases in the spec for Math.pow. 748 // Computes pow(x, y) with the special cases in the spec for Math.pow.
723 double power_double_int(double x, int y); 749 double power_double_int(double x, int y);
724 double power_double_double(double x, double y); 750 double power_double_double(double x, double y);
725 751
726 } } // namespace v8::internal 752 } } // namespace v8::internal
727 753
728 #endif // V8_ASSEMBLER_H_ 754 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698