| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 345   HConstant* GetConstantUndefined(); | 345   HConstant* GetConstantUndefined(); | 
| 346   HConstant* GetConstant0(); | 346   HConstant* GetConstant0(); | 
| 347   HConstant* GetConstant1(); | 347   HConstant* GetConstant1(); | 
| 348   HConstant* GetConstantMinus1(); | 348   HConstant* GetConstantMinus1(); | 
| 349   HConstant* GetConstantTrue(); | 349   HConstant* GetConstantTrue(); | 
| 350   HConstant* GetConstantFalse(); | 350   HConstant* GetConstantFalse(); | 
| 351   HConstant* GetConstantHole(); | 351   HConstant* GetConstantHole(); | 
| 352   HConstant* GetConstantNull(); | 352   HConstant* GetConstantNull(); | 
| 353   HConstant* GetInvalidContext(); | 353   HConstant* GetInvalidContext(); | 
| 354 | 354 | 
|  | 355   bool IsConstantUndefined(HConstant* constant); | 
|  | 356   bool IsConstant0(HConstant* constant); | 
|  | 357   bool IsConstant1(HConstant* constant); | 
|  | 358   bool IsConstantMinus1(HConstant* constant); | 
|  | 359   bool IsConstantTrue(HConstant* constant); | 
|  | 360   bool IsConstantFalse(HConstant* constant); | 
|  | 361   bool IsConstantHole(HConstant* constant); | 
|  | 362   bool IsConstantNull(HConstant* constant); | 
| 355   bool IsStandardConstant(HConstant* constant); | 363   bool IsStandardConstant(HConstant* constant); | 
| 356 | 364 | 
| 357   HBasicBlock* CreateBasicBlock(); | 365   HBasicBlock* CreateBasicBlock(); | 
| 358   HArgumentsObject* GetArgumentsObject() const { | 366   HArgumentsObject* GetArgumentsObject() const { | 
| 359     return arguments_object_.get(); | 367     return arguments_object_.get(); | 
| 360   } | 368   } | 
| 361 | 369 | 
| 362   void SetArgumentsObject(HArgumentsObject* object) { | 370   void SetArgumentsObject(HArgumentsObject* object) { | 
| 363     arguments_object_.set(object); | 371     arguments_object_.set(object); | 
| 364   } | 372   } | 
| 365 | 373 | 
| 366   int GetMaximumValueID() const { return values_.length(); } | 374   int GetMaximumValueID() const { return values_.length(); } | 
| 367   int GetNextBlockID() { return next_block_id_++; } | 375   int GetNextBlockID() { return next_block_id_++; } | 
| 368   int GetNextValueID(HValue* value) { | 376   int GetNextValueID(HValue* value) { | 
|  | 377     ASSERT(!disallow_adding_new_values_); | 
| 369     values_.Add(value, zone()); | 378     values_.Add(value, zone()); | 
| 370     return values_.length() - 1; | 379     return values_.length() - 1; | 
| 371   } | 380   } | 
| 372   HValue* LookupValue(int id) const { | 381   HValue* LookupValue(int id) const { | 
| 373     if (id >= 0 && id < values_.length()) return values_[id]; | 382     if (id >= 0 && id < values_.length()) return values_[id]; | 
| 374     return NULL; | 383     return NULL; | 
| 375   } | 384   } | 
|  | 385   void DisallowAddingNewValues() { | 
|  | 386     disallow_adding_new_values_ = true; | 
|  | 387   } | 
| 376 | 388 | 
| 377   bool Optimize(BailoutReason* bailout_reason); | 389   bool Optimize(BailoutReason* bailout_reason); | 
| 378 | 390 | 
| 379 #ifdef DEBUG | 391 #ifdef DEBUG | 
| 380   void Verify(bool do_full_verify) const; | 392   void Verify(bool do_full_verify) const; | 
| 381 #endif | 393 #endif | 
| 382 | 394 | 
| 383   bool has_osr() { | 395   bool has_osr() { | 
| 384     return osr_ != NULL; | 396     return osr_ != NULL; | 
| 385   } | 397   } | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 492 | 504 | 
| 493   CompilationInfo* info_; | 505   CompilationInfo* info_; | 
| 494   Zone* zone_; | 506   Zone* zone_; | 
| 495 | 507 | 
| 496   bool is_recursive_; | 508   bool is_recursive_; | 
| 497   bool use_optimistic_licm_; | 509   bool use_optimistic_licm_; | 
| 498   bool depends_on_empty_array_proto_elements_; | 510   bool depends_on_empty_array_proto_elements_; | 
| 499   int type_change_checksum_; | 511   int type_change_checksum_; | 
| 500   int maximum_environment_size_; | 512   int maximum_environment_size_; | 
| 501   int no_side_effects_scope_count_; | 513   int no_side_effects_scope_count_; | 
|  | 514   bool disallow_adding_new_values_; | 
| 502 | 515 | 
| 503   DISALLOW_COPY_AND_ASSIGN(HGraph); | 516   DISALLOW_COPY_AND_ASSIGN(HGraph); | 
| 504 }; | 517 }; | 
| 505 | 518 | 
| 506 | 519 | 
| 507 Zone* HBasicBlock::zone() const { return graph_->zone(); } | 520 Zone* HBasicBlock::zone() const { return graph_->zone(); } | 
| 508 | 521 | 
| 509 | 522 | 
| 510 // Type of stack frame an environment might refer to. | 523 // Type of stack frame an environment might refer to. | 
| 511 enum FrameType { | 524 enum FrameType { | 
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2483   } | 2496   } | 
| 2484 | 2497 | 
| 2485  private: | 2498  private: | 
| 2486   HGraphBuilder* builder_; | 2499   HGraphBuilder* builder_; | 
| 2487 }; | 2500 }; | 
| 2488 | 2501 | 
| 2489 | 2502 | 
| 2490 } }  // namespace v8::internal | 2503 } }  // namespace v8::internal | 
| 2491 | 2504 | 
| 2492 #endif  // V8_HYDROGEN_H_ | 2505 #endif  // V8_HYDROGEN_H_ | 
| OLD | NEW | 
|---|