OLD | NEW |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 #else | 91 #else |
92 #error Unsupported target architecture. | 92 #error Unsupported target architecture. |
93 #endif | 93 #endif |
94 | 94 |
95 #include "register-allocator.h" | 95 #include "register-allocator.h" |
96 | 96 |
97 namespace v8 { | 97 namespace v8 { |
98 namespace internal { | 98 namespace internal { |
99 | 99 |
100 | 100 |
| 101 // Support for "structured" code comments. |
| 102 #ifdef DEBUG |
| 103 |
| 104 class Comment BASE_EMBEDDED { |
| 105 public: |
| 106 Comment(MacroAssembler* masm, const char* msg); |
| 107 ~Comment(); |
| 108 |
| 109 private: |
| 110 MacroAssembler* masm_; |
| 111 const char* msg_; |
| 112 }; |
| 113 |
| 114 #else |
| 115 |
| 116 class Comment BASE_EMBEDDED { |
| 117 public: |
| 118 Comment(MacroAssembler*, const char*) {} |
| 119 }; |
| 120 |
| 121 #endif // DEBUG |
| 122 |
| 123 |
101 // Code generation can be nested. Code generation scopes form a stack | 124 // Code generation can be nested. Code generation scopes form a stack |
102 // of active code generators. | 125 // of active code generators. |
103 class CodeGeneratorScope BASE_EMBEDDED { | 126 class CodeGeneratorScope BASE_EMBEDDED { |
104 public: | 127 public: |
105 explicit CodeGeneratorScope(CodeGenerator* cgen) { | 128 explicit CodeGeneratorScope(CodeGenerator* cgen) { |
106 previous_ = top_; | 129 previous_ = top_; |
107 top_ = cgen; | 130 top_ = cgen; |
108 } | 131 } |
109 | 132 |
110 ~CodeGeneratorScope() { | 133 ~CodeGeneratorScope() { |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 private: | 566 private: |
544 Major MajorKey() { return ToBoolean; } | 567 Major MajorKey() { return ToBoolean; } |
545 int MinorKey() { return 0; } | 568 int MinorKey() { return 0; } |
546 }; | 569 }; |
547 | 570 |
548 | 571 |
549 } // namespace internal | 572 } // namespace internal |
550 } // namespace v8 | 573 } // namespace v8 |
551 | 574 |
552 #endif // V8_CODEGEN_H_ | 575 #endif // V8_CODEGEN_H_ |
OLD | NEW |