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

Side by Side Diff: src/mips/lithium-codegen-mips.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/lithium-codegen.cc ('k') | src/objects.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.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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 261
262 bool LCodeGen::GenerateDeferredCode() { 262 bool LCodeGen::GenerateDeferredCode() {
263 ASSERT(is_generating()); 263 ASSERT(is_generating());
264 if (deferred_.length() > 0) { 264 if (deferred_.length() > 0) {
265 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 265 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
266 LDeferredCode* code = deferred_[i]; 266 LDeferredCode* code = deferred_[i];
267 267
268 HValue* value = 268 HValue* value =
269 instructions_->at(code->instruction_index())->hydrogen_value(); 269 instructions_->at(code->instruction_index())->hydrogen_value();
270 RecordAndWritePosition(value->position()); 270 RecordAndWritePosition(
271 chunk()->graph()->SourcePositionToScriptPosition(value->position()));
271 272
272 Comment(";;; <@%d,#%d> " 273 Comment(";;; <@%d,#%d> "
273 "-------------------- Deferred %s --------------------", 274 "-------------------- Deferred %s --------------------",
274 code->instruction_index(), 275 code->instruction_index(),
275 code->instr()->hydrogen_value()->id(), 276 code->instr()->hydrogen_value()->id(),
276 code->instr()->Mnemonic()); 277 code->instr()->Mnemonic());
277 __ bind(code->entry()); 278 __ bind(code->entry());
278 if (NeedsDeferredFrame()) { 279 if (NeedsDeferredFrame()) {
279 Comment(";;; Build frame"); 280 Comment(";;; Build frame");
280 ASSERT(!frame_is_built_); 281 ASSERT(!frame_is_built_);
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 853 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
853 int length = deoptimizations_.length(); 854 int length = deoptimizations_.length();
854 if (length == 0) return; 855 if (length == 0) return;
855 Handle<DeoptimizationInputData> data = 856 Handle<DeoptimizationInputData> data =
856 factory()->NewDeoptimizationInputData(length, TENURED); 857 factory()->NewDeoptimizationInputData(length, TENURED);
857 858
858 Handle<ByteArray> translations = 859 Handle<ByteArray> translations =
859 translations_.CreateByteArray(isolate()->factory()); 860 translations_.CreateByteArray(isolate()->factory());
860 data->SetTranslationByteArray(*translations); 861 data->SetTranslationByteArray(*translations);
861 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 862 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
863 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
862 864
863 Handle<FixedArray> literals = 865 Handle<FixedArray> literals =
864 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 866 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
865 { AllowDeferredHandleDereference copy_handles; 867 { AllowDeferredHandleDereference copy_handles;
866 for (int i = 0; i < deoptimization_literals_.length(); i++) { 868 for (int i = 0; i < deoptimization_literals_.length(); i++) {
867 literals->set(i, *deoptimization_literals_[i]); 869 literals->set(i, *deoptimization_literals_[i]);
868 } 870 }
869 data->SetLiteralArray(*literals); 871 data->SetLiteralArray(*literals);
870 } 872 }
871 873
(...skipping 4861 matching lines...) Expand 10 before | Expand all | Expand 10 after
5733 __ Subu(scratch, result, scratch); 5735 __ Subu(scratch, result, scratch);
5734 __ lw(result, FieldMemOperand(scratch, 5736 __ lw(result, FieldMemOperand(scratch,
5735 FixedArray::kHeaderSize - kPointerSize)); 5737 FixedArray::kHeaderSize - kPointerSize));
5736 __ bind(&done); 5738 __ bind(&done);
5737 } 5739 }
5738 5740
5739 5741
5740 #undef __ 5742 #undef __
5741 5743
5742 } } // namespace v8::internal 5744 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium-codegen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698