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

Side by Side Diff: src/codegen.h

Issue 2957: Defer the writing of the source position data to the relocation information... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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/assembler-ia32.cc ('k') | src/codegen.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual ~DeferredCode() { } 56 virtual ~DeferredCode() { }
57 57
58 virtual void Generate() = 0; 58 virtual void Generate() = 0;
59 59
60 MacroAssembler* masm() const { return masm_; } 60 MacroAssembler* masm() const { return masm_; }
61 CodeGenerator* generator() const { return generator_; } 61 CodeGenerator* generator() const { return generator_; }
62 62
63 Label* enter() { return &enter_; } 63 Label* enter() { return &enter_; }
64 Label* exit() { return &exit_; } 64 Label* exit() { return &exit_; }
65 65
66 int statement_position() const { return statement_position_; }
66 int position() const { return position_; } 67 int position() const { return position_; }
67 bool position_is_statement() const { return position_is_statement_; }
68 68
69 #ifdef DEBUG 69 #ifdef DEBUG
70 void set_comment(const char* comment) { comment_ = comment; } 70 void set_comment(const char* comment) { comment_ = comment; }
71 const char* comment() const { return comment_; } 71 const char* comment() const { return comment_; }
72 #else 72 #else
73 inline void set_comment(const char* comment) { } 73 inline void set_comment(const char* comment) { }
74 const char* comment() const { return ""; } 74 const char* comment() const { return ""; }
75 #endif 75 #endif
76 76
77 protected: 77 protected:
78 // The masm_ field is manipulated when compiling stubs with the 78 // The masm_ field is manipulated when compiling stubs with the
79 // BEGIN_STUB and END_STUB macros. For that reason, it cannot be 79 // BEGIN_STUB and END_STUB macros. For that reason, it cannot be
80 // constant. 80 // constant.
81 MacroAssembler* masm_; 81 MacroAssembler* masm_;
82 82
83 private: 83 private:
84 CodeGenerator* const generator_; 84 CodeGenerator* const generator_;
85 Label enter_; 85 Label enter_;
86 Label exit_; 86 Label exit_;
87 int statement_position_;
87 int position_; 88 int position_;
88 bool position_is_statement_;
89 #ifdef DEBUG 89 #ifdef DEBUG
90 const char* comment_; 90 const char* comment_;
91 #endif 91 #endif
92 DISALLOW_COPY_AND_ASSIGN(DeferredCode); 92 DISALLOW_COPY_AND_ASSIGN(DeferredCode);
93 }; 93 };
94 94
95 95
96 // A superclass for gode generators. The implementations of methods 96 // A superclass for gode generators. The implementations of methods
97 // declared in this class are partially in codegen.c and partially in 97 // declared in this class are partially in codegen.c and partially in
98 // codegen_<arch>.c. 98 // codegen_<arch>.c.
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 int MinorKey() { return 1; } 302 int MinorKey() { return 1; }
303 303
304 const char* GetName() { return "JSConstructEntryStub"; } 304 const char* GetName() { return "JSConstructEntryStub"; }
305 }; 305 };
306 306
307 307
308 } // namespace internal 308 } // namespace internal
309 } // namespace v8 309 } // namespace v8
310 310
311 #endif // V8_CODEGEN_H_ 311 #endif // V8_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/assembler-ia32.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698