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

Side by Side Diff: src/hydrogen.h

Issue 11377135: Don't emit code for instructions that are hiding behind an HSoftDeoptimize (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 7 years, 11 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/arm/lithium-codegen-arm.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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 349
350 bool use_optimistic_licm() { 350 bool use_optimistic_licm() {
351 return use_optimistic_licm_; 351 return use_optimistic_licm_;
352 } 352 }
353 353
354 void set_use_optimistic_licm(bool value) { 354 void set_use_optimistic_licm(bool value) {
355 use_optimistic_licm_ = value; 355 use_optimistic_licm_ = value;
356 } 356 }
357 357
358 bool has_soft_deoptimize() {
359 return has_soft_deoptimize_;
360 }
361
362 void set_has_soft_deoptimize(bool value) {
363 has_soft_deoptimize_ = value;
364 }
365
358 void MarkRecursive() { 366 void MarkRecursive() {
359 is_recursive_ = true; 367 is_recursive_ = true;
360 } 368 }
361 369
362 bool is_recursive() const { 370 bool is_recursive() const {
363 return is_recursive_; 371 return is_recursive_;
364 } 372 }
365 373
366 void RecordUint32Instruction(HInstruction* instr) { 374 void RecordUint32Instruction(HInstruction* instr) {
367 if (uint32_instructions_ == NULL) { 375 if (uint32_instructions_ == NULL) {
368 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone()); 376 uint32_instructions_ = new(zone()) ZoneList<HInstruction*>(4, zone());
369 } 377 }
370 uint32_instructions_->Add(instr, zone()); 378 uint32_instructions_->Add(instr, zone());
371 } 379 }
372 380
373 private: 381 private:
374 HConstant* GetConstant(SetOncePointer<HConstant>* pointer, 382 HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
375 Handle<Object> value); 383 Handle<Object> value);
376 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer, 384 HConstant* GetConstantInt32(SetOncePointer<HConstant>* pointer,
377 int32_t integer_value); 385 int32_t integer_value);
378 386
379 void MarkAsDeoptimizingRecursively(HBasicBlock* block); 387 void MarkAsDeoptimizingRecursively(HBasicBlock* block);
388 void NullifyUnreachableInstructions();
380 void InsertTypeConversions(HInstruction* instr); 389 void InsertTypeConversions(HInstruction* instr);
381 void PropagateMinusZeroChecks(HValue* value, BitVector* visited); 390 void PropagateMinusZeroChecks(HValue* value, BitVector* visited);
382 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi); 391 void RecursivelyMarkPhiDeoptimizeOnUndefined(HPhi* phi);
383 void InsertRepresentationChangeForUse(HValue* value, 392 void InsertRepresentationChangeForUse(HValue* value,
384 HValue* use_value, 393 HValue* use_value,
385 int use_index, 394 int use_index,
386 Representation to); 395 Representation to);
387 void InsertRepresentationChangesForValue(HValue* value); 396 void InsertRepresentationChangesForValue(HValue* value);
388 void InferTypes(ZoneList<HValue*>* worklist); 397 void InferTypes(ZoneList<HValue*>* worklist);
389 void InitializeInferredTypes(int from_inclusive, int to_inclusive); 398 void InitializeInferredTypes(int from_inclusive, int to_inclusive);
(...skipping 17 matching lines...) Expand all
407 SetOncePointer<HArgumentsObject> arguments_object_; 416 SetOncePointer<HArgumentsObject> arguments_object_;
408 417
409 SetOncePointer<HBasicBlock> osr_loop_entry_; 418 SetOncePointer<HBasicBlock> osr_loop_entry_;
410 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_; 419 SetOncePointer<ZoneList<HUnknownOSRValue*> > osr_values_;
411 420
412 CompilationInfo* info_; 421 CompilationInfo* info_;
413 Zone* zone_; 422 Zone* zone_;
414 423
415 bool is_recursive_; 424 bool is_recursive_;
416 bool use_optimistic_licm_; 425 bool use_optimistic_licm_;
426 bool has_soft_deoptimize_;
417 int type_change_checksum_; 427 int type_change_checksum_;
418 428
419 DISALLOW_COPY_AND_ASSIGN(HGraph); 429 DISALLOW_COPY_AND_ASSIGN(HGraph);
420 }; 430 };
421 431
422 432
423 Zone* HBasicBlock::zone() const { return graph_->zone(); } 433 Zone* HBasicBlock::zone() const { return graph_->zone(); }
424 434
425 435
426 // Type of stack frame an environment might refer to. 436 // Type of stack frame an environment might refer to.
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 HOptimizedGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle); 959 HOptimizedGraphBuilder(CompilationInfo* info, TypeFeedbackOracle* oracle);
950 960
951 virtual bool BuildGraph(); 961 virtual bool BuildGraph();
952 962
953 // Simple accessors. 963 // Simple accessors.
954 BreakAndContinueScope* break_scope() const { return break_scope_; } 964 BreakAndContinueScope* break_scope() const { return break_scope_; }
955 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } 965 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
956 966
957 bool inline_bailout() { return inline_bailout_; } 967 bool inline_bailout() { return inline_bailout_; }
958 968
969 void AddSoftDeoptimize();
970
959 // Bailout environment manipulation. 971 // Bailout environment manipulation.
960 void Push(HValue* value) { environment()->Push(value); } 972 void Push(HValue* value) { environment()->Push(value); }
961 HValue* Pop() { return environment()->Pop(); } 973 HValue* Pop() { return environment()->Pop(); }
962 974
963 void Bailout(const char* reason); 975 void Bailout(const char* reason);
964 976
965 HBasicBlock* CreateJoin(HBasicBlock* first, 977 HBasicBlock* CreateJoin(HBasicBlock* first,
966 HBasicBlock* second, 978 HBasicBlock* second,
967 BailoutId join_id); 979 BailoutId join_id);
968 980
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 const char* filename_; 1567 const char* filename_;
1556 HeapStringAllocator string_allocator_; 1568 HeapStringAllocator string_allocator_;
1557 StringStream trace_; 1569 StringStream trace_;
1558 int indent_; 1570 int indent_;
1559 }; 1571 };
1560 1572
1561 1573
1562 } } // namespace v8::internal 1574 } } // namespace v8::internal
1563 1575
1564 #endif // V8_HYDROGEN_H_ 1576 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698