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

Side by Side Diff: src/hydrogen.h

Issue 10778029: Allow uint32 value on optimized frames if they are consumed by safe operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: arm and x64 ports Created 8 years, 4 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
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } 251 const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
252 const ZoneList<HPhi*>* phi_list() const { return phi_list_; } 252 const ZoneList<HPhi*>* phi_list() const { return phi_list_; }
253 HBasicBlock* entry_block() const { return entry_block_; } 253 HBasicBlock* entry_block() const { return entry_block_; }
254 HEnvironment* start_environment() const { return start_environment_; } 254 HEnvironment* start_environment() const { return start_environment_; }
255 255
256 void InitializeInferredTypes(); 256 void InitializeInferredTypes();
257 void InsertTypeConversions(); 257 void InsertTypeConversions();
258 void InsertRepresentationChanges(); 258 void InsertRepresentationChanges();
259 void MarkDeoptimizeOnUndefined(); 259 void MarkDeoptimizeOnUndefined();
260 void ComputeMinusZeroChecks(); 260 void ComputeMinusZeroChecks();
261 void ComputeSafeUint32Operations();
261 bool ProcessArgumentsObject(); 262 bool ProcessArgumentsObject();
262 void EliminateRedundantPhis(); 263 void EliminateRedundantPhis();
263 void EliminateUnreachablePhis(); 264 void EliminateUnreachablePhis();
264 void Canonicalize(); 265 void Canonicalize();
265 void OrderBlocks(); 266 void OrderBlocks();
266 void AssignDominators(); 267 void AssignDominators();
267 void ReplaceCheckedValues(); 268 void ReplaceCheckedValues();
268 void EliminateRedundantBoundsChecks(); 269 void EliminateRedundantBoundsChecks();
269 void DehoistSimpleArrayIndexComputations(); 270 void DehoistSimpleArrayIndexComputations();
270 void PropagateDeoptimizingMark(); 271 void PropagateDeoptimizingMark();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 337 }
337 338
338 void MarkRecursive() { 339 void MarkRecursive() {
339 is_recursive_ = true; 340 is_recursive_ = true;
340 } 341 }
341 342
342 bool is_recursive() const { 343 bool is_recursive() const {
343 return is_recursive_; 344 return is_recursive_;
344 } 345 }
345 346
347 void RecordUint32Instruction(HInstruction* instr) {
348 if (uint32_instructions_ == NULL) {
349 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone());
350 }
351 uint32_instructions_->Add(instr, zone());
352 }
353
346 private: 354 private:
347 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 355 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
348 Handle<Object> value); 356 Handle<Object> value);
349 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer, 357 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer,
350 int32_t integer_value); 358 int32_t integer_value);
351 359
352 void MarkAsDeoptimizingRecursively(HBasicBlock* block); 360 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
353 void InsertTypeConversions(HInstruction* instr); 361 void InsertTypeConversions(HInstruction* instr);
354 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); 362 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
355 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 363 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
356 void InsertRepresentationChangeForUse(HValue* value, 364 void InsertRepresentationChangeForUse(HValue* value,
357 HValue* use_value, 365 HValue* use_value,
358 int use_index, 366 int use_index,
359 Representation to); 367 Representation to);
360 void InsertRepresentationChangesForValue(HValue* value); 368 void InsertRepresentationChangesForValue(HValue* value);
361 void InferTypes(ZoneList<HValue*>* worklist); 369 void InferTypes(ZoneList<HValue*>* worklist);
362 void InitializeInferredTypes(int from_inclusive, int to_inclusive); 370 void InitializeInferredTypes(int from_inclusive, int to_inclusive);
363 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor); 371 void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
364 void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table); 372 void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table);
365 373
366 Isolate* isolate_; 374 Isolate* isolate_;
367 int next_block_id_; 375 int next_block_id_;
368 HBasicBlock* entry_block_; 376 HBasicBlock* entry_block_;
369 HEnvironment* start_environment_; 377 HEnvironment* start_environment_;
370 ZoneList<HBasicBlock*> blocks_; 378 ZoneList<HBasicBlock*> blocks_;
371 ZoneList<HValue*> values_; 379 ZoneList<HValue*> values_;
372 ZoneList<HPhi*>* phi_list_; 380 ZoneList<HPhi*>* phi_list_;
381 ZoneList<HInstruction*>* uint32_instructions_;
373 SetOncePointer<HConstant> undefined_constant_; 382 SetOncePointer<HConstant> undefined_constant_;
374 SetOncePointer<HConstant> constant_1_; 383 SetOncePointer<HConstant> constant_1_;
375 SetOncePointer<HConstant> constant_minus1_; 384 SetOncePointer<HConstant> constant_minus1_;
376 SetOncePointer<HConstant> constant_true_; 385 SetOncePointer<HConstant> constant_true_;
377 SetOncePointer<HConstant> constant_false_; 386 SetOncePointer<HConstant> constant_false_;
378 SetOncePointer<HConstant> constant_hole_; 387 SetOncePointer<HConstant> constant_hole_;
379 SetOncePointer<HArgumentsObject> arguments_object_; 388 SetOncePointer<HArgumentsObject> arguments_object_;
380 389
381 SetOncePointer<HBasicBlock> osr_loop_entry_; 390 SetOncePointer<HBasicBlock> osr_loop_entry_;
382 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; 391 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_;
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 const char* filename_; 1475 const char* filename_;
1467 HeapStringAllocator string_allocator_; 1476 HeapStringAllocator string_allocator_;
1468 StringStream trace_; 1477 StringStream trace_;
1469 int indent_; 1478 int indent_;
1470 }; 1479 };
1471 1480
1472 1481
1473 } } // namespace v8::internal 1482 } } // namespace v8::internal
1474 1483
1475 #endif // V8_HYDROGEN_H_ 1484 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698