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

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

Issue 6873106: Revert r7665. (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 | « no previous file | src/arm/lithium-arm.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 int gap_instructions_size_; 400 int gap_instructions_size_;
401 }; 401 };
402 402
403 403
404 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 404 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
405 public: 405 public:
406 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 406 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
407 }; 407 };
408 408
409 409
410 class LLabel: public LTemplateInstruction<0, 0, 0> { 410 class LLabel: public LGap {
411 public: 411 public:
412 explicit LLabel(HBasicBlock* block) 412 explicit LLabel(HBasicBlock* block)
413 : block_(block), replacement_(NULL) { } 413 : LGap(block), replacement_(NULL) { }
414 414
415 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 415 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
416 416
417 virtual void PrintDataTo(StringStream* stream); 417 virtual void PrintDataTo(StringStream* stream);
418 418
419 int block_id() const { return block_->block_id(); } 419 int block_id() const { return block()->block_id(); }
420 bool is_loop_header() const { return block_->IsLoopHeader(); } 420 bool is_loop_header() const { return block()->IsLoopHeader(); }
421 Label* label() { return &label_; } 421 Label* label() { return &label_; }
422 LLabel* replacement() const { return replacement_; } 422 LLabel* replacement() const { return replacement_; }
423 void set_replacement(LLabel* label) { replacement_ = label; } 423 void set_replacement(LLabel* label) { replacement_ = label; }
424 bool HasReplacement() const { return replacement_ != NULL; } 424 bool HasReplacement() const { return replacement_ != NULL; }
425 425
426 private: 426 private:
427 Label label_; 427 Label label_;
428 HBasicBlock* block_;
429 LLabel* replacement_; 428 LLabel* replacement_;
430 }; 429 };
431 430
432 431
433 class LParameter: public LTemplateInstruction<1, 0, 0> { 432 class LParameter: public LTemplateInstruction<1, 0, 0> {
434 public: 433 public:
435 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") 434 DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
436 }; 435 };
437 436
438 437
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 LGap* GetGapAt(int index) const; 2015 LGap* GetGapAt(int index) const;
2017 bool IsGapAt(int index) const; 2016 bool IsGapAt(int index) const;
2018 int NearestGapPos(int index) const; 2017 int NearestGapPos(int index) const;
2019 void MarkEmptyBlocks(); 2018 void MarkEmptyBlocks();
2020 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; } 2019 const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; }
2021 LLabel* GetLabel(int block_id) const { 2020 LLabel* GetLabel(int block_id) const {
2022 HBasicBlock* block = graph_->blocks()->at(block_id); 2021 HBasicBlock* block = graph_->blocks()->at(block_id);
2023 int first_instruction = block->first_instruction_index(); 2022 int first_instruction = block->first_instruction_index();
2024 return LLabel::cast(instructions_[first_instruction]); 2023 return LLabel::cast(instructions_[first_instruction]);
2025 } 2024 }
2026 LGap* GetFirstGap(HBasicBlock* block) const {
2027 int first_instruction = block->first_instruction_index();
2028 return LGap::cast(instructions_[first_instruction + 1]);
2029 }
2030 int LookupDestination(int block_id) const { 2025 int LookupDestination(int block_id) const {
2031 LLabel* cur = GetLabel(block_id); 2026 LLabel* cur = GetLabel(block_id);
2032 while (cur->replacement() != NULL) { 2027 while (cur->replacement() != NULL) {
2033 cur = cur->replacement(); 2028 cur = cur->replacement();
2034 } 2029 }
2035 return cur->block_id(); 2030 return cur->block_id();
2036 } 2031 }
2037 Label* GetAssemblyLabel(int block_id) const { 2032 Label* GetAssemblyLabel(int block_id) const {
2038 LLabel* label = GetLabel(block_id); 2033 LLabel* label = GetLabel(block_id);
2039 ASSERT(!label->HasReplacement()); 2034 ASSERT(!label->HasReplacement());
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2208 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2214 }; 2209 };
2215 2210
2216 #undef DECLARE_HYDROGEN_ACCESSOR 2211 #undef DECLARE_HYDROGEN_ACCESSOR
2217 #undef DECLARE_INSTRUCTION 2212 #undef DECLARE_INSTRUCTION
2218 #undef DECLARE_CONCRETE_INSTRUCTION 2213 #undef DECLARE_CONCRETE_INSTRUCTION
2219 2214
2220 } } // namespace v8::internal 2215 } } // namespace v8::internal
2221 2216
2222 #endif // V8_ARM_LITHIUM_ARM_H_ 2217 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698