| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 bool LCodeGen::GenerateDeferredCode() { | 472 bool LCodeGen::GenerateDeferredCode() { |
| 473 ASSERT(is_generating()); | 473 ASSERT(is_generating()); |
| 474 if (deferred_.length() > 0) { | 474 if (deferred_.length() > 0) { |
| 475 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 475 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 476 LDeferredCode* code = deferred_[i]; | 476 LDeferredCode* code = deferred_[i]; |
| 477 X87Stack copy(code->x87_stack()); | 477 X87Stack copy(code->x87_stack()); |
| 478 x87_stack_ = copy; | 478 x87_stack_ = copy; |
| 479 | 479 |
| 480 HValue* value = | 480 HValue* value = |
| 481 instructions_->at(code->instruction_index())->hydrogen_value(); | 481 instructions_->at(code->instruction_index())->hydrogen_value(); |
| 482 RecordAndWritePosition(value->position()); | 482 RecordAndWritePosition( |
| 483 chunk()->graph()->SourcePositionToScriptPosition(value->position())); |
| 483 | 484 |
| 484 Comment(";;; <@%d,#%d> " | 485 Comment(";;; <@%d,#%d> " |
| 485 "-------------------- Deferred %s --------------------", | 486 "-------------------- Deferred %s --------------------", |
| 486 code->instruction_index(), | 487 code->instruction_index(), |
| 487 code->instr()->hydrogen_value()->id(), | 488 code->instr()->hydrogen_value()->id(), |
| 488 code->instr()->Mnemonic()); | 489 code->instr()->Mnemonic()); |
| 489 __ bind(code->entry()); | 490 __ bind(code->entry()); |
| 490 if (NeedsDeferredFrame()) { | 491 if (NeedsDeferredFrame()) { |
| 491 Comment(";;; Build frame"); | 492 Comment(";;; Build frame"); |
| 492 ASSERT(!frame_is_built_); | 493 ASSERT(!frame_is_built_); |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { | 1175 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
| 1175 int length = deoptimizations_.length(); | 1176 int length = deoptimizations_.length(); |
| 1176 if (length == 0) return; | 1177 if (length == 0) return; |
| 1177 Handle<DeoptimizationInputData> data = | 1178 Handle<DeoptimizationInputData> data = |
| 1178 factory()->NewDeoptimizationInputData(length, TENURED); | 1179 factory()->NewDeoptimizationInputData(length, TENURED); |
| 1179 | 1180 |
| 1180 Handle<ByteArray> translations = | 1181 Handle<ByteArray> translations = |
| 1181 translations_.CreateByteArray(isolate()->factory()); | 1182 translations_.CreateByteArray(isolate()->factory()); |
| 1182 data->SetTranslationByteArray(*translations); | 1183 data->SetTranslationByteArray(*translations); |
| 1183 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); | 1184 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
| 1185 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
| 1184 | 1186 |
| 1185 Handle<FixedArray> literals = | 1187 Handle<FixedArray> literals = |
| 1186 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); | 1188 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |
| 1187 { AllowDeferredHandleDereference copy_handles; | 1189 { AllowDeferredHandleDereference copy_handles; |
| 1188 for (int i = 0; i < deoptimization_literals_.length(); i++) { | 1190 for (int i = 0; i < deoptimization_literals_.length(); i++) { |
| 1189 literals->set(i, *deoptimization_literals_[i]); | 1191 literals->set(i, *deoptimization_literals_[i]); |
| 1190 } | 1192 } |
| 1191 data->SetLiteralArray(*literals); | 1193 data->SetLiteralArray(*literals); |
| 1192 } | 1194 } |
| 1193 | 1195 |
| (...skipping 5078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6272 FixedArray::kHeaderSize - kPointerSize)); | 6274 FixedArray::kHeaderSize - kPointerSize)); |
| 6273 __ bind(&done); | 6275 __ bind(&done); |
| 6274 } | 6276 } |
| 6275 | 6277 |
| 6276 | 6278 |
| 6277 #undef __ | 6279 #undef __ |
| 6278 | 6280 |
| 6279 } } // namespace v8::internal | 6281 } } // namespace v8::internal |
| 6280 | 6282 |
| 6281 #endif // V8_TARGET_ARCH_IA32 | 6283 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |