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

Side by Side Diff: src/hydrogen.h

Issue 15861009: Tag smi-constants as smi. This also fixes code that copies holes into arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 7 months 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 | « src/code-stubs-hydrogen.cc ('k') | 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 bool CheckConstPhiUses(); 296 bool CheckConstPhiUses();
297 297
298 void CollectPhis(); 298 void CollectPhis();
299 299
300 void set_undefined_constant(HConstant* constant) { 300 void set_undefined_constant(HConstant* constant) {
301 undefined_constant_.set(constant); 301 undefined_constant_.set(constant);
302 } 302 }
303 HConstant* GetConstantUndefined() const { return undefined_constant_.get(); } 303 HConstant* GetConstantUndefined() const { return undefined_constant_.get(); }
304 HConstant* GetConstant0(); 304 HConstant* GetConstant0();
305 HConstant* GetConstant1(); 305 HConstant* GetConstant1();
306 HConstant* GetConstantSmi0();
307 HConstant* GetConstantSmi1();
308 HConstant* GetConstantMinus1(); 306 HConstant* GetConstantMinus1();
309 HConstant* GetConstantTrue(); 307 HConstant* GetConstantTrue();
310 HConstant* GetConstantFalse(); 308 HConstant* GetConstantFalse();
311 HConstant* GetConstantHole(); 309 HConstant* GetConstantHole();
312 HConstant* GetConstantNull(); 310 HConstant* GetConstantNull();
313 HConstant* GetInvalidContext(); 311 HConstant* GetInvalidContext();
314 312
315 HBasicBlock* CreateBasicBlock(); 313 HBasicBlock* CreateBasicBlock();
316 HArgumentsObject* GetArgumentsObject() const { 314 HArgumentsObject* GetArgumentsObject() const {
317 return arguments_object_.get(); 315 return arguments_object_.get();
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 void RecordUint32Instruction(HInstruction* instr) { 396 void RecordUint32Instruction(HInstruction* instr) {
399 if (uint32_instructions_ == NULL) { 397 if (uint32_instructions_ == NULL) {
400 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); 398 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone());
401 } 399 }
402 uint32_instructions_->Add(instr, zone()); 400 uint32_instructions_->Add(instr, zone());
403 } 401 }
404 402
405 private: 403 private:
406 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer, 404 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer,
407 int32_t integer_value); 405 int32_t integer_value);
408 HConstant* GetConstantSmi(SetOncePointer<HConstant>* pointer,
409 int32_t integer_value);
410 406
411 void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist); 407 void MarkLive(HValue* ref, HValue* instr, ZoneList<HValue*>* worklist);
412 void MarkLiveInstructions(); 408 void MarkLiveInstructions();
413 void RemoveDeadInstructions(); 409 void RemoveDeadInstructions();
414 void MarkAsDeoptimizingRecursively(HBasicBlock* block); 410 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
415 void NullifyUnreachableInstructions(); 411 void NullifyUnreachableInstructions();
416 void InsertTypeConversions(HInstruction* instr); 412 void InsertTypeConversions(HInstruction* instr);
417 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); 413 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
418 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 414 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
419 void InsertRepresentationChangeForUse(HValue* value, 415 void InsertRepresentationChangeForUse(HValue* value,
(...skipping 12 matching lines...) Expand all
432 int next_block_id_; 428 int next_block_id_;
433 HBasicBlock* entry_block_; 429 HBasicBlock* entry_block_;
434 HEnvironment* start_environment_; 430 HEnvironment* start_environment_;
435 ZoneList<HBasicBlock*> blocks_; 431 ZoneList<HBasicBlock*> blocks_;
436 ZoneList<HValue*> values_; 432 ZoneList<HValue*> values_;
437 ZoneList<HPhi*>* phi_list_; 433 ZoneList<HPhi*>* phi_list_;
438 ZoneList<HInstruction*>* uint32_instructions_; 434 ZoneList<HInstruction*>* uint32_instructions_;
439 SetOncePointer<HConstant> undefined_constant_; 435 SetOncePointer<HConstant> undefined_constant_;
440 SetOncePointer<HConstant> constant_0_; 436 SetOncePointer<HConstant> constant_0_;
441 SetOncePointer<HConstant> constant_1_; 437 SetOncePointer<HConstant> constant_1_;
442 SetOncePointer<HConstant> constant_smi_0_;
443 SetOncePointer<HConstant> constant_smi_1_;
444 SetOncePointer<HConstant> constant_minus1_; 438 SetOncePointer<HConstant> constant_minus1_;
445 SetOncePointer<HConstant> constant_true_; 439 SetOncePointer<HConstant> constant_true_;
446 SetOncePointer<HConstant> constant_false_; 440 SetOncePointer<HConstant> constant_false_;
447 SetOncePointer<HConstant> constant_the_hole_; 441 SetOncePointer<HConstant> constant_the_hole_;
448 SetOncePointer<HConstant> constant_null_; 442 SetOncePointer<HConstant> constant_null_;
449 SetOncePointer<HConstant> constant_invalid_context_; 443 SetOncePointer<HConstant> constant_invalid_context_;
450 SetOncePointer<HArgumentsObject> arguments_object_; 444 SetOncePointer<HArgumentsObject> arguments_object_;
451 445
452 SetOncePointer<HBasicBlock> osr_loop_entry_; 446 SetOncePointer<HBasicBlock> osr_loop_entry_;
453 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; 447 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_;
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 EmbeddedVector<char, 64> filename_; 2027 EmbeddedVector<char, 64> filename_;
2034 HeapStringAllocator string_allocator_; 2028 HeapStringAllocator string_allocator_;
2035 StringStream trace_; 2029 StringStream trace_;
2036 int indent_; 2030 int indent_;
2037 }; 2031 };
2038 2032
2039 2033
2040 } } // namespace v8::internal 2034 } } // namespace v8::internal
2041 2035
2042 #endif // V8_HYDROGEN_H_ 2036 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698