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

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

Issue 21042003: Patch to enhance the source code line information for profiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 4 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
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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (FLAG_trace && info()->IsOptimizing()) { 249 if (FLAG_trace && info()->IsOptimizing()) {
250 __ CallRuntime(Runtime::kTraceEnter, 0); 250 __ CallRuntime(Runtime::kTraceEnter, 0);
251 } 251 }
252 return !is_aborted(); 252 return !is_aborted();
253 } 253 }
254 254
255 255
256 bool LCodeGen::GenerateBody() { 256 bool LCodeGen::GenerateBody() {
257 ASSERT(is_generating()); 257 ASSERT(is_generating());
258 bool emit_instructions = true; 258 bool emit_instructions = true;
259 int old_position = RelocInfo::kNoPosition;
danno 2013/08/05 16:59:17 old_position is now unused, correct? Please remove
259 for (current_instruction_ = 0; 260 for (current_instruction_ = 0;
260 !is_aborted() && current_instruction_ < instructions_->length(); 261 !is_aborted() && current_instruction_ < instructions_->length();
261 current_instruction_++) { 262 current_instruction_++) {
262 LInstruction* instr = instructions_->at(current_instruction_); 263 LInstruction* instr = instructions_->at(current_instruction_);
263 264
264 // Don't emit code for basic blocks with a replacement. 265 // Don't emit code for basic blocks with a replacement.
265 if (instr->IsLabel()) { 266 if (instr->IsLabel()) {
266 emit_instructions = !LLabel::cast(instr)->HasReplacement(); 267 emit_instructions = !LLabel::cast(instr)->HasReplacement();
267 } 268 }
268 if (!emit_instructions) continue; 269 if (!emit_instructions) continue;
269 270
270 if (FLAG_code_comments && instr->HasInterestingComment(this)) { 271 if (FLAG_code_comments && instr->HasInterestingComment(this)) {
271 Comment(";;; <@%d,#%d> %s", 272 Comment(";;; <@%d,#%d> %s",
272 current_instruction_, 273 current_instruction_,
273 instr->hydrogen_value()->id(), 274 instr->hydrogen_value()->id(),
274 instr->Mnemonic()); 275 instr->Mnemonic());
275 } 276 }
276 277
278 RecordAndUpdatePosition(instr->position());
279
277 instr->CompileToNative(this); 280 instr->CompileToNative(this);
278 } 281 }
279 EnsureSpaceForLazyDeopt(); 282 EnsureSpaceForLazyDeopt();
280 last_lazy_deopt_pc_ = masm()->pc_offset(); 283 last_lazy_deopt_pc_ = masm()->pc_offset();
281 return !is_aborted(); 284 return !is_aborted();
282 } 285 }
283 286
284 287
285 bool LCodeGen::GenerateDeferredCode() { 288 bool LCodeGen::GenerateDeferredCode() {
286 ASSERT(is_generating()); 289 ASSERT(is_generating());
287 if (deferred_.length() > 0) { 290 if (deferred_.length() > 0) {
288 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 291 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
289 LDeferredCode* code = deferred_[i]; 292 LDeferredCode* code = deferred_[i];
293
294 int pos = instructions_->at(code->instruction_index())->position();
295 RecordAndUpdatePosition(pos);
296
290 Comment(";;; <@%d,#%d> " 297 Comment(";;; <@%d,#%d> "
291 "-------------------- Deferred %s --------------------", 298 "-------------------- Deferred %s --------------------",
292 code->instruction_index(), 299 code->instruction_index(),
293 code->instr()->hydrogen_value()->id(), 300 code->instr()->hydrogen_value()->id(),
294 code->instr()->Mnemonic()); 301 code->instr()->Mnemonic());
295 __ bind(code->entry()); 302 __ bind(code->entry());
296 if (NeedsDeferredFrame()) { 303 if (NeedsDeferredFrame()) {
297 Comment(";;; Build frame"); 304 Comment(";;; Build frame");
298 ASSERT(!frame_is_built_); 305 ASSERT(!frame_is_built_);
299 ASSERT(info()->IsStub()); 306 ASSERT(info()->IsStub());
(...skipping 5524 matching lines...) Expand 10 before | Expand all | Expand 10 after
5824 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5831 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5825 __ ldr(result, FieldMemOperand(scratch, 5832 __ ldr(result, FieldMemOperand(scratch,
5826 FixedArray::kHeaderSize - kPointerSize)); 5833 FixedArray::kHeaderSize - kPointerSize));
5827 __ bind(&done); 5834 __ bind(&done);
5828 } 5835 }
5829 5836
5830 5837
5831 #undef __ 5838 #undef __
5832 5839
5833 } } // namespace v8::internal 5840 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698