| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 271     } | 271     } | 
| 272     if (!emit_instructions) continue; | 272     if (!emit_instructions) continue; | 
| 273 | 273 | 
| 274     if (FLAG_code_comments && instr->HasInterestingComment(this)) { | 274     if (FLAG_code_comments && instr->HasInterestingComment(this)) { | 
| 275       Comment(";;; <@%d,#%d> %s", | 275       Comment(";;; <@%d,#%d> %s", | 
| 276               current_instruction_, | 276               current_instruction_, | 
| 277               instr->hydrogen_value()->id(), | 277               instr->hydrogen_value()->id(), | 
| 278               instr->Mnemonic()); | 278               instr->Mnemonic()); | 
| 279     } | 279     } | 
| 280 | 280 | 
|  | 281     RecordAndUpdatePosition(instr->position()); | 
|  | 282 | 
| 281     instr->CompileToNative(this); | 283     instr->CompileToNative(this); | 
| 282   } | 284   } | 
| 283   EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 285   EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 
| 284   return !is_aborted(); | 286   return !is_aborted(); | 
| 285 } | 287 } | 
| 286 | 288 | 
| 287 | 289 | 
| 288 bool LCodeGen::GenerateJumpTable() { | 290 bool LCodeGen::GenerateJumpTable() { | 
| 289   Label needs_frame; | 291   Label needs_frame; | 
| 290   if (jump_table_.length() > 0) { | 292   if (jump_table_.length() > 0) { | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 324   } | 326   } | 
| 325   return !is_aborted(); | 327   return !is_aborted(); | 
| 326 } | 328 } | 
| 327 | 329 | 
| 328 | 330 | 
| 329 bool LCodeGen::GenerateDeferredCode() { | 331 bool LCodeGen::GenerateDeferredCode() { | 
| 330   ASSERT(is_generating()); | 332   ASSERT(is_generating()); | 
| 331   if (deferred_.length() > 0) { | 333   if (deferred_.length() > 0) { | 
| 332     for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 334     for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 
| 333       LDeferredCode* code = deferred_[i]; | 335       LDeferredCode* code = deferred_[i]; | 
|  | 336 | 
|  | 337       int pos = instructions_->at(code->instruction_index())->position(); | 
|  | 338       RecordAndUpdatePosition(pos); | 
|  | 339 | 
| 334       Comment(";;; <@%d,#%d> " | 340       Comment(";;; <@%d,#%d> " | 
| 335               "-------------------- Deferred %s --------------------", | 341               "-------------------- Deferred %s --------------------", | 
| 336               code->instruction_index(), | 342               code->instruction_index(), | 
| 337               code->instr()->hydrogen_value()->id(), | 343               code->instr()->hydrogen_value()->id(), | 
| 338               code->instr()->Mnemonic()); | 344               code->instr()->Mnemonic()); | 
| 339       __ bind(code->entry()); | 345       __ bind(code->entry()); | 
| 340       if (NeedsDeferredFrame()) { | 346       if (NeedsDeferredFrame()) { | 
| 341         Comment(";;; Build frame"); | 347         Comment(";;; Build frame"); | 
| 342         ASSERT(!frame_is_built_); | 348         ASSERT(!frame_is_built_); | 
| 343         ASSERT(info()->IsStub()); | 349         ASSERT(info()->IsStub()); | 
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 852   RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 858   RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, deopt_mode); | 
| 853 } | 859 } | 
| 854 | 860 | 
| 855 | 861 | 
| 856 void LCodeGen::RecordPosition(int position) { | 862 void LCodeGen::RecordPosition(int position) { | 
| 857   if (position == RelocInfo::kNoPosition) return; | 863   if (position == RelocInfo::kNoPosition) return; | 
| 858   masm()->positions_recorder()->RecordPosition(position); | 864   masm()->positions_recorder()->RecordPosition(position); | 
| 859 } | 865 } | 
| 860 | 866 | 
| 861 | 867 | 
|  | 868 void LCodeGen::RecordAndUpdatePosition(int position) { | 
|  | 869   if (position >= 0 && position != old_position_) { | 
|  | 870     masm()->positions_recorder()->RecordPosition(position); | 
|  | 871     old_position_ = position; | 
|  | 872   } | 
|  | 873 } | 
|  | 874 | 
|  | 875 | 
| 862 static const char* LabelType(LLabel* label) { | 876 static const char* LabelType(LLabel* label) { | 
| 863   if (label->is_loop_header()) return " (loop header)"; | 877   if (label->is_loop_header()) return " (loop header)"; | 
| 864   if (label->is_osr_entry()) return " (OSR entry)"; | 878   if (label->is_osr_entry()) return " (OSR entry)"; | 
| 865   return ""; | 879   return ""; | 
| 866 } | 880 } | 
| 867 | 881 | 
| 868 | 882 | 
| 869 void LCodeGen::DoLabel(LLabel* label) { | 883 void LCodeGen::DoLabel(LLabel* label) { | 
| 870   Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 884   Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------", | 
| 871           current_instruction_, | 885           current_instruction_, | 
| (...skipping 4722 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5594                                FixedArray::kHeaderSize - kPointerSize)); | 5608                                FixedArray::kHeaderSize - kPointerSize)); | 
| 5595   __ bind(&done); | 5609   __ bind(&done); | 
| 5596 } | 5610 } | 
| 5597 | 5611 | 
| 5598 | 5612 | 
| 5599 #undef __ | 5613 #undef __ | 
| 5600 | 5614 | 
| 5601 } }  // namespace v8::internal | 5615 } }  // namespace v8::internal | 
| 5602 | 5616 | 
| 5603 #endif  // V8_TARGET_ARCH_X64 | 5617 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|