Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: src/hydrogen.h

Issue 82553010: Merged r17599 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // which are not supported by the optimizing compiler. 326 // which are not supported by the optimizing compiler.
327 bool CheckArgumentsPhiUses(); 327 bool CheckArgumentsPhiUses();
328 328
329 // Returns false if there are phi-uses of an uninitialized const 329 // Returns false if there are phi-uses of an uninitialized const
330 // which are not supported by the optimizing compiler. 330 // which are not supported by the optimizing compiler.
331 bool CheckConstPhiUses(); 331 bool CheckConstPhiUses();
332 332
333 void CollectPhis(); 333 void CollectPhis();
334 334
335 void set_undefined_constant(HConstant* constant) { 335 void set_undefined_constant(HConstant* constant) {
336 undefined_constant_.set(constant); 336 constant_undefined_.set(constant);
337 } 337 }
338 HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } 338 HConstant* GetConstantUndefined() const { return constant_undefined_.get(); }
339 HConstant* GetConstant0(); 339 HConstant* GetConstant0();
340 HConstant* GetConstant1(); 340 HConstant* GetConstant1();
341 HConstant* GetConstantMinus1(); 341 HConstant* GetConstantMinus1();
342 HConstant* GetConstantTrue(); 342 HConstant* GetConstantTrue();
343 HConstant* GetConstantFalse(); 343 HConstant* GetConstantFalse();
344 HConstant* GetConstantHole(); 344 HConstant* GetConstantHole();
345 HConstant* GetConstantNull(); 345 HConstant* GetConstantNull();
346 HConstant* GetInvalidContext(); 346 HConstant* GetInvalidContext();
347 347
348 bool IsConstantUndefined(HConstant* constant);
349 bool IsConstant0(HConstant* constant);
350 bool IsConstant1(HConstant* constant);
351 bool IsConstantMinus1(HConstant* constant);
352 bool IsConstantTrue(HConstant* constant);
353 bool IsConstantFalse(HConstant* constant);
354 bool IsConstantHole(HConstant* constant);
355 bool IsConstantNull(HConstant* constant);
348 bool IsStandardConstant(HConstant* constant); 356 bool IsStandardConstant(HConstant* constant);
349 357
350 HBasicBlock* CreateBasicBlock(); 358 HBasicBlock* CreateBasicBlock();
351 HArgumentsObject* GetArgumentsObject() const { 359 HArgumentsObject* GetArgumentsObject() const {
352 return arguments_object_.get(); 360 return arguments_object_.get();
353 } 361 }
354 362
355 void SetArgumentsObject(HArgumentsObject* object) { 363 void SetArgumentsObject(HArgumentsObject* object) {
356 arguments_object_.set(object); 364 arguments_object_.set(object);
357 } 365 }
358 366
359 int GetMaximumValueID() const { return values_.length(); } 367 int GetMaximumValueID() const { return values_.length(); }
360 int GetNextBlockID() { return next_block_id_++; } 368 int GetNextBlockID() { return next_block_id_++; }
361 int GetNextValueID(HValue* value) { 369 int GetNextValueID(HValue* value) {
370 ASSERT(!disallow_adding_new_values_);
362 values_.Add(value, zone()); 371 values_.Add(value, zone());
363 return values_.length() - 1; 372 return values_.length() - 1;
364 } 373 }
365 HValue* LookupValue(int id) const { 374 HValue* LookupValue(int id) const {
366 if (id >= 0 && id < values_.length()) return values_[id]; 375 if (id >= 0 && id < values_.length()) return values_[id];
367 return NULL; 376 return NULL;
368 } 377 }
378 void DisallowAddingNewValues() {
379 disallow_adding_new_values_ = true;
380 }
369 381
370 bool Optimize(BailoutReason* bailout_reason); 382 bool Optimize(BailoutReason* bailout_reason);
371 383
372 #ifdef DEBUG 384 #ifdef DEBUG
373 void Verify(bool do_full_verify) const; 385 void Verify(bool do_full_verify) const;
374 #endif 386 #endif
375 387
376 bool has_osr() { 388 bool has_osr() {
377 return osr_ != NULL; 389 return osr_ != NULL;
378 } 390 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 void EliminateRedundantBoundsChecksUsingInductionVariables(); 482 void EliminateRedundantBoundsChecksUsingInductionVariables();
471 483
472 Isolate* isolate_; 484 Isolate* isolate_;
473 int next_block_id_; 485 int next_block_id_;
474 HBasicBlock* entry_block_; 486 HBasicBlock* entry_block_;
475 HEnvironment* start_environment_; 487 HEnvironment* start_environment_;
476 ZoneList<HBasicBlock*> blocks_; 488 ZoneList<HBasicBlock*> blocks_;
477 ZoneList<HValue*> values_; 489 ZoneList<HValue*> values_;
478 ZoneList<HPhi*>* phi_list_; 490 ZoneList<HPhi*>* phi_list_;
479 ZoneList<HInstruction*>* uint32_instructions_; 491 ZoneList<HInstruction*>* uint32_instructions_;
480 SetOncePointer<HConstant> undefined_constant_; 492 SetOncePointer<HConstant> constant_undefined_;
481 SetOncePointer<HConstant> constant_0_; 493 SetOncePointer<HConstant> constant_0_;
482 SetOncePointer<HConstant> constant_1_; 494 SetOncePointer<HConstant> constant_1_;
483 SetOncePointer<HConstant> constant_minus1_; 495 SetOncePointer<HConstant> constant_minus1_;
484 SetOncePointer<HConstant> constant_true_; 496 SetOncePointer<HConstant> constant_true_;
485 SetOncePointer<HConstant> constant_false_; 497 SetOncePointer<HConstant> constant_false_;
486 SetOncePointer<HConstant> constant_the_hole_; 498 SetOncePointer<HConstant> constant_the_hole_;
487 SetOncePointer<HConstant> constant_null_; 499 SetOncePointer<HConstant> constant_null_;
488 SetOncePointer<HConstant> constant_invalid_context_; 500 SetOncePointer<HConstant> constant_invalid_context_;
489 SetOncePointer<HArgumentsObject> arguments_object_; 501 SetOncePointer<HArgumentsObject> arguments_object_;
490 502
491 HOsrBuilder* osr_; 503 HOsrBuilder* osr_;
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 has_soft_deoptimize_; 510 bool has_soft_deoptimize_;
499 bool depends_on_empty_array_proto_elements_; 511 bool depends_on_empty_array_proto_elements_;
500 int type_change_checksum_; 512 int type_change_checksum_;
501 int maximum_environment_size_; 513 int maximum_environment_size_;
502 int no_side_effects_scope_count_; 514 int no_side_effects_scope_count_;
515 bool disallow_adding_new_values_;
503 516
504 DISALLOW_COPY_AND_ASSIGN(HGraph); 517 DISALLOW_COPY_AND_ASSIGN(HGraph);
505 }; 518 };
506 519
507 520
508 Zone* HBasicBlock::zone() const { return graph_->zone(); } 521 Zone* HBasicBlock::zone() const { return graph_->zone(); }
509 522
510 523
511 // Type of stack frame an environment might refer to. 524 // Type of stack frame an environment might refer to.
512 enum FrameType { 525 enum FrameType {
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 } 2314 }
2302 2315
2303 private: 2316 private:
2304 HGraphBuilder* builder_; 2317 HGraphBuilder* builder_;
2305 }; 2318 };
2306 2319
2307 2320
2308 } } // namespace v8::internal 2321 } } // namespace v8::internal
2309 2322
2310 #endif // V8_HYDROGEN_H_ 2323 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698