| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  422  |  422  | 
|  423   chunk->set_allocated_double_registers( |  423   chunk->set_allocated_double_registers( | 
|  424       allocator.assigned_double_registers()); |  424       allocator.assigned_double_registers()); | 
|  425  |  425  | 
|  426   return chunk; |  426   return chunk; | 
|  427 } |  427 } | 
|  428  |  428  | 
|  429  |  429  | 
|  430 Handle<Code> LChunk::Codegen(Code::Kind kind) { |  430 Handle<Code> LChunk::Codegen(Code::Kind kind) { | 
|  431   MacroAssembler assembler(info()->isolate(), NULL, 0); |  431   MacroAssembler assembler(info()->isolate(), NULL, 0); | 
 |  432   LOG_CODE_EVENT(info()->isolate(), | 
 |  433                  CodeStartLinePosInfoRecordEvent( | 
 |  434                      assembler.positions_recorder())); | 
|  432   LCodeGen generator(this, &assembler, info()); |  435   LCodeGen generator(this, &assembler, info()); | 
|  433  |  436  | 
|  434   MarkEmptyBlocks(); |  437   MarkEmptyBlocks(); | 
|  435  |  438  | 
|  436   if (generator.GenerateCode()) { |  439   if (generator.GenerateCode()) { | 
|  437     if (FLAG_trace_codegen) { |  440     if (FLAG_trace_codegen) { | 
|  438       PrintF("Crankshaft Compiler - "); |  441       PrintF("Crankshaft Compiler - "); | 
|  439     } |  442     } | 
|  440     CodeGenerator::MakeCodePrologue(info()); |  443     CodeGenerator::MakeCodePrologue(info()); | 
|  441     Code::Flags flags = Code::ComputeFlags(kind); |  444     Code::Flags flags = Code::ComputeFlags(kind); | 
|  442     Handle<Code> code = |  445     Handle<Code> code = | 
|  443         CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |  446         CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 
|  444     generator.FinishCode(code); |  447     generator.FinishCode(code); | 
 |  448  | 
 |  449     if (!code.is_null()) { | 
 |  450       void* jit_handler_data = | 
 |  451           assembler.positions_recorder()->DetachJITHandlerData(); | 
 |  452       LOG_CODE_EVENT(info()->isolate(), | 
 |  453                      CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); | 
 |  454     } | 
 |  455  | 
|  445     if (FLAG_weak_embedded_maps_in_optimized_code) { |  456     if (FLAG_weak_embedded_maps_in_optimized_code) { | 
|  446       RegisterDependentCodeForEmbeddedMaps(code); |  457       RegisterDependentCodeForEmbeddedMaps(code); | 
|  447     } |  458     } | 
 |  459  | 
|  448     CodeGenerator::PrintCode(code, info()); |  460     CodeGenerator::PrintCode(code, info()); | 
|  449     return code; |  461     return code; | 
|  450   } |  462   } | 
|  451   return Handle<Code>::null(); |  463   return Handle<Code>::null(); | 
|  452 } |  464 } | 
|  453  |  465  | 
|  454  |  466  | 
|  455 void LChunk::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { |  467 void LChunk::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) { | 
|  456   ZoneList<Handle<Map> > maps(1, zone()); |  468   ZoneList<Handle<Map> > maps(1, zone()); | 
|  457   int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |  469   int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
|  488       } else { |  500       } else { | 
|  489         spill_slot_count_++; |  501         spill_slot_count_++; | 
|  490       } |  502       } | 
|  491     } |  503     } | 
|  492     iterator.Advance(); |  504     iterator.Advance(); | 
|  493   } |  505   } | 
|  494 } |  506 } | 
|  495  |  507  | 
|  496  |  508  | 
|  497 } }  // namespace v8::internal |  509 } }  // namespace v8::internal | 
| OLD | NEW |