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

Side by Side Diff: src/lithium.h

Issue 218403006: Check that environments assigned via AssignEnvironment are actually used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified. Rebased. Created 6 years, 8 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/ia32/lithium-ia32.cc ('k') | src/lithium.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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 ast_id_(ast_id), 419 ast_id_(ast_id),
420 translation_size_(value_count), 420 translation_size_(value_count),
421 parameter_count_(parameter_count), 421 parameter_count_(parameter_count),
422 pc_offset_(-1), 422 pc_offset_(-1),
423 values_(value_count, zone), 423 values_(value_count, zone),
424 is_tagged_(value_count, zone), 424 is_tagged_(value_count, zone),
425 is_uint32_(value_count, zone), 425 is_uint32_(value_count, zone),
426 object_mapping_(0, zone), 426 object_mapping_(0, zone),
427 outer_(outer), 427 outer_(outer),
428 entry_(entry), 428 entry_(entry),
429 zone_(zone) { } 429 zone_(zone),
430 has_been_used_(false) { }
430 431
431 Handle<JSFunction> closure() const { return closure_; } 432 Handle<JSFunction> closure() const { return closure_; }
432 FrameType frame_type() const { return frame_type_; } 433 FrameType frame_type() const { return frame_type_; }
433 int arguments_stack_height() const { return arguments_stack_height_; } 434 int arguments_stack_height() const { return arguments_stack_height_; }
434 int deoptimization_index() const { return deoptimization_index_; } 435 int deoptimization_index() const { return deoptimization_index_; }
435 int translation_index() const { return translation_index_; } 436 int translation_index() const { return translation_index_; }
436 BailoutId ast_id() const { return ast_id_; } 437 BailoutId ast_id() const { return ast_id_; }
437 int translation_size() const { return translation_size_; } 438 int translation_size() const { return translation_size_; }
438 int parameter_count() const { return parameter_count_; } 439 int parameter_count() const { return parameter_count_; }
439 int pc_offset() const { return pc_offset_; } 440 int pc_offset() const { return pc_offset_; }
440 const ZoneList<LOperand*>* values() const { return &values_; } 441 const ZoneList<LOperand*>* values() const { return &values_; }
441 LEnvironment* outer() const { return outer_; } 442 LEnvironment* outer() const { return outer_; }
442 HEnterInlined* entry() { return entry_; } 443 HEnterInlined* entry() { return entry_; }
443 Zone* zone() const { return zone_; } 444 Zone* zone() const { return zone_; }
444 445
446 bool has_been_used() const { return has_been_used_; }
447 void set_has_been_used() { has_been_used_ = true; }
448
445 void AddValue(LOperand* operand, 449 void AddValue(LOperand* operand,
446 Representation representation, 450 Representation representation,
447 bool is_uint32) { 451 bool is_uint32) {
448 values_.Add(operand, zone()); 452 values_.Add(operand, zone());
449 if (representation.IsSmiOrTagged()) { 453 if (representation.IsSmiOrTagged()) {
450 ASSERT(!is_uint32); 454 ASSERT(!is_uint32);
451 is_tagged_.Add(values_.length() - 1, zone()); 455 is_tagged_.Add(values_.length() - 1, zone());
452 } 456 }
453 457
454 if (is_uint32) { 458 if (is_uint32) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 ZoneList<LOperand*> values_; 538 ZoneList<LOperand*> values_;
535 GrowableBitVector is_tagged_; 539 GrowableBitVector is_tagged_;
536 GrowableBitVector is_uint32_; 540 GrowableBitVector is_uint32_;
537 541
538 // Map with encoded information about materialization_marker operands. 542 // Map with encoded information about materialization_marker operands.
539 ZoneList<uint32_t> object_mapping_; 543 ZoneList<uint32_t> object_mapping_;
540 544
541 LEnvironment* outer_; 545 LEnvironment* outer_;
542 HEnterInlined* entry_; 546 HEnterInlined* entry_;
543 Zone* zone_; 547 Zone* zone_;
548 bool has_been_used_;
544 }; 549 };
545 550
546 551
547 // Iterates over the non-null, non-constant operands in an environment. 552 // Iterates over the non-null, non-constant operands in an environment.
548 class ShallowIterator V8_FINAL BASE_EMBEDDED { 553 class ShallowIterator V8_FINAL BASE_EMBEDDED {
549 public: 554 public:
550 explicit ShallowIterator(LEnvironment* env) 555 explicit ShallowIterator(LEnvironment* env)
551 : env_(env), 556 : env_(env),
552 limit_(env != NULL ? env->values()->length() : 0), 557 limit_(env != NULL ? env->values()->length() : 0),
553 current_(0) { 558 current_(0) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 private: 736 private:
732 LChunk* chunk_; 737 LChunk* chunk_;
733 738
734 DISALLOW_COPY_AND_ASSIGN(LPhase); 739 DISALLOW_COPY_AND_ASSIGN(LPhase);
735 }; 740 };
736 741
737 742
738 } } // namespace v8::internal 743 } } // namespace v8::internal
739 744
740 #endif // V8_LITHIUM_H_ 745 #endif // V8_LITHIUM_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698