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

Side by Side Diff: src/x64/lithium-codegen-x64.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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 friend class LDeferredCode; 339 friend class LDeferredCode;
340 friend class LEnvironment; 340 friend class LEnvironment;
341 friend class SafepointGenerator; 341 friend class SafepointGenerator;
342 DISALLOW_COPY_AND_ASSIGN(LCodeGen); 342 DISALLOW_COPY_AND_ASSIGN(LCodeGen);
343 }; 343 };
344 344
345 345
346 class LDeferredCode: public ZoneObject { 346 class LDeferredCode: public ZoneObject {
347 public: 347 public:
348 explicit LDeferredCode(LCodeGen* codegen) 348 explicit LDeferredCode(LCodeGen* codegen)
349 : codegen_(codegen), external_exit_(NULL) { 349 : codegen_(codegen),
350 external_exit_(NULL),
351 instruction_index_(codegen->current_instruction_) {
350 codegen->AddDeferredCode(this); 352 codegen->AddDeferredCode(this);
351 } 353 }
352 354
353 virtual ~LDeferredCode() { } 355 virtual ~LDeferredCode() { }
354 virtual void Generate() = 0; 356 virtual void Generate() = 0;
357 virtual LInstruction* instr() = 0;
355 358
356 void SetExit(Label *exit) { external_exit_ = exit; } 359 void SetExit(Label *exit) { external_exit_ = exit; }
357 Label* entry() { return &entry_; } 360 Label* entry() { return &entry_; }
358 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } 361 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; }
362 int instruction_index() const { return instruction_index_; }
359 363
360 protected: 364 protected:
361 LCodeGen* codegen() const { return codegen_; } 365 LCodeGen* codegen() const { return codegen_; }
362 MacroAssembler* masm() const { return codegen_->masm(); } 366 MacroAssembler* masm() const { return codegen_->masm(); }
363 367
364 private: 368 private:
365 LCodeGen* codegen_; 369 LCodeGen* codegen_;
366 Label entry_; 370 Label entry_;
367 Label exit_; 371 Label exit_;
368 Label* external_exit_; 372 Label* external_exit_;
373 int instruction_index_;
369 }; 374 };
370 375
371 } } // namespace v8::internal 376 } } // namespace v8::internal
372 377
373 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ 378 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698