| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 | 263 |
| 264 bool LCodeGen::GenerateDeferredCode() { | 264 bool LCodeGen::GenerateDeferredCode() { |
| 265 ASSERT(is_generating()); | 265 ASSERT(is_generating()); |
| 266 if (deferred_.length() > 0) { | 266 if (deferred_.length() > 0) { |
| 267 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 267 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 268 LDeferredCode* code = deferred_[i]; | 268 LDeferredCode* code = deferred_[i]; |
| 269 | 269 |
| 270 HValue* value = | 270 HValue* value = |
| 271 instructions_->at(code->instruction_index())->hydrogen_value(); | 271 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 272 RecordAndWritePosition(value->position()); | 272 RecordAndWritePosition( |
| 273 chunk()->graph()->SourcePositionToScriptPosition(value->position())); |
| 273 | 274 |
| 274 Comment(";;; <@%d,#%d> " | 275 Comment(";;; <@%d,#%d> " |
| 275 "-------------------- Deferred %s --------------------", | 276 "-------------------- Deferred %s --------------------", |
| 276 code->instruction_index(), | 277 code->instruction_index(), |
| 277 code->instr()->hydrogen_value()->id(), | 278 code->instr()->hydrogen_value()->id(), |
| 278 code->instr()->Mnemonic()); | 279 code->instr()->Mnemonic()); |
| 279 __ bind(code->entry()); | 280 __ bind(code->entry()); |
| 280 if (NeedsDeferredFrame()) { | 281 if (NeedsDeferredFrame()) { |
| 281 Comment(";;; Build frame"); | 282 Comment(";;; Build frame"); |
| 282 ASSERT(!frame_is_built_); | 283 ASSERT(!frame_is_built_); |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 855 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
| 855 int length = deoptimizations_.length(); | 856 int length = deoptimizations_.length(); |
| 856 if (length == 0) return; | 857 if (length == 0) return; |
| 857 Handle<DeoptimizationInputData> data = | 858 Handle<DeoptimizationInputData> data = |
| 858 factory()->NewDeoptimizationInputData(length, TENURED); | 859 factory()->NewDeoptimizationInputData(length, TENURED); |
| 859 | 860 |
| 860 Handle<ByteArray> translations = | 861 Handle<ByteArray> translations = |
| 861 translations_.CreateByteArray(isolate()->factory()); | 862 translations_.CreateByteArray(isolate()->factory()); |
| 862 data->SetTranslationByteArray(*translations); | 863 data->SetTranslationByteArray(*translations); |
| 863 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 864 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 865 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
| 864 | 866 |
| 865 Handle<FixedArray> literals = | 867 Handle<FixedArray> literals = |
| 866 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 868 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 867 { AllowDeferredHandleDereference copy_handles; | 869 { AllowDeferredHandleDereference copy_handles; |
| 868 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 870 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 869 literals->set(i, *deoptimization_literals_[i]); | 871 literals->set(i, *deoptimization_literals_[i]); |
| 870 } | 872 } |
| 871 data->SetLiteralArray(*literals); | 873 data->SetLiteralArray(*literals); |
| 872 } | 874 } |
| 873 | 875 |
| (...skipping 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5816 __ Subu(scratch, result, scratch); | 5818 __ Subu(scratch, result, scratch); |
| 5817 __ lw(result, FieldMemOperand(scratch, | 5819 __ lw(result, FieldMemOperand(scratch, |
| 5818 FixedArray::kHeaderSize - kPointerSize)); | 5820 FixedArray::kHeaderSize - kPointerSize)); |
| 5819 __ bind(&done); | 5821 __ bind(&done); |
| 5820 } | 5822 } |
| 5821 | 5823 |
| 5822 | 5824 |
| 5823 #undef __ | 5825 #undef __ |
| 5824 | 5826 |
| 5825 } } // namespace v8::internal | 5827 } } // namespace v8::internal |
| OLD | NEW |