Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 140683011: Improve positions tracking inside the HGraphBuilder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-representation-changes.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 bool LCodeGen::GenerateDeferredCode() { 469 bool LCodeGen::GenerateDeferredCode() {
470 ASSERT(is_generating()); 470 ASSERT(is_generating());
471 if (deferred_.length() > 0) { 471 if (deferred_.length() > 0) {
472 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 472 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
473 LDeferredCode* code = deferred_[i]; 473 LDeferredCode* code = deferred_[i];
474 X87Stack copy(code->x87_stack()); 474 X87Stack copy(code->x87_stack());
475 x87_stack_ = copy; 475 x87_stack_ = copy;
476 476
477 HValue* value = 477 HValue* value =
478 instructions_->at(code->instruction_index())->hydrogen_value(); 478 instructions_->at(code->instruction_index())->hydrogen_value();
479 RecordAndWritePosition(value->position()); 479 RecordAndWritePosition(
480 chunk()->graph()->SourcePositionToScriptPosition(value->position()));
480 481
481 Comment(";;; <@%d,#%d> " 482 Comment(";;; <@%d,#%d> "
482 "-------------------- Deferred %s --------------------", 483 "-------------------- Deferred %s --------------------",
483 code->instruction_index(), 484 code->instruction_index(),
484 code->instr()->hydrogen_value()->id(), 485 code->instr()->hydrogen_value()->id(),
485 code->instr()->Mnemonic()); 486 code->instr()->Mnemonic());
486 __ bind(code->entry()); 487 __ bind(code->entry());
487 if (NeedsDeferredFrame()) { 488 if (NeedsDeferredFrame()) {
488 Comment(";;; Build frame"); 489 Comment(";;; Build frame");
489 ASSERT(!frame_is_built_); 490 ASSERT(!frame_is_built_);
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 1172 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
1172 int length = deoptimizations_.length(); 1173 int length = deoptimizations_.length();
1173 if (length == 0) return; 1174 if (length == 0) return;
1174 Handle<DeoptimizationInputData> data = 1175 Handle<DeoptimizationInputData> data =
1175 factory()->NewDeoptimizationInputData(length, TENURED); 1176 factory()->NewDeoptimizationInputData(length, TENURED);
1176 1177
1177 Handle<ByteArray> translations = 1178 Handle<ByteArray> translations =
1178 translations_.CreateByteArray(isolate()->factory()); 1179 translations_.CreateByteArray(isolate()->factory());
1179 data->SetTranslationByteArray(*translations); 1180 data->SetTranslationByteArray(*translations);
1180 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 1181 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
1182 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
1181 1183
1182 Handle<FixedArray> literals = 1184 Handle<FixedArray> literals =
1183 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 1185 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
1184 { AllowDeferredHandleDereference copy_handles; 1186 { AllowDeferredHandleDereference copy_handles;
1185 for (int i = 0; i < deoptimization_literals_.length(); i++) { 1187 for (int i = 0; i < deoptimization_literals_.length(); i++) {
1186 literals->set(i, *deoptimization_literals_[i]); 1188 literals->set(i, *deoptimization_literals_[i]);
1187 } 1189 }
1188 data->SetLiteralArray(*literals); 1190 data->SetLiteralArray(*literals);
1189 } 1191 }
1190 1192
(...skipping 5077 matching lines...) Expand 10 before | Expand all | Expand 10 after
6268 FixedArray::kHeaderSize - kPointerSize)); 6270 FixedArray::kHeaderSize - kPointerSize));
6269 __ bind(&done); 6271 __ bind(&done);
6270 } 6272 }
6271 6273
6272 6274
6273 #undef __ 6275 #undef __
6274 6276
6275 } } // namespace v8::internal 6277 } } // namespace v8::internal
6276 6278
6277 #endif // V8_TARGET_ARCH_IA32 6279 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-representation-changes.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698