| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 | 267 |
| 268 | 268 |
| 269 bool LCodeGen::GenerateDeferredCode() { | 269 bool LCodeGen::GenerateDeferredCode() { |
| 270 ASSERT(is_generating()); | 270 ASSERT(is_generating()); |
| 271 if (deferred_.length() > 0) { | 271 if (deferred_.length() > 0) { |
| 272 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 272 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 273 LDeferredCode* code = deferred_[i]; | 273 LDeferredCode* code = deferred_[i]; |
| 274 | 274 |
| 275 HValue* value = | 275 HValue* value = |
| 276 instructions_->at(code->instruction_index())->hydrogen_value(); | 276 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 277 RecordAndWritePosition(value->position()); | 277 RecordAndWritePosition( |
| 278 chunk()->graph()->SourcePositionToScriptPosition(value->position())); |
| 278 | 279 |
| 279 Comment(";;; <@%d,#%d> " | 280 Comment(";;; <@%d,#%d> " |
| 280 "-------------------- Deferred %s --------------------", | 281 "-------------------- Deferred %s --------------------", |
| 281 code->instruction_index(), | 282 code->instruction_index(), |
| 282 code->instr()->hydrogen_value()->id(), | 283 code->instr()->hydrogen_value()->id(), |
| 283 code->instr()->Mnemonic()); | 284 code->instr()->Mnemonic()); |
| 284 __ bind(code->entry()); | 285 __ bind(code->entry()); |
| 285 if (NeedsDeferredFrame()) { | 286 if (NeedsDeferredFrame()) { |
| 286 Comment(";;; Build frame"); | 287 Comment(";;; Build frame"); |
| 287 ASSERT(!frame_is_built_); | 288 ASSERT(!frame_is_built_); |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 860 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
| 860 int length = deoptimizations_.length(); | 861 int length = deoptimizations_.length(); |
| 861 if (length == 0) return; | 862 if (length == 0) return; |
| 862 Handle<DeoptimizationInputData> data = | 863 Handle<DeoptimizationInputData> data = |
| 863 factory()->NewDeoptimizationInputData(length, TENURED); | 864 factory()->NewDeoptimizationInputData(length, TENURED); |
| 864 | 865 |
| 865 Handle<ByteArray> translations = | 866 Handle<ByteArray> translations = |
| 866 translations_.CreateByteArray(isolate()->factory()); | 867 translations_.CreateByteArray(isolate()->factory()); |
| 867 data->SetTranslationByteArray(*translations); | 868 data->SetTranslationByteArray(*translations); |
| 868 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 869 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 870 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
| 869 | 871 |
| 870 Handle<FixedArray> literals = | 872 Handle<FixedArray> literals = |
| 871 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 873 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 872 { AllowDeferredHandleDereference copy_handles; | 874 { AllowDeferredHandleDereference copy_handles; |
| 873 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 875 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 874 literals->set(i, *deoptimization_literals_[i]); | 876 literals->set(i, *deoptimization_literals_[i]); |
| 875 } | 877 } |
| 876 data->SetLiteralArray(*literals); | 878 data->SetLiteralArray(*literals); |
| 877 } | 879 } |
| 878 | 880 |
| (...skipping 4862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5741 __ Subu(scratch, result, scratch); | 5743 __ Subu(scratch, result, scratch); |
| 5742 __ lw(result, FieldMemOperand(scratch, | 5744 __ lw(result, FieldMemOperand(scratch, |
| 5743 FixedArray::kHeaderSize - kPointerSize)); | 5745 FixedArray::kHeaderSize - kPointerSize)); |
| 5744 __ bind(&done); | 5746 __ bind(&done); |
| 5745 } | 5747 } |
| 5746 | 5748 |
| 5747 | 5749 |
| 5748 #undef __ | 5750 #undef __ |
| 5749 | 5751 |
| 5750 } } // namespace v8::internal | 5752 } } // namespace v8::internal |
| OLD | NEW |