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

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

Issue 8046003: Add code comments to deferred code objects to make debugging easier. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 friend class LDeferredCode; 345 friend class LDeferredCode;
346 friend class LEnvironment; 346 friend class LEnvironment;
347 friend class SafepointGenerator; 347 friend class SafepointGenerator;
348 DISALLOW_COPY_AND_ASSIGN(LCodeGen); 348 DISALLOW_COPY_AND_ASSIGN(LCodeGen);
349 }; 349 };
350 350
351 351
352 class LDeferredCode: public ZoneObject { 352 class LDeferredCode: public ZoneObject {
353 public: 353 public:
354 explicit LDeferredCode(LCodeGen* codegen) 354 explicit LDeferredCode(LCodeGen* codegen)
355 : codegen_(codegen), external_exit_(NULL) { 355 : codegen_(codegen),
356 external_exit_(NULL),
357 instruction_index_(codegen->current_instruction_) {
356 codegen->AddDeferredCode(this); 358 codegen->AddDeferredCode(this);
357 } 359 }
358 360
359 virtual ~LDeferredCode() { } 361 virtual ~LDeferredCode() { }
360 virtual void Generate() = 0; 362 virtual void Generate() = 0;
363 virtual LInstruction* instr() = 0;
361 364
362 void SetExit(Label *exit) { external_exit_ = exit; } 365 void SetExit(Label *exit) { external_exit_ = exit; }
363 Label* entry() { return &entry_; } 366 Label* entry() { return &entry_; }
364 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } 367 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; }
368 int instruction_index() const { return instruction_index_; }
365 369
366 protected: 370 protected:
367 LCodeGen* codegen() const { return codegen_; } 371 LCodeGen* codegen() const { return codegen_; }
368 MacroAssembler* masm() const { return codegen_->masm(); } 372 MacroAssembler* masm() const { return codegen_->masm(); }
369 373
370 private: 374 private:
371 LCodeGen* codegen_; 375 LCodeGen* codegen_;
372 Label entry_; 376 Label entry_;
373 Label exit_; 377 Label exit_;
374 Label* external_exit_; 378 Label* external_exit_;
379 int instruction_index_;
375 }; 380 };
376 381
377 } } // namespace v8::internal 382 } } // namespace v8::internal
378 383
379 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 384 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698