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

Side by Side Diff: src/lithium.h

Issue 6526047: Shorten live ranges for arguments to runtime calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 return env_->values()->at(current_); 529 return env_->values()->at(current_);
530 } 530 }
531 531
532 inline void Advance() { 532 inline void Advance() {
533 current_ = AdvanceToNext(current_ + 1); 533 current_ = AdvanceToNext(current_ + 1);
534 } 534 }
535 535
536 inline LEnvironment* env() { return env_; } 536 inline LEnvironment* env() { return env_; }
537 537
538 private: 538 private:
539 inline bool ShouldSkip(LOperand* op) {
540 return op == NULL || op->IsConstantOperand() || op->IsArgument();
fschneider 2011/02/21 17:02:01 Just wondering: Was this already a problem before
541 }
542
539 inline int AdvanceToNext(int start) { 543 inline int AdvanceToNext(int start) {
540 while (start < limit_ && 544 while (start < limit_ && ShouldSkip(env_->values()->at(start))) {
541 (env_->values()->at(start) == NULL ||
542 env_->values()->at(start)->IsConstantOperand())) {
543 start++; 545 start++;
544 } 546 }
545 return start; 547 return start;
546 } 548 }
547 549
548 LEnvironment* env_; 550 LEnvironment* env_;
549 int limit_; 551 int limit_;
550 int current_; 552 int current_;
551 }; 553 };
552 554
(...skipping 28 matching lines...) Expand all
581 inline void AdvanceToOuter() { 583 inline void AdvanceToOuter() {
582 current_iterator_ = ShallowIterator(current_iterator_.env()->outer()); 584 current_iterator_ = ShallowIterator(current_iterator_.env()->outer());
583 } 585 }
584 586
585 ShallowIterator current_iterator_; 587 ShallowIterator current_iterator_;
586 }; 588 };
587 589
588 } } // namespace v8::internal 590 } } // namespace v8::internal
589 591
590 #endif // V8_LITHIUM_H_ 592 #endif // V8_LITHIUM_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698