| 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 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 | 2282 |
| 2283 class LChunkBuilder; | 2283 class LChunkBuilder; |
| 2284 class LChunk: public ZoneObject { | 2284 class LChunk: public ZoneObject { |
| 2285 public: | 2285 public: |
| 2286 LChunk(CompilationInfo* info, HGraph* graph) | 2286 LChunk(CompilationInfo* info, HGraph* graph) |
| 2287 : spill_slot_count_(0), | 2287 : spill_slot_count_(0), |
| 2288 info_(info), | 2288 info_(info), |
| 2289 graph_(graph), | 2289 graph_(graph), |
| 2290 instructions_(32), | 2290 instructions_(32), |
| 2291 pointer_maps_(8), | 2291 pointer_maps_(8), |
| 2292 num_double_slots_(0), | |
| 2293 inlined_closures_(1) { } | 2292 inlined_closures_(1) { } |
| 2294 | 2293 |
| 2295 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 2294 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 2296 LConstantOperand* DefineConstantOperand(HConstant* constant); | 2295 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 2297 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 2296 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
| 2298 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 2297 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 2299 | 2298 |
| 2300 int GetNextSpillIndex(bool is_double); | 2299 int GetNextSpillIndex(bool is_double); |
| 2301 LOperand* GetNextSpillSlot(bool is_double); | 2300 LOperand* GetNextSpillSlot(bool is_double); |
| 2302 | 2301 |
| 2303 int ParameterAt(int index); | 2302 int ParameterAt(int index); |
| 2304 int GetParameterStackSlot(int index) const; | 2303 int GetParameterStackSlot(int index) const; |
| 2305 int spill_slot_count() const { return spill_slot_count_; } | 2304 int spill_slot_count() const { return spill_slot_count_; } |
| 2306 int num_double_slots() const { return num_double_slots_; } | |
| 2307 | |
| 2308 CompilationInfo* info() const { return info_; } | 2305 CompilationInfo* info() const { return info_; } |
| 2309 HGraph* graph() const { return graph_; } | 2306 HGraph* graph() const { return graph_; } |
| 2310 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } | 2307 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } |
| 2311 void AddGapMove(int index, LOperand* from, LOperand* to); | 2308 void AddGapMove(int index, LOperand* from, LOperand* to); |
| 2312 LGap* GetGapAt(int index) const; | 2309 LGap* GetGapAt(int index) const; |
| 2313 bool IsGapAt(int index) const; | 2310 bool IsGapAt(int index) const; |
| 2314 int NearestGapPos(int index) const; | 2311 int NearestGapPos(int index) const; |
| 2315 void MarkEmptyBlocks(); | 2312 void MarkEmptyBlocks(); |
| 2316 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 2313 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
| 2317 LLabel* GetLabel(int block_id) const { | 2314 LLabel* GetLabel(int block_id) const { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 2339 void AddInlinedClosure(Handle<JSFunction> closure) { | 2336 void AddInlinedClosure(Handle<JSFunction> closure) { |
| 2340 inlined_closures_.Add(closure); | 2337 inlined_closures_.Add(closure); |
| 2341 } | 2338 } |
| 2342 | 2339 |
| 2343 private: | 2340 private: |
| 2344 int spill_slot_count_; | 2341 int spill_slot_count_; |
| 2345 CompilationInfo* info_; | 2342 CompilationInfo* info_; |
| 2346 HGraph* const graph_; | 2343 HGraph* const graph_; |
| 2347 ZoneList<LInstruction*> instructions_; | 2344 ZoneList<LInstruction*> instructions_; |
| 2348 ZoneList<LPointerMap*> pointer_maps_; | 2345 ZoneList<LPointerMap*> pointer_maps_; |
| 2349 int num_double_slots_; | |
| 2350 ZoneList<Handle<JSFunction> > inlined_closures_; | 2346 ZoneList<Handle<JSFunction> > inlined_closures_; |
| 2351 }; | 2347 }; |
| 2352 | 2348 |
| 2353 | 2349 |
| 2354 class LChunkBuilder BASE_EMBEDDED { | 2350 class LChunkBuilder BASE_EMBEDDED { |
| 2355 public: | 2351 public: |
| 2356 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) | 2352 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) |
| 2357 : chunk_(NULL), | 2353 : chunk_(NULL), |
| 2358 info_(info), | 2354 info_(info), |
| 2359 graph_(graph), | 2355 graph_(graph), |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2509 | 2505 |
| 2510 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2506 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2511 }; | 2507 }; |
| 2512 | 2508 |
| 2513 #undef DECLARE_HYDROGEN_ACCESSOR | 2509 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2514 #undef DECLARE_CONCRETE_INSTRUCTION | 2510 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2515 | 2511 |
| 2516 } } // namespace v8::internal | 2512 } } // namespace v8::internal |
| 2517 | 2513 |
| 2518 #endif // V8_IA32_LITHIUM_IA32_H_ | 2514 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |