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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 for (current_instruction_ = 0; | 229 for (current_instruction_ = 0; |
230 !is_aborted() && current_instruction_ < instructions_->length(); | 230 !is_aborted() && current_instruction_ < instructions_->length(); |
231 current_instruction_++) { | 231 current_instruction_++) { |
232 LInstruction* instr = instructions_->at(current_instruction_); | 232 LInstruction* instr = instructions_->at(current_instruction_); |
233 if (instr->IsLabel()) { | 233 if (instr->IsLabel()) { |
234 LLabel* label = LLabel::cast(instr); | 234 LLabel* label = LLabel::cast(instr); |
235 emit_instructions = !label->HasReplacement(); | 235 emit_instructions = !label->HasReplacement(); |
236 } | 236 } |
237 | 237 |
238 if (emit_instructions) { | 238 if (emit_instructions) { |
239 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); | 239 if (FLAG_code_comments) { |
| 240 HValue* hydrogen = instr->hydrogen_value(); |
| 241 if (hydrogen != NULL) { |
| 242 if (hydrogen->IsChange()) { |
| 243 HValue* changed_value = HChange::cast(hydrogen)->value(); |
| 244 int use_id = 0; |
| 245 const char* use_mnemo = "dead"; |
| 246 if (hydrogen->UseCount() >= 1) { |
| 247 HValue* use_value = hydrogen->uses().value(); |
| 248 use_id = use_value->id(); |
| 249 use_mnemo = use_value->Mnemonic(); |
| 250 } |
| 251 Comment(";;; @%d: %s. <of #%d %s for #%d %s>", |
| 252 current_instruction_, instr->Mnemonic(), |
| 253 changed_value->id(), changed_value->Mnemonic(), |
| 254 use_id, use_mnemo); |
| 255 } else { |
| 256 Comment(";;; @%d: %s. <#%d>", current_instruction_, |
| 257 instr->Mnemonic(), hydrogen->id()); |
| 258 } |
| 259 } else { |
| 260 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); |
| 261 } |
| 262 } |
240 instr->CompileToNative(this); | 263 instr->CompileToNative(this); |
241 } | 264 } |
242 } | 265 } |
243 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 266 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
244 return !is_aborted(); | 267 return !is_aborted(); |
245 } | 268 } |
246 | 269 |
247 | 270 |
248 bool LCodeGen::GenerateJumpTable() { | 271 bool LCodeGen::GenerateJumpTable() { |
249 for (int i = 0; i < jump_table_.length(); i++) { | 272 for (int i = 0; i < jump_table_.length(); i++) { |
(...skipping 5098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5348 FixedArray::kHeaderSize - kPointerSize)); | 5371 FixedArray::kHeaderSize - kPointerSize)); |
5349 __ bind(&done); | 5372 __ bind(&done); |
5350 } | 5373 } |
5351 | 5374 |
5352 | 5375 |
5353 #undef __ | 5376 #undef __ |
5354 | 5377 |
5355 } } // namespace v8::internal | 5378 } } // namespace v8::internal |
5356 | 5379 |
5357 #endif // V8_TARGET_ARCH_X64 | 5380 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |