| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 enum InnerPosition { | 328 enum InnerPosition { |
| 329 BEFORE, | 329 BEFORE, |
| 330 START, | 330 START, |
| 331 END, | 331 END, |
| 332 AFTER, | 332 AFTER, |
| 333 FIRST_INNER_POSITION = BEFORE, | 333 FIRST_INNER_POSITION = BEFORE, |
| 334 LAST_INNER_POSITION = AFTER | 334 LAST_INNER_POSITION = AFTER |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { | 337 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { |
| 338 if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; | 338 if (parallel_moves_[pos] == NULL) { |
| 339 parallel_moves_[pos] = new LParallelMove(block_->zone()); |
| 340 } |
| 339 return parallel_moves_[pos]; | 341 return parallel_moves_[pos]; |
| 340 } | 342 } |
| 341 | 343 |
| 342 LParallelMove* GetParallelMove(InnerPosition pos) { | 344 LParallelMove* GetParallelMove(InnerPosition pos) { |
| 343 return parallel_moves_[pos]; | 345 return parallel_moves_[pos]; |
| 344 } | 346 } |
| 345 | 347 |
| 346 private: | 348 private: |
| 347 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 349 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
| 348 HBasicBlock* block_; | 350 HBasicBlock* block_; |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1919 }; | 1921 }; |
| 1920 | 1922 |
| 1921 | 1923 |
| 1922 class LChunkBuilder; | 1924 class LChunkBuilder; |
| 1923 class LChunk: public ZoneObject { | 1925 class LChunk: public ZoneObject { |
| 1924 public: | 1926 public: |
| 1925 explicit LChunk(CompilationInfo* info, HGraph* graph) | 1927 explicit LChunk(CompilationInfo* info, HGraph* graph) |
| 1926 : spill_slot_count_(0), | 1928 : spill_slot_count_(0), |
| 1927 info_(info), | 1929 info_(info), |
| 1928 graph_(graph), | 1930 graph_(graph), |
| 1929 instructions_(32), | 1931 instructions_(graph->zone(), 32), |
| 1930 pointer_maps_(8), | 1932 pointer_maps_(graph->zone(), 8), |
| 1931 inlined_closures_(1) { } | 1933 inlined_closures_(graph->zone(), 1) { } |
| 1932 | 1934 |
| 1933 void AddInstruction(LInstruction* instruction, HBasicBlock* block); | 1935 void AddInstruction(LInstruction* instruction, HBasicBlock* block); |
| 1934 LConstantOperand* DefineConstantOperand(HConstant* constant); | 1936 LConstantOperand* DefineConstantOperand(HConstant* constant); |
| 1935 Handle<Object> LookupLiteral(LConstantOperand* operand) const; | 1937 Handle<Object> LookupLiteral(LConstantOperand* operand) const; |
| 1936 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; | 1938 Representation LookupLiteralRepresentation(LConstantOperand* operand) const; |
| 1937 | 1939 |
| 1938 int GetNextSpillIndex(bool is_double); | 1940 int GetNextSpillIndex(bool is_double); |
| 1939 LOperand* GetNextSpillSlot(bool is_double); | 1941 LOperand* GetNextSpillSlot(bool is_double); |
| 1940 | 1942 |
| 1941 int ParameterAt(int index); | 1943 int ParameterAt(int index); |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 | 2142 |
| 2141 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2143 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2142 }; | 2144 }; |
| 2143 | 2145 |
| 2144 #undef DECLARE_HYDROGEN_ACCESSOR | 2146 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2145 #undef DECLARE_CONCRETE_INSTRUCTION | 2147 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2146 | 2148 |
| 2147 } } // namespace v8::int | 2149 } } // namespace v8::int |
| 2148 | 2150 |
| 2149 #endif // V8_X64_LITHIUM_X64_H_ | 2151 #endif // V8_X64_LITHIUM_X64_H_ |
| OLD | NEW |