OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 : masm_(masm), info_(NULL), destination_(no_reg), smi_bits_(0) { | 73 : masm_(masm), info_(NULL), destination_(no_reg), smi_bits_(0) { |
74 } | 74 } |
75 | 75 |
76 static Handle<Code> MakeCode(CompilationInfo* info); | 76 static Handle<Code> MakeCode(CompilationInfo* info); |
77 | 77 |
78 void Generate(CompilationInfo* compilation_info); | 78 void Generate(CompilationInfo* compilation_info); |
79 | 79 |
80 private: | 80 private: |
81 MacroAssembler* masm() { return masm_; } | 81 MacroAssembler* masm() { return masm_; } |
82 CompilationInfo* info() { return info_; } | 82 CompilationInfo* info() { return info_; } |
83 Label* bailout() { return &bailout_; } | |
84 | 83 |
85 Register destination() { return destination_; } | 84 Register destination() { return destination_; } |
86 void set_destination(Register reg) { destination_ = reg; } | 85 void set_destination(Register reg) { destination_ = reg; } |
87 | 86 |
88 FunctionLiteral* function() { return info_->function(); } | 87 FunctionLiteral* function() { return info_->function(); } |
89 Scope* scope() { return info_->scope(); } | 88 Scope* scope() { return info_->scope(); } |
90 | 89 |
91 // Platform-specific fixed registers, all guaranteed distinct. | 90 // Platform-specific fixed registers, all guaranteed distinct. |
92 Register accumulator0(); | 91 Register accumulator0(); |
93 Register accumulator1(); | 92 Register accumulator1(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // left in the destination register. | 138 // left in the destination register. |
140 void EmitThisPropertyLoad(Handle<String> name); | 139 void EmitThisPropertyLoad(Handle<String> name); |
141 | 140 |
142 // Emit a bitwise or operation. The left operand is in accumulator1 and | 141 // Emit a bitwise or operation. The left operand is in accumulator1 and |
143 // the right is in accumulator0. The result should be left in the | 142 // the right is in accumulator0. The result should be left in the |
144 // destination register. | 143 // destination register. |
145 void EmitBitOr(); | 144 void EmitBitOr(); |
146 | 145 |
147 MacroAssembler* masm_; | 146 MacroAssembler* masm_; |
148 CompilationInfo* info_; | 147 CompilationInfo* info_; |
149 Label bailout_; | |
150 Register destination_; | 148 Register destination_; |
151 uint32_t smi_bits_; | 149 uint32_t smi_bits_; |
152 | 150 |
153 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); | 151 DISALLOW_COPY_AND_ASSIGN(FastCodeGenerator); |
154 }; | 152 }; |
155 | 153 |
156 | 154 |
157 } } // namespace v8::internal | 155 } } // namespace v8::internal |
158 | 156 |
159 #endif // V8_TARGET_ARCH_IA32 | 157 #endif // V8_TARGET_ARCH_IA32 |
160 | 158 |
161 #endif // V8_FAST_CODEGEN_H_ | 159 #endif // V8_FAST_CODEGEN_H_ |
OLD | NEW |