| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2158 | 2158 |
| 2159 class LChunkBuilder; | 2159 class LChunkBuilder; |
| 2160 class LChunk: public ZoneObject { | 2160 class LChunk: public ZoneObject { |
| 2161 public: | 2161 public: |
| 2162 LChunk(CompilationInfo* info, HGraph* graph) | 2162 LChunk(CompilationInfo* info, HGraph* graph) |
| 2163 : spill_slot_count_(0), | 2163 : spill_slot_count_(0), |
| 2164 info_(info), | 2164 info_(info), |
| 2165 graph_(graph), | 2165 graph_(graph), |
| 2166 instructions_(32), | 2166 instructions_(32), |
| 2167 pointer_maps_(8), | 2167 pointer_maps_(8), |
| 2168 num_double_slots_(0), | |
| 2169 inlined_closures_(1) { } | 2168 inlined_closures_(1) { } |
| 2170 | 2169 |
| 2171 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 2170 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 2172 LConstantOperand* DefineConstantOperand(HConstant* constant); | 2171 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 2173 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 2172 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
| 2174 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 2173 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 2175 | 2174 |
| 2176 int GetNextSpillIndex(bool is_double); | 2175 int GetNextSpillIndex(bool is_double); |
| 2177 LOperand* GetNextSpillSlot(bool is_double); | 2176 LOperand* GetNextSpillSlot(bool is_double); |
| 2178 | 2177 |
| 2179 int ParameterAt(int index); | 2178 int ParameterAt(int index); |
| 2180 int GetParameterStackSlot(int index) const; | 2179 int GetParameterStackSlot(int index) const; |
| 2181 int spill_slot_count() const { return spill_slot_count_; } | 2180 int spill_slot_count() const { return spill_slot_count_; } |
| 2182 int num_double_slots() const { return num_double_slots_; } | |
| 2183 | |
| 2184 CompilationInfo* info() const { return info_; } | 2181 CompilationInfo* info() const { return info_; } |
| 2185 HGraph* graph() const { return graph_; } | 2182 HGraph* graph() const { return graph_; } |
| 2186 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } | 2183 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } |
| 2187 void AddGapMove(int index, LOperand* from, LOperand* to); | 2184 void AddGapMove(int index, LOperand* from, LOperand* to); |
| 2188 LGap* GetGapAt(int index) const; | 2185 LGap* GetGapAt(int index) const; |
| 2189 bool IsGapAt(int index) const; | 2186 bool IsGapAt(int index) const; |
| 2190 int NearestGapPos(int index) const; | 2187 int NearestGapPos(int index) const; |
| 2191 void MarkEmptyBlocks(); | 2188 void MarkEmptyBlocks(); |
| 2192 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 2189 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
| 2193 LLabel* GetLabel(int block_id) const { | 2190 LLabel* GetLabel(int block_id) const { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2215 void AddInlinedClosure(Handle<JSFunction> closure) { | 2212 void AddInlinedClosure(Handle<JSFunction> closure) { |
| 2216 inlined_closures_.Add(closure); | 2213 inlined_closures_.Add(closure); |
| 2217 } | 2214 } |
| 2218 | 2215 |
| 2219 private: | 2216 private: |
| 2220 int spill_slot_count_; | 2217 int spill_slot_count_; |
| 2221 CompilationInfo* info_; | 2218 CompilationInfo* info_; |
| 2222 HGraph* const graph_; | 2219 HGraph* const graph_; |
| 2223 ZoneList<LInstruction*> instructions_; | 2220 ZoneList<LInstruction*> instructions_; |
| 2224 ZoneList<LPointerMap*> pointer_maps_; | 2221 ZoneList<LPointerMap*> pointer_maps_; |
| 2225 int num_double_slots_; | |
| 2226 ZoneList<Handle<JSFunction> > inlined_closures_; | 2222 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2227 }; | 2223 }; |
| 2228 | 2224 |
| 2229 | 2225 |
| 2230 class LChunkBuilder BASE_EMBEDDED { | 2226 class LChunkBuilder BASE_EMBEDDED { |
| 2231 public: | 2227 public: |
| 2232 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2228 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2233 : chunk_(NULL), | 2229 : chunk_(NULL), |
| 2234 info_(info), | 2230 info_(info), |
| 2235 graph_(graph), | 2231 graph_(graph), |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 | 2384 |
| 2389 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2385 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2390 }; | 2386 }; |
| 2391 | 2387 |
| 2392 #undef DECLARE_HYDROGEN_ACCESSOR | 2388 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2393 #undef DECLARE_CONCRETE_INSTRUCTION | 2389 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2394 | 2390 |
| 2395 } } // namespace v8::internal | 2391 } } // namespace v8::internal |
| 2396 | 2392 |
| 2397 #endif // V8_IA32_LITHIUM_IA32_H_ | 2393 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |