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

Side by Side Diff: src/hydrogen.cc

Issue 6486033: Revert r6748.... (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/flag-definitions.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 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after
4683 } 4683 }
4684 } else if (op == Token::BIT_NOT || op == Token::SUB) { 4684 } else if (op == Token::BIT_NOT || op == Token::SUB) {
4685 VISIT_FOR_VALUE(expr->expression()); 4685 VISIT_FOR_VALUE(expr->expression());
4686 HValue* value = Pop(); 4686 HValue* value = Pop();
4687 HInstruction* instr = NULL; 4687 HInstruction* instr = NULL;
4688 switch (op) { 4688 switch (op) {
4689 case Token::BIT_NOT: 4689 case Token::BIT_NOT:
4690 instr = new HBitNot(value); 4690 instr = new HBitNot(value);
4691 break; 4691 break;
4692 case Token::SUB: 4692 case Token::SUB:
4693 instr = new HNeg(value); 4693 instr = new HMul(graph_->GetConstantMinus1(), value);
4694 break; 4694 break;
4695 default: 4695 default:
4696 UNREACHABLE(); 4696 UNREACHABLE();
4697 break; 4697 break;
4698 } 4698 }
4699 ast_context()->ReturnInstruction(instr, expr->id()); 4699 ast_context()->ReturnInstruction(instr, expr->id());
4700 } else if (op == Token::TYPEOF) { 4700 } else if (op == Token::TYPEOF) {
4701 VISIT_FOR_VALUE(expr->expression()); 4701 VISIT_FOR_VALUE(expr->expression());
4702 HValue* value = Pop(); 4702 HValue* value = Pop();
4703 ast_context()->ReturnInstruction(new HTypeof(value), expr->id()); 4703 ast_context()->ReturnInstruction(new HTypeof(value), expr->id());
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
5894 UseInterval* cur_interval = range->first_interval(); 5894 UseInterval* cur_interval = range->first_interval();
5895 while (cur_interval != NULL) { 5895 while (cur_interval != NULL) {
5896 trace_.Add(" [%d, %d[", 5896 trace_.Add(" [%d, %d[",
5897 cur_interval->start().Value(), 5897 cur_interval->start().Value(),
5898 cur_interval->end().Value()); 5898 cur_interval->end().Value());
5899 cur_interval = cur_interval->next(); 5899 cur_interval = cur_interval->next();
5900 } 5900 }
5901 5901
5902 UsePosition* current_pos = range->first_pos(); 5902 UsePosition* current_pos = range->first_pos();
5903 while (current_pos != NULL) { 5903 while (current_pos != NULL) {
5904 if (current_pos->RegisterIsBeneficial() || FLAG_trace_all_uses) { 5904 if (current_pos->RegisterIsBeneficial()) {
5905 trace_.Add(" %d M", current_pos->pos().Value()); 5905 trace_.Add(" %d M", current_pos->pos().Value());
5906 } 5906 }
5907 current_pos = current_pos->next(); 5907 current_pos = current_pos->next();
5908 } 5908 }
5909 5909
5910 trace_.Add(" \"\"\n"); 5910 trace_.Add(" \"\"\n");
5911 } 5911 }
5912 } 5912 }
5913 5913
5914 5914
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 } 6002 }
6003 } 6003 }
6004 6004
6005 #ifdef DEBUG 6005 #ifdef DEBUG
6006 if (graph_ != NULL) graph_->Verify(); 6006 if (graph_ != NULL) graph_->Verify();
6007 if (allocator_ != NULL) allocator_->Verify(); 6007 if (allocator_ != NULL) allocator_->Verify();
6008 #endif 6008 #endif
6009 } 6009 }
6010 6010
6011 } } // namespace v8::internal 6011 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698