| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 for (current_instruction_ = 0; | 225 for (current_instruction_ = 0; |
| 226 !is_aborted() && current_instruction_ < instructions_->length(); | 226 !is_aborted() && current_instruction_ < instructions_->length(); |
| 227 current_instruction_++) { | 227 current_instruction_++) { |
| 228 LInstruction* instr = instructions_->at(current_instruction_); | 228 LInstruction* instr = instructions_->at(current_instruction_); |
| 229 if (instr->IsLabel()) { | 229 if (instr->IsLabel()) { |
| 230 LLabel* label = LLabel::cast(instr); | 230 LLabel* label = LLabel::cast(instr); |
| 231 emit_instructions = !label->HasReplacement(); | 231 emit_instructions = !label->HasReplacement(); |
| 232 } | 232 } |
| 233 | 233 |
| 234 if (emit_instructions) { | 234 if (emit_instructions) { |
| 235 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); | 235 if (FLAG_code_comments) { |
| 236 HValue* hydrogen = instr->hydrogen_value(); |
| 237 if (hydrogen != NULL) { |
| 238 if (hydrogen->IsChange()) { |
| 239 HValue* changed_value = HChange::cast(hydrogen)->value(); |
| 240 int use_id = 0; |
| 241 const char* use_mnemo = "dead"; |
| 242 if (hydrogen->UseCount() >= 1) { |
| 243 HValue* use_value = hydrogen->uses().value(); |
| 244 use_id = use_value->id(); |
| 245 use_mnemo = use_value->Mnemonic(); |
| 246 } |
| 247 Comment(";;; @%d: %s. <of #%d %s for #%d %s>", |
| 248 current_instruction_, instr->Mnemonic(), |
| 249 changed_value->id(), changed_value->Mnemonic(), |
| 250 use_id, use_mnemo); |
| 251 } else { |
| 252 Comment(";;; @%d: %s. <#%d>", current_instruction_, |
| 253 instr->Mnemonic(), hydrogen->id()); |
| 254 } |
| 255 } else { |
| 256 Comment(";;; @%d: %s.", current_instruction_, instr->Mnemonic()); |
| 257 } |
| 258 } |
| 236 instr->CompileToNative(this); | 259 instr->CompileToNative(this); |
| 237 } | 260 } |
| 238 } | 261 } |
| 239 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 262 EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |
| 240 return !is_aborted(); | 263 return !is_aborted(); |
| 241 } | 264 } |
| 242 | 265 |
| 243 | 266 |
| 244 bool LCodeGen::GenerateJumpTable() { | 267 bool LCodeGen::GenerateJumpTable() { |
| 245 for (int i = 0; i < jump_table_.length(); i++) { | 268 for (int i = 0; i < jump_table_.length(); i++) { |
| (...skipping 5090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5336 FixedArray::kHeaderSize - kPointerSize)); | 5359 FixedArray::kHeaderSize - kPointerSize)); |
| 5337 __ bind(&done); | 5360 __ bind(&done); |
| 5338 } | 5361 } |
| 5339 | 5362 |
| 5340 | 5363 |
| 5341 #undef __ | 5364 #undef __ |
| 5342 | 5365 |
| 5343 } } // namespace v8::internal | 5366 } } // namespace v8::internal |
| 5344 | 5367 |
| 5345 #endif // V8_TARGET_ARCH_X64 | 5368 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |