| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 class DeferredCode: public ZoneObject { | 81 class DeferredCode: public ZoneObject { |
| 82 public: | 82 public: |
| 83 explicit DeferredCode(CodeGenerator* generator); | 83 explicit DeferredCode(CodeGenerator* generator); |
| 84 virtual ~DeferredCode() { } | 84 virtual ~DeferredCode() { } |
| 85 | 85 |
| 86 virtual void Generate() = 0; | 86 virtual void Generate() = 0; |
| 87 | 87 |
| 88 MacroAssembler* masm() const { return masm_; } | 88 MacroAssembler* masm() const { return masm_; } |
| 89 CodeGenerator* generator() const { return generator_; } | 89 CodeGenerator* generator() const { return generator_; } |
| 90 | 90 |
| 91 Label* enter() { return &enter_; } | 91 JumpTarget* enter() { return &enter_; } |
| 92 Label* exit() { return &exit_; } | 92 JumpTarget* exit() { return &exit_; } |
| 93 | 93 |
| 94 int statement_position() const { return statement_position_; } | 94 int statement_position() const { return statement_position_; } |
| 95 int position() const { return position_; } | 95 int position() const { return position_; } |
| 96 | 96 |
| 97 #ifdef DEBUG | 97 #ifdef DEBUG |
| 98 void set_comment(const char* comment) { comment_ = comment; } | 98 void set_comment(const char* comment) { comment_ = comment; } |
| 99 const char* comment() const { return comment_; } | 99 const char* comment() const { return comment_; } |
| 100 #else | 100 #else |
| 101 inline void set_comment(const char* comment) { } | 101 inline void set_comment(const char* comment) { } |
| 102 const char* comment() const { return ""; } | 102 const char* comment() const { return ""; } |
| 103 #endif | 103 #endif |
| 104 | 104 |
| 105 protected: | 105 protected: |
| 106 // The masm_ field is manipulated when compiling stubs with the | 106 // The masm_ field is manipulated when compiling stubs with the |
| 107 // BEGIN_STUB and END_STUB macros. For that reason, it cannot be | 107 // BEGIN_STUB and END_STUB macros. For that reason, it cannot be |
| 108 // constant. | 108 // constant. |
| 109 MacroAssembler* masm_; | 109 MacroAssembler* masm_; |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 CodeGenerator* const generator_; | 112 CodeGenerator* const generator_; |
| 113 Label enter_; | 113 JumpTarget enter_; |
| 114 Label exit_; | 114 JumpTarget exit_; |
| 115 int statement_position_; | 115 int statement_position_; |
| 116 int position_; | 116 int position_; |
| 117 #ifdef DEBUG | 117 #ifdef DEBUG |
| 118 const char* comment_; | 118 const char* comment_; |
| 119 #endif | 119 #endif |
| 120 DISALLOW_COPY_AND_ASSIGN(DeferredCode); | 120 DISALLOW_COPY_AND_ASSIGN(DeferredCode); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 | 123 |
| 124 // RuntimeStub models code stubs calling entry points in the Runtime class. | 124 // RuntimeStub models code stubs calling entry points in the Runtime class. |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 PrintF("ArgumentsAccessStub (type %d)\n", type_); | 281 PrintF("ArgumentsAccessStub (type %d)\n", type_); |
| 282 } | 282 } |
| 283 #endif | 283 #endif |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 | 286 |
| 287 } // namespace internal | 287 } // namespace internal |
| 288 } // namespace v8 | 288 } // namespace v8 |
| 289 | 289 |
| 290 #endif // V8_CODEGEN_H_ | 290 #endif // V8_CODEGEN_H_ |
| OLD | NEW |