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

Side by Side Diff: src/assembler.h

Issue 6597029: [Isolates] Merge r 6300:6500 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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 "token.h" 40 #include "token.h"
40 41
41 namespace v8 { 42 namespace v8 {
42 namespace internal { 43 namespace internal {
43 44
44 45
45 // ----------------------------------------------------------------------------- 46 // -----------------------------------------------------------------------------
46 // Common double constants. 47 // Common double constants.
47 48
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 int written_position; 633 int written_position;
633 634
634 int current_statement_position; 635 int current_statement_position;
635 int written_statement_position; 636 int written_statement_position;
636 }; 637 };
637 638
638 639
639 class PositionsRecorder BASE_EMBEDDED { 640 class PositionsRecorder BASE_EMBEDDED {
640 public: 641 public:
641 explicit PositionsRecorder(Assembler* assembler) 642 explicit PositionsRecorder(Assembler* assembler)
642 : assembler_(assembler) {} 643 : assembler_(assembler) {
644 #ifdef ENABLE_GDB_JIT_INTERFACE
645 gdbjit_lineinfo_ = NULL;
646 #endif
647 }
648
649 #ifdef ENABLE_GDB_JIT_INTERFACE
650 ~PositionsRecorder() {
651 delete gdbjit_lineinfo_;
652 }
653
654 void StartGDBJITLineInfoRecording() {
655 if (FLAG_gdbjit) {
656 gdbjit_lineinfo_ = new GDBJITLineInfo();
657 }
658 }
659
660 GDBJITLineInfo* DetachGDBJITLineInfo() {
661 GDBJITLineInfo* lineinfo = gdbjit_lineinfo_;
662 gdbjit_lineinfo_ = NULL; // To prevent deallocation in destructor.
663 return lineinfo;
664 }
665 #endif
643 666
644 // Set current position to pos. 667 // Set current position to pos.
645 void RecordPosition(int pos); 668 void RecordPosition(int pos);
646 669
647 // Set current statement position to pos. 670 // Set current statement position to pos.
648 void RecordStatementPosition(int pos); 671 void RecordStatementPosition(int pos);
649 672
650 // Write recorded positions to relocation information. 673 // Write recorded positions to relocation information.
651 bool WriteRecordedPositions(); 674 bool WriteRecordedPositions();
652 675
653 int current_position() const { return state_.current_position; } 676 int current_position() const { return state_.current_position; }
654 677
655 int current_statement_position() const { 678 int current_statement_position() const {
656 return state_.current_statement_position; 679 return state_.current_statement_position;
657 } 680 }
658 681
659 private: 682 private:
660 Assembler* assembler_; 683 Assembler* assembler_;
661 PositionState state_; 684 PositionState state_;
685 #ifdef ENABLE_GDB_JIT_INTERFACE
686 GDBJITLineInfo* gdbjit_lineinfo_;
687 #endif
662 688
663 friend class PreservePositionScope; 689 friend class PreservePositionScope;
664 690
665 DISALLOW_COPY_AND_ASSIGN(PositionsRecorder); 691 DISALLOW_COPY_AND_ASSIGN(PositionsRecorder);
666 }; 692 };
667 693
668 694
669 class PreservePositionScope BASE_EMBEDDED { 695 class PreservePositionScope BASE_EMBEDDED {
670 public: 696 public:
671 explicit PreservePositionScope(PositionsRecorder* positions_recorder) 697 explicit PreservePositionScope(PositionsRecorder* positions_recorder)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 return num_bits_set; 747 return num_bits_set;
722 } 748 }
723 749
724 // Computes pow(x, y) with the special cases in the spec for Math.pow. 750 // Computes pow(x, y) with the special cases in the spec for Math.pow.
725 double power_double_int(double x, int y); 751 double power_double_int(double x, int y);
726 double power_double_double(double x, double y); 752 double power_double_double(double x, double y);
727 753
728 } } // namespace v8::internal 754 } } // namespace v8::internal
729 755
730 #endif // V8_ASSEMBLER_H_ 756 #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