| 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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 277 |
| 278 | 278 |
| 279 bool LCodeGen::GenerateDeferredCode() { | 279 bool LCodeGen::GenerateDeferredCode() { |
| 280 ASSERT(is_generating()); | 280 ASSERT(is_generating()); |
| 281 if (deferred_.length() > 0) { | 281 if (deferred_.length() > 0) { |
| 282 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 282 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 283 LDeferredCode* code = deferred_[i]; | 283 LDeferredCode* code = deferred_[i]; |
| 284 | 284 |
| 285 HValue* value = | 285 HValue* value = |
| 286 instructions_->at(code->instruction_index())->hydrogen_value(); | 286 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 287 RecordAndWritePosition(value->position()); | 287 RecordAndWritePosition( |
| 288 chunk()->graph()->SourcePositionToScriptPosition(value->position())); |
| 288 | 289 |
| 289 Comment(";;; <@%d,#%d> " | 290 Comment(";;; <@%d,#%d> " |
| 290 "-------------------- Deferred %s --------------------", | 291 "-------------------- Deferred %s --------------------", |
| 291 code->instruction_index(), | 292 code->instruction_index(), |
| 292 code->instr()->hydrogen_value()->id(), | 293 code->instr()->hydrogen_value()->id(), |
| 293 code->instr()->Mnemonic()); | 294 code->instr()->Mnemonic()); |
| 294 __ bind(code->entry()); | 295 __ bind(code->entry()); |
| 295 if (NeedsDeferredFrame()) { | 296 if (NeedsDeferredFrame()) { |
| 296 Comment(";;; Build frame"); | 297 Comment(";;; Build frame"); |
| 297 ASSERT(!frame_is_built_); | 298 ASSERT(!frame_is_built_); |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 907 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
| 907 int length = deoptimizations_.length(); | 908 int length = deoptimizations_.length(); |
| 908 if (length == 0) return; | 909 if (length == 0) return; |
| 909 Handle<DeoptimizationInputData> data = | 910 Handle<DeoptimizationInputData> data = |
| 910 factory()->NewDeoptimizationInputData(length, TENURED); | 911 factory()->NewDeoptimizationInputData(length, TENURED); |
| 911 | 912 |
| 912 Handle<ByteArray> translations = | 913 Handle<ByteArray> translations = |
| 913 translations_.CreateByteArray(isolate()->factory()); | 914 translations_.CreateByteArray(isolate()->factory()); |
| 914 data->SetTranslationByteArray(*translations); | 915 data->SetTranslationByteArray(*translations); |
| 915 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 916 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 917 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
| 916 | 918 |
| 917 Handle<FixedArray> literals = | 919 Handle<FixedArray> literals = |
| 918 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 920 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 919 { AllowDeferredHandleDereference copy_handles; | 921 { AllowDeferredHandleDereference copy_handles; |
| 920 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 922 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 921 literals->set(i, *deoptimization_literals_[i]); | 923 literals->set(i, *deoptimization_literals_[i]); |
| 922 } | 924 } |
| 923 data->SetLiteralArray(*literals); | 925 data->SetLiteralArray(*literals); |
| 924 } | 926 } |
| 925 | 927 |
| (...skipping 4823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5749 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5751 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5750 __ ldr(result, FieldMemOperand(scratch, | 5752 __ ldr(result, FieldMemOperand(scratch, |
| 5751 FixedArray::kHeaderSize - kPointerSize)); | 5753 FixedArray::kHeaderSize - kPointerSize)); |
| 5752 __ bind(&done); | 5754 __ bind(&done); |
| 5753 } | 5755 } |
| 5754 | 5756 |
| 5755 | 5757 |
| 5756 #undef __ | 5758 #undef __ |
| 5757 | 5759 |
| 5758 } } // namespace v8::internal | 5760 } } // namespace v8::internal |
| OLD | NEW |