OLD | NEW |
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 to->PrintTo(stream); | 201 to->PrintTo(stream); |
202 stream->Add(" = "); | 202 stream->Add(" = "); |
203 from->PrintTo(stream); | 203 from->PrintTo(stream); |
204 } | 204 } |
205 stream->Add("; "); | 205 stream->Add("; "); |
206 } | 206 } |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 | 210 |
| 211 void LEnvironment::PrintTo(StringStream* stream) { |
| 212 stream->Add("[id=%d|", ast_id()); |
| 213 stream->Add("[parameters=%d|", parameter_count()); |
| 214 stream->Add("[arguments_stack_height=%d|", arguments_stack_height()); |
| 215 for (int i = 0; i < values_.length(); ++i) { |
| 216 if (i != 0) stream->Add(";"); |
| 217 if (values_[i] == NULL) { |
| 218 stream->Add("[hole]"); |
| 219 } else { |
| 220 values_[i]->PrintTo(stream); |
| 221 } |
| 222 } |
| 223 stream->Add("]"); |
| 224 } |
| 225 |
| 226 |
| 227 void LPointerMap::RecordPointer(LOperand* op) { |
| 228 // Do not record arguments as pointers. |
| 229 if (op->IsStackSlot() && op->index() < 0) return; |
| 230 ASSERT(!op->IsDoubleRegister() && !op->IsDoubleStackSlot()); |
| 231 pointer_operands_.Add(op); |
| 232 } |
| 233 |
| 234 |
| 235 void LPointerMap::PrintTo(StringStream* stream) { |
| 236 stream->Add("{"); |
| 237 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 238 if (i != 0) stream->Add(";"); |
| 239 pointer_operands_[i]->PrintTo(stream); |
| 240 } |
| 241 stream->Add("} @%d", position()); |
| 242 } |
| 243 |
| 244 |
211 } } // namespace v8::internal | 245 } } // namespace v8::internal |
OLD | NEW |