OLD | NEW |
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 for (current_instruction_ = 0; | 222 for (current_instruction_ = 0; |
223 !is_aborted() && current_instruction_ < instructions_->length(); | 223 !is_aborted() && current_instruction_ < instructions_->length(); |
224 current_instruction_++) { | 224 current_instruction_++) { |
225 LInstruction* instr = instructions_->at(current_instruction_); | 225 LInstruction* instr = instructions_->at(current_instruction_); |
226 if (instr->IsLabel()) { | 226 if (instr->IsLabel()) { |
227 LLabel* label = LLabel::cast(instr); | 227 LLabel* label = LLabel::cast(instr); |
228 emit_instructions = !label->HasReplacement(); | 228 emit_instructions = !label->HasReplacement(); |
229 } | 229 } |
230 | 230 |
231 if (emit_instructions) { | 231 if (emit_instructions) { |
232 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); | 232 if (FLAG_code_comments) { |
| 233 HValue* hydrogen = instr->hydrogen_value(); |
| 234 if (hydrogen != NULL) { |
| 235 if (hydrogen->IsChange()) { |
| 236 HValue* changed_value = HChange::cast(hydrogen)->value(); |
| 237 int use_id = 0; |
| 238 const char* use_mnemo = "dead"; |
| 239 if (hydrogen->UseCount() >= 1) { |
| 240 HValue* use_value = hydrogen->uses().value(); |
| 241 use_id = use_value->id(); |
| 242 use_mnemo = use_value->Mnemonic(); |
| 243 } |
| 244 Comment(";;; @%d: %s. <of #%d %s for #%d %s>", |
| 245 current_instruction_, instr->Mnemonic(), |
| 246 changed_value->id(), changed_value->Mnemonic(), |
| 247 use_id, use_mnemo); |
| 248 } else { |
| 249 Comment(";;; @%d: %s. <#%d>", current_instruction_, |
| 250 instr->Mnemonic(), hydrogen->id()); |
| 251 } |
| 252 } else { |
| 253 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); |
| 254 } |
| 255 } |
233 instr->CompileToNative(this); | 256 instr->CompileToNative(this); |
234 } | 257 } |
235 } | 258 } |
236 return !is_aborted(); | 259 return !is_aborted(); |
237 } | 260 } |
238 | 261 |
239 | 262 |
240 bool LCodeGen::GenerateDeferredCode() { | 263 bool LCodeGen::GenerateDeferredCode() { |
241 ASSERT(is_generating()); | 264 ASSERT(is_generating()); |
242 if (deferred_.length() > 0) { | 265 if (deferred_.length() > 0) { |
(...skipping 5235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5478 __ Subu(scratch, result, scratch); | 5501 __ Subu(scratch, result, scratch); |
5479 __ lw(result, FieldMemOperand(scratch, | 5502 __ lw(result, FieldMemOperand(scratch, |
5480 FixedArray::kHeaderSize - kPointerSize)); | 5503 FixedArray::kHeaderSize - kPointerSize)); |
5481 __ bind(&done); | 5504 __ bind(&done); |
5482 } | 5505 } |
5483 | 5506 |
5484 | 5507 |
5485 #undef __ | 5508 #undef __ |
5486 | 5509 |
5487 } } // namespace v8::internal | 5510 } } // namespace v8::internal |
OLD | NEW |