| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   328  |   328  | 
|   329  |   329  | 
|   330 bool LCodeGen::GenerateDeferredCode() { |   330 bool LCodeGen::GenerateDeferredCode() { | 
|   331   ASSERT(is_generating()); |   331   ASSERT(is_generating()); | 
|   332   if (deferred_.length() > 0) { |   332   if (deferred_.length() > 0) { | 
|   333     for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |   333     for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 
|   334       LDeferredCode* code = deferred_[i]; |   334       LDeferredCode* code = deferred_[i]; | 
|   335  |   335  | 
|   336       HValue* value = |   336       HValue* value = | 
|   337           instructions_->at(code->instruction_index())->hydrogen_value(); |   337           instructions_->at(code->instruction_index())->hydrogen_value(); | 
|   338       RecordAndWritePosition(value->position()); |   338       RecordAndWritePosition( | 
 |   339           chunk()->graph()->SourcePositionToScriptPosition(value->position())); | 
|   339  |   340  | 
|   340       Comment(";;; <@%d,#%d> " |   341       Comment(";;; <@%d,#%d> " | 
|   341               "-------------------- Deferred %s --------------------", |   342               "-------------------- Deferred %s --------------------", | 
|   342               code->instruction_index(), |   343               code->instruction_index(), | 
|   343               code->instr()->hydrogen_value()->id(), |   344               code->instr()->hydrogen_value()->id(), | 
|   344               code->instr()->Mnemonic()); |   345               code->instr()->Mnemonic()); | 
|   345       __ bind(code->entry()); |   346       __ bind(code->entry()); | 
|   346       if (NeedsDeferredFrame()) { |   347       if (NeedsDeferredFrame()) { | 
|   347         Comment(";;; Build frame"); |   348         Comment(";;; Build frame"); | 
|   348         ASSERT(!frame_is_built_); |   349         ASSERT(!frame_is_built_); | 
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   791 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |   792 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 
|   792   int length = deoptimizations_.length(); |   793   int length = deoptimizations_.length(); | 
|   793   if (length == 0) return; |   794   if (length == 0) return; | 
|   794   Handle<DeoptimizationInputData> data = |   795   Handle<DeoptimizationInputData> data = | 
|   795       factory()->NewDeoptimizationInputData(length, TENURED); |   796       factory()->NewDeoptimizationInputData(length, TENURED); | 
|   796  |   797  | 
|   797   Handle<ByteArray> translations = |   798   Handle<ByteArray> translations = | 
|   798       translations_.CreateByteArray(isolate()->factory()); |   799       translations_.CreateByteArray(isolate()->factory()); | 
|   799   data->SetTranslationByteArray(*translations); |   800   data->SetTranslationByteArray(*translations); | 
|   800   data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |   801   data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 
 |   802   data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); | 
|   801  |   803  | 
|   802   Handle<FixedArray> literals = |   804   Handle<FixedArray> literals = | 
|   803       factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |   805       factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 
|   804   { AllowDeferredHandleDereference copy_handles; |   806   { AllowDeferredHandleDereference copy_handles; | 
|   805     for (int i = 0; i < deoptimization_literals_.length(); i++) { |   807     for (int i = 0; i < deoptimization_literals_.length(); i++) { | 
|   806       literals->set(i, *deoptimization_literals_[i]); |   808       literals->set(i, *deoptimization_literals_[i]); | 
|   807     } |   809     } | 
|   808     data->SetLiteralArray(*literals); |   810     data->SetLiteralArray(*literals); | 
|   809   } |   811   } | 
|   810  |   812  | 
| (...skipping 4750 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5561                                FixedArray::kHeaderSize - kPointerSize)); |  5563                                FixedArray::kHeaderSize - kPointerSize)); | 
|  5562   __ bind(&done); |  5564   __ bind(&done); | 
|  5563 } |  5565 } | 
|  5564  |  5566  | 
|  5565  |  5567  | 
|  5566 #undef __ |  5568 #undef __ | 
|  5567  |  5569  | 
|  5568 } }  // namespace v8::internal |  5570 } }  // namespace v8::internal | 
|  5569  |  5571  | 
|  5570 #endif  // V8_TARGET_ARCH_X64 |  5572 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |