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

Side by Side Diff: src/hydrogen.cc

Issue 6513008: Small cleanup of unused code in hydrogen IR. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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/hydrogen.h ('k') | src/hydrogen-instructions.h » ('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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 end_(NULL), 58 end_(NULL),
59 loop_information_(NULL), 59 loop_information_(NULL),
60 predecessors_(2), 60 predecessors_(2),
61 dominator_(NULL), 61 dominator_(NULL),
62 dominated_blocks_(4), 62 dominated_blocks_(4),
63 last_environment_(NULL), 63 last_environment_(NULL),
64 argument_count_(-1), 64 argument_count_(-1),
65 first_instruction_index_(-1), 65 first_instruction_index_(-1),
66 last_instruction_index_(-1), 66 last_instruction_index_(-1),
67 deleted_phis_(4), 67 deleted_phis_(4),
68 parent_loop_header_(NULL),
68 is_inline_return_target_(false) { 69 is_inline_return_target_(false) {
69 } 70 }
70 71
71 72
72 void HBasicBlock::AttachLoopInformation() { 73 void HBasicBlock::AttachLoopInformation() {
73 ASSERT(!IsLoopHeader()); 74 ASSERT(!IsLoopHeader());
74 loop_information_ = new HLoopInformation(this); 75 loop_information_ = new HLoopInformation(this);
75 } 76 }
76 77
77 78
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 UNREACHABLE(); 287 UNREACHABLE();
287 return -1; 288 return -1;
288 } 289 }
289 290
290 291
291 #ifdef DEBUG 292 #ifdef DEBUG
292 void HBasicBlock::Verify() { 293 void HBasicBlock::Verify() {
293 // Check that every block is finished. 294 // Check that every block is finished.
294 ASSERT(IsFinished()); 295 ASSERT(IsFinished());
295 ASSERT(block_id() >= 0); 296 ASSERT(block_id() >= 0);
296
297 // Verify that all blocks targetting a branch target, have the same boolean
298 // value on top of their expression stack.
299 if (!cond().is_null()) {
300 ASSERT(predecessors()->length() > 0);
301 for (int i = 1; i < predecessors()->length(); i++) {
302 HBasicBlock* pred = predecessors()->at(i);
303 HValue* top = pred->last_environment()->Top();
304 ASSERT(top->IsConstant());
305 Object* a = *HConstant::cast(top)->handle();
306 Object* b = *cond();
307 ASSERT(a == b);
308 }
309 }
310 } 297 }
311 #endif 298 #endif
312 299
313 300
314 void HLoopInformation::RegisterBackEdge(HBasicBlock* block) { 301 void HLoopInformation::RegisterBackEdge(HBasicBlock* block) {
315 this->back_edges_.Add(block); 302 this->back_edges_.Add(block);
316 AddBlock(block); 303 AddBlock(block);
317 } 304 }
318 305
319 306
(...skipping 5685 matching lines...) Expand 10 before | Expand all | Expand 10 after
6005 } 5992 }
6006 } 5993 }
6007 5994
6008 #ifdef DEBUG 5995 #ifdef DEBUG
6009 if (graph_ != NULL) graph_->Verify(); 5996 if (graph_ != NULL) graph_->Verify();
6010 if (allocator_ != NULL) allocator_->Verify(); 5997 if (allocator_ != NULL) allocator_->Verify();
6011 #endif 5998 #endif
6012 } 5999 }
6013 6000
6014 } } // namespace v8::internal 6001 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698