Chromium Code Reviews| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 void Advance() { current_++; } | 226 void Advance() { current_++; } |
| 227 | 227 |
| 228 private: | 228 private: |
| 229 const ZoneList<HBasicBlock*>* predecessor_list_; | 229 const ZoneList<HBasicBlock*>* predecessor_list_; |
| 230 int current_; | 230 int current_; |
| 231 }; | 231 }; |
| 232 | 232 |
| 233 | 233 |
| 234 class HInstructionIterator BASE_EMBEDDED { | 234 class HInstructionIterator BASE_EMBEDDED { |
| 235 public: | 235 public: |
| 236 explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { } | 236 explicit HInstructionIterator(HBasicBlock* block) |
| 237 : instr_(block->first()), next_(NULL) { | |
|
Michael Starzinger
2013/07/08 14:02:43
nit: Use a ternary operator, easier to read.
Hannes Payer (out of office)
2013/07/09 08:26:15
Done.
| |
| 238 if (!Done()) { | |
| 239 next_ = instr_->next(); | |
| 240 } | |
| 241 } | |
| 237 | 242 |
| 238 bool Done() { return instr_ == NULL; } | 243 bool Done() { return instr_ == NULL; } |
| 239 HInstruction* Current() { return instr_; } | 244 HInstruction* Current() { return instr_; } |
| 240 void Advance() { instr_ = instr_->next(); } | 245 void Advance() { |
| 246 instr_ = next_; | |
| 247 if (!Done()) { | |
|
Michael Starzinger
2013/07/08 14:02:43
nit: Use a ternary operator, easier to read.
Hannes Payer (out of office)
2013/07/09 08:26:15
Done.
| |
| 248 next_ = instr_->next(); | |
| 249 } else { | |
| 250 next_ = NULL; | |
| 251 } | |
| 252 } | |
| 241 | 253 |
| 242 private: | 254 private: |
| 243 HInstruction* instr_; | 255 HInstruction* instr_; |
| 256 HInstruction* next_; | |
| 244 }; | 257 }; |
| 245 | 258 |
| 246 | 259 |
| 247 class HLoopInformation: public ZoneObject { | 260 class HLoopInformation: public ZoneObject { |
| 248 public: | 261 public: |
| 249 HLoopInformation(HBasicBlock* loop_header, Zone* zone) | 262 HLoopInformation(HBasicBlock* loop_header, Zone* zone) |
| 250 : back_edges_(4, zone), | 263 : back_edges_(4, zone), |
| 251 loop_header_(loop_header), | 264 loop_header_(loop_header), |
| 252 blocks_(8, zone), | 265 blocks_(8, zone), |
| 253 stack_check_(NULL) { | 266 stack_check_(NULL) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 } | 338 } |
| 326 HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } | 339 HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } |
| 327 HConstant* GetConstant0(); | 340 HConstant* GetConstant0(); |
| 328 HConstant* GetConstant1(); | 341 HConstant* GetConstant1(); |
| 329 HConstant* GetConstantMinus1(); | 342 HConstant* GetConstantMinus1(); |
| 330 HConstant* GetConstantTrue(); | 343 HConstant* GetConstantTrue(); |
| 331 HConstant* GetConstantFalse(); | 344 HConstant* GetConstantFalse(); |
| 332 HConstant* GetConstantHole(); | 345 HConstant* GetConstantHole(); |
| 333 HConstant* GetConstantNull(); | 346 HConstant* GetConstantNull(); |
| 334 HConstant* GetInvalidContext(); | 347 HConstant* GetInvalidContext(); |
| 348 HConstant* GetConstantFreeSpaceMap(); | |
| 335 | 349 |
| 336 bool IsStandardConstant(HConstant* constant); | 350 bool IsStandardConstant(HConstant* constant); |
| 337 | 351 |
| 338 HBasicBlock* CreateBasicBlock(); | 352 HBasicBlock* CreateBasicBlock(); |
| 339 HArgumentsObject* GetArgumentsObject() const { | 353 HArgumentsObject* GetArgumentsObject() const { |
| 340 return arguments_object_.get(); | 354 return arguments_object_.get(); |
| 341 } | 355 } |
| 342 | 356 |
| 343 void SetArgumentsObject(HArgumentsObject* object) { | 357 void SetArgumentsObject(HArgumentsObject* object) { |
| 344 arguments_object_.set(object); | 358 arguments_object_.set(object); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 482 SetOncePointer<HConstant> undefined_constant_; | 496 SetOncePointer<HConstant> undefined_constant_; |
| 483 SetOncePointer<HConstant> constant_0_; | 497 SetOncePointer<HConstant> constant_0_; |
| 484 SetOncePointer<HConstant> constant_1_; | 498 SetOncePointer<HConstant> constant_1_; |
| 485 SetOncePointer<HConstant> constant_minus1_; | 499 SetOncePointer<HConstant> constant_minus1_; |
| 486 SetOncePointer<HConstant> constant_true_; | 500 SetOncePointer<HConstant> constant_true_; |
| 487 SetOncePointer<HConstant> constant_false_; | 501 SetOncePointer<HConstant> constant_false_; |
| 488 SetOncePointer<HConstant> constant_the_hole_; | 502 SetOncePointer<HConstant> constant_the_hole_; |
| 489 SetOncePointer<HConstant> constant_null_; | 503 SetOncePointer<HConstant> constant_null_; |
| 490 SetOncePointer<HConstant> constant_invalid_context_; | 504 SetOncePointer<HConstant> constant_invalid_context_; |
| 491 SetOncePointer<HArgumentsObject> arguments_object_; | 505 SetOncePointer<HArgumentsObject> arguments_object_; |
| 506 SetOncePointer<HConstant> constant_free_space_map_; | |
| 492 | 507 |
| 493 HOsrBuilder* osr_; | 508 HOsrBuilder* osr_; |
| 494 | 509 |
| 495 CompilationInfo* info_; | 510 CompilationInfo* info_; |
| 496 Zone* zone_; | 511 Zone* zone_; |
| 497 | 512 |
| 498 bool is_recursive_; | 513 bool is_recursive_; |
| 499 bool use_optimistic_licm_; | 514 bool use_optimistic_licm_; |
| 500 bool has_soft_deoptimize_; | 515 bool has_soft_deoptimize_; |
| 501 bool depends_on_empty_array_proto_elements_; | 516 bool depends_on_empty_array_proto_elements_; |
| (...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2105 EmbeddedVector<char, 64> filename_; | 2120 EmbeddedVector<char, 64> filename_; |
| 2106 HeapStringAllocator string_allocator_; | 2121 HeapStringAllocator string_allocator_; |
| 2107 StringStream trace_; | 2122 StringStream trace_; |
| 2108 int indent_; | 2123 int indent_; |
| 2109 }; | 2124 }; |
| 2110 | 2125 |
| 2111 | 2126 |
| 2112 } } // namespace v8::internal | 2127 } } // namespace v8::internal |
| 2113 | 2128 |
| 2114 #endif // V8_HYDROGEN_H_ | 2129 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |