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

Side by Side Diff: src/lithium-allocator-inl.h

Issue 11550005: Elide unnecessary context reload in generated stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with ToT Created 8 years 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 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 105
106 void InputIterator::Advance() { 106 void InputIterator::Advance() {
107 ++current_; 107 ++current_;
108 SkipUninteresting(); 108 SkipUninteresting();
109 } 109 }
110 110
111 111
112 void InputIterator::SkipUninteresting() { 112 void InputIterator::SkipUninteresting() {
113 while (current_ < limit_ && instr_->InputAt(current_)->IsConstantOperand()) { 113 LOperand* current;
114 while (current_ < limit_ &&
115 (current = instr_->InputAt(current_)) != NULL &&
ulan 2012/12/28 15:40:49 Looks like we can make NULL operands uninteresting
danno 2012/12/28 17:38:41 Done.
116 current->IsConstantOperand()) {
114 ++current_; 117 ++current_;
115 } 118 }
116 } 119 }
117 120
118 121
119 UseIterator::UseIterator(LInstruction* instr) 122 UseIterator::UseIterator(LInstruction* instr)
120 : input_iterator_(instr), env_iterator_(instr->environment()) { } 123 : input_iterator_(instr), env_iterator_(instr->environment()) { }
121 124
122 125
123 bool UseIterator::Done() { 126 bool UseIterator::Done() {
(...skipping 11 matching lines...) Expand all
135 138
136 void UseIterator::Advance() { 139 void UseIterator::Advance() {
137 input_iterator_.Done() 140 input_iterator_.Done()
138 ? env_iterator_.Advance() 141 ? env_iterator_.Advance()
139 : input_iterator_.Advance(); 142 : input_iterator_.Advance();
140 } 143 }
141 144
142 } } // namespace v8::internal 145 } } // namespace v8::internal
143 146
144 #endif // V8_LITHIUM_ALLOCATOR_INL_H_ 147 #endif // V8_LITHIUM_ALLOCATOR_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698