| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 enum InnerPosition { | 321 enum InnerPosition { |
| 322 BEFORE, | 322 BEFORE, |
| 323 START, | 323 START, |
| 324 END, | 324 END, |
| 325 AFTER, | 325 AFTER, |
| 326 FIRST_INNER_POSITION = BEFORE, | 326 FIRST_INNER_POSITION = BEFORE, |
| 327 LAST_INNER_POSITION = AFTER | 327 LAST_INNER_POSITION = AFTER |
| 328 }; | 328 }; |
| 329 | 329 |
| 330 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { | 330 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { |
| 331 if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; | 331 if (parallel_moves_[pos] == NULL) { |
| 332 parallel_moves_[pos] = new LParallelMove(block_->zone()); |
| 333 } |
| 332 return parallel_moves_[pos]; | 334 return parallel_moves_[pos]; |
| 333 } | 335 } |
| 334 | 336 |
| 335 LParallelMove* GetParallelMove(InnerPosition pos) { | 337 LParallelMove* GetParallelMove(InnerPosition pos) { |
| 336 return parallel_moves_[pos]; | 338 return parallel_moves_[pos]; |
| 337 } | 339 } |
| 338 | 340 |
| 339 private: | 341 private: |
| 340 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 342 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
| 341 HBasicBlock* block_; | 343 HBasicBlock* block_; |
| (...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2030 }; | 2032 }; |
| 2031 | 2033 |
| 2032 | 2034 |
| 2033 class LChunkBuilder; | 2035 class LChunkBuilder; |
| 2034 class LChunk: public ZoneObject { | 2036 class LChunk: public ZoneObject { |
| 2035 public: | 2037 public: |
| 2036 LChunk(CompilationInfo* info, HGraph* graph) | 2038 LChunk(CompilationInfo* info, HGraph* graph) |
| 2037 : spill_slot_count_(0), | 2039 : spill_slot_count_(0), |
| 2038 info_(info), | 2040 info_(info), |
| 2039 graph_(graph), | 2041 graph_(graph), |
| 2040 instructions_(32), | 2042 instructions_(graph->zone(), 32), |
| 2041 pointer_maps_(8), | 2043 pointer_maps_(graph->zone(), 8), |
| 2042 inlined_closures_(1) { } | 2044 inlined_closures_(graph->zone(), 1) { } |
| 2043 | 2045 |
| 2044 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 2046 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 2045 LConstantOperand* DefineConstantOperand(HConstant* constant); | 2047 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 2046 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 2048 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
| 2047 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 2049 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 2048 | 2050 |
| 2049 int GetNextSpillIndex(bool is_double); | 2051 int GetNextSpillIndex(bool is_double); |
| 2050 LOperand* GetNextSpillSlot(bool is_double); | 2052 LOperand* GetNextSpillSlot(bool is_double); |
| 2051 | 2053 |
| 2052 int ParameterAt(int index); | 2054 int ParameterAt(int index); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2251 | 2253 |
| 2252 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2254 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2253 }; | 2255 }; |
| 2254 | 2256 |
| 2255 #undef DECLARE_HYDROGEN_ACCESSOR | 2257 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2256 #undef DECLARE_CONCRETE_INSTRUCTION | 2258 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2257 | 2259 |
| 2258 } } // namespace v8::internal | 2260 } } // namespace v8::internal |
| 2259 | 2261 |
| 2260 #endif // V8_IA32_LITHIUM_IA32_H_ | 2262 #endif // V8_IA32_LITHIUM_IA32_H_ |
| OLD | NEW |