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

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

Issue 6873075: Lithium LLabel instruction are no longer used as gap instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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/ia32/lithium-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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 int gap_instructions_size_; 402 int gap_instructions_size_;
403 }; 403 };
404 404
405 405
406 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 406 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
407 public: 407 public:
408 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 408 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
409 }; 409 };
410 410
411 411
412 class LLabel: public LGap { 412 class LLabel: public LTemplateInstruction<0, 0, 0> {
413 public: 413 public:
414 explicit LLabel(HBasicBlock* block) 414 explicit LLabel(HBasicBlock* block)
415 : LGap(block), replacement_(NULL) { } 415 : block_(block), replacement_(NULL) { }
416 416
417 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 417 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
418 418
419 virtual void PrintDataTo(StringStream* stream); 419 virtual void PrintDataTo(StringStream* stream);
420 420
421 int block_id() const { return block()->block_id(); } 421 int block_id() const { return block_->block_id(); }
422 bool is_loop_header() const { return block()->IsLoopHeader(); } 422 bool is_loop_header() const { return block_->IsLoopHeader(); }
423 Label* label() { return &label_; } 423 Label* label() { return &label_; }
424 LLabel* replacement() const { return replacement_; } 424 LLabel* replacement() const { return replacement_; }
425 void set_replacement(LLabel* label) { replacement_ = label; } 425 void set_replacement(LLabel* label) { replacement_ = label; }
426 bool HasReplacement() const { return replacement_ != NULL; } 426 bool HasReplacement() const { return replacement_ != NULL; }
427 427
428 private: 428 private:
429 Label label_; 429 Label label_;
430 HBasicBlock* block_;
430 LLabel* replacement_; 431 LLabel* replacement_;
431 }; 432 };
432 433
433 434
434 class LParameter: public LTemplateInstruction<1, 0, 0> { 435 class LParameter: public LTemplateInstruction<1, 0, 0> {
435 public: 436 public:
436 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 437 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
437 }; 438 };
438 439
439 440
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 LGap* GetGapAt(int index) const; 2075 LGap* GetGapAt(int index) const;
2075 bool IsGapAt(int index) const; 2076 bool IsGapAt(int index) const;
2076 int NearestGapPos(int index) const; 2077 int NearestGapPos(int index) const;
2077 void MarkEmptyBlocks(); 2078 void MarkEmptyBlocks();
2078 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } 2079 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; }
2079 LLabel* GetLabel(int block_id) const { 2080 LLabel* GetLabel(int block_id) const {
2080 HBasicBlock* block = graph_->blocks()->at(block_id); 2081 HBasicBlock* block = graph_->blocks()->at(block_id);
2081 int first_instruction = block->first_instruction_index(); 2082 int first_instruction = block->first_instruction_index();
2082 return LLabel::cast(instructions_[first_instruction]); 2083 return LLabel::cast(instructions_[first_instruction]);
2083 } 2084 }
2085 LGap* GetFirstGap(HBasicBlock* block) const {
2086 int first_instruction = block->first_instruction_index();
2087 return LGap::cast(instructions_[first_instruction + 1]);
2088 }
2084 int LookupDestination(int block_id) const { 2089 int LookupDestination(int block_id) const {
2085 LLabel* cur = GetLabel(block_id); 2090 LLabel* cur = GetLabel(block_id);
2086 while (cur->replacement() != NULL) { 2091 while (cur->replacement() != NULL) {
2087 cur = cur->replacement(); 2092 cur = cur->replacement();
2088 } 2093 }
2089 return cur->block_id(); 2094 return cur->block_id();
2090 } 2095 }
2091 Label* GetAssemblyLabel(int block_id) const { 2096 Label* GetAssemblyLabel(int block_id) const {
2092 LLabel* label = GetLabel(block_id); 2097 LLabel* label = GetLabel(block_id);
2093 ASSERT(!label->HasReplacement()); 2098 ASSERT(!label->HasReplacement());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2272 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2268 }; 2273 };
2269 2274
2270 #undef DECLARE_HYDROGEN_ACCESSOR 2275 #undef DECLARE_HYDROGEN_ACCESSOR
2271 #undef DECLARE_INSTRUCTION 2276 #undef DECLARE_INSTRUCTION
2272 #undef DECLARE_CONCRETE_INSTRUCTION 2277 #undef DECLARE_CONCRETE_INSTRUCTION
2273 2278
2274 } } // namespace v8::internal 2279 } } // namespace v8::internal
2275 2280
2276 #endif // V8_IA32_LITHIUM_IA32_H_ 2281 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698