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 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 | 2300 |
2301 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") | 2301 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") |
2302 }; | 2302 }; |
2303 | 2303 |
2304 | 2304 |
2305 class LChunkBuilder; | 2305 class LChunkBuilder; |
2306 class LChunk: public ZoneObject { | 2306 class LChunk: public ZoneObject { |
2307 public: | 2307 public: |
2308 LChunk(CompilationInfo* info, HGraph* graph) | 2308 LChunk(CompilationInfo* info, HGraph* graph) |
2309 : spill_slot_count_(0), | 2309 : spill_slot_count_(0), |
| 2310 num_double_slots_(0), |
2310 info_(info), | 2311 info_(info), |
2311 graph_(graph), | 2312 graph_(graph), |
2312 instructions_(32, graph->zone()), | 2313 instructions_(32, graph->zone()), |
2313 pointer_maps_(8, graph->zone()), | 2314 pointer_maps_(8, graph->zone()), |
2314 inlined_closures_(1, graph->zone()) { } | 2315 inlined_closures_(1, graph->zone()) { } |
2315 | 2316 |
2316 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 2317 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
2317 LConstantOperand* DefineConstantOperand(HConstant* constant); | 2318 LConstantOperand* DefineConstantOperand(HConstant* constant); |
2318 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 2319 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
2319 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 2320 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
2320 | 2321 |
2321 int GetNextSpillIndex(bool is_double); | 2322 int GetNextSpillIndex(bool is_double); |
2322 LOperand* GetNextSpillSlot(bool is_double); | 2323 LOperand* GetNextSpillSlot(bool is_double); |
2323 | 2324 |
2324 int ParameterAt(int index); | 2325 int ParameterAt(int index); |
2325 int GetParameterStackSlot(int index) const; | 2326 int GetParameterStackSlot(int index) const; |
2326 int spill_slot_count() const { return spill_slot_count_; } | 2327 int spill_slot_count() const { return spill_slot_count_; } |
| 2328 int num_double_slots() const { return num_double_slots_; } |
2327 CompilationInfo* info() const { return info_; } | 2329 CompilationInfo* info() const { return info_; } |
2328 HGraph* graph() const { return graph_; } | 2330 HGraph* graph() const { return graph_; } |
2329 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } | 2331 const ZoneList<LInstruction*>* instructions() const { return &instructions_; } |
2330 void AddGapMove(int index, LOperand* from, LOperand* to); | 2332 void AddGapMove(int index, LOperand* from, LOperand* to); |
2331 LGap* GetGapAt(int index) const; | 2333 LGap* GetGapAt(int index) const; |
2332 bool IsGapAt(int index) const; | 2334 bool IsGapAt(int index) const; |
2333 int NearestGapPos(int index) const; | 2335 int NearestGapPos(int index) const; |
2334 void MarkEmptyBlocks(); | 2336 void MarkEmptyBlocks(); |
2335 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } | 2337 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } |
2336 LLabel* GetLabel(int block_id) const { | 2338 LLabel* GetLabel(int block_id) const { |
(...skipping 19 matching lines...) Expand all Loading... |
2356 } | 2358 } |
2357 | 2359 |
2358 void AddInlinedClosure(Handle<JSFunction> closure) { | 2360 void AddInlinedClosure(Handle<JSFunction> closure) { |
2359 inlined_closures_.Add(closure, zone()); | 2361 inlined_closures_.Add(closure, zone()); |
2360 } | 2362 } |
2361 | 2363 |
2362 Zone* zone() const { return graph_->zone(); } | 2364 Zone* zone() const { return graph_->zone(); } |
2363 | 2365 |
2364 private: | 2366 private: |
2365 int spill_slot_count_; | 2367 int spill_slot_count_; |
| 2368 int num_double_slots_; |
2366 CompilationInfo* info_; | 2369 CompilationInfo* info_; |
2367 HGraph* const graph_; | 2370 HGraph* const graph_; |
2368 ZoneList<LInstruction*> instructions_; | 2371 ZoneList<LInstruction*> instructions_; |
2369 ZoneList<LPointerMap*> pointer_maps_; | 2372 ZoneList<LPointerMap*> pointer_maps_; |
2370 ZoneList<Handle<JSFunction> > inlined_closures_; | 2373 ZoneList<Handle<JSFunction> > inlined_closures_; |
2371 }; | 2374 }; |
2372 | 2375 |
2373 | 2376 |
2374 class LChunkBuilder BASE_EMBEDDED { | 2377 class LChunkBuilder BASE_EMBEDDED { |
2375 public: | 2378 public: |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 | 2527 |
2525 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2528 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2526 }; | 2529 }; |
2527 | 2530 |
2528 #undef DECLARE_HYDROGEN_ACCESSOR | 2531 #undef DECLARE_HYDROGEN_ACCESSOR |
2529 #undef DECLARE_CONCRETE_INSTRUCTION | 2532 #undef DECLARE_CONCRETE_INSTRUCTION |
2530 | 2533 |
2531 } } // namespace v8::internal | 2534 } } // namespace v8::internal |
2532 | 2535 |
2533 #endif // V8_IA32_LITHIUM_IA32_H_ | 2536 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |