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

Side by Side Diff: src/hydrogen.cc

Issue 22611009: H-BuildIncrement should make use of available type feedback (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed casting bug Created 7 years, 3 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') | test/mjsunit/compiler/increment-typefeedback.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 7476 matching lines...) Expand 10 before | Expand all | Expand 10 after
7487 } 7487 }
7488 Push(number_input); 7488 Push(number_input);
7489 } 7489 }
7490 7490
7491 // The addition has no side effects, so we do not need 7491 // The addition has no side effects, so we do not need
7492 // to simulate the expression stack after this instruction. 7492 // to simulate the expression stack after this instruction.
7493 // Any later failures deopt to the load of the input or earlier. 7493 // Any later failures deopt to the load of the input or earlier.
7494 HConstant* delta = (expr->op() == Token::INC) 7494 HConstant* delta = (expr->op() == Token::INC)
7495 ? graph()->GetConstant1() 7495 ? graph()->GetConstant1()
7496 : graph()->GetConstantMinus1(); 7496 : graph()->GetConstantMinus1();
7497 HInstruction* instr = Add<HAdd>(Top(), delta); 7497 HInstruction* instr = AddUncasted<HAdd>(Top(), delta);
7498 if (instr->IsAdd()) {
7499 HAdd* add = HAdd::cast(instr);
7500 add->set_observed_input_representation(1, rep);
7501 add->set_observed_input_representation(2, Representation::Smi());
7502 }
7498 instr->SetFlag(HInstruction::kCannotBeTagged); 7503 instr->SetFlag(HInstruction::kCannotBeTagged);
7499 instr->ClearAllSideEffects(); 7504 instr->ClearAllSideEffects();
7500 return instr; 7505 return instr;
7501 } 7506 }
7502 7507
7503 7508
7504 void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) { 7509 void HOptimizedGraphBuilder::VisitCountOperation(CountOperation* expr) {
7505 ASSERT(!HasStackOverflow()); 7510 ASSERT(!HasStackOverflow());
7506 ASSERT(current_block() != NULL); 7511 ASSERT(current_block() != NULL);
7507 ASSERT(current_block()->HasPredecessor()); 7512 ASSERT(current_block()->HasPredecessor());
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
9849 if (ShouldProduceTraceOutput()) { 9854 if (ShouldProduceTraceOutput()) {
9850 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9855 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9851 } 9856 }
9852 9857
9853 #ifdef DEBUG 9858 #ifdef DEBUG
9854 graph_->Verify(false); // No full verify. 9859 graph_->Verify(false); // No full verify.
9855 #endif 9860 #endif
9856 } 9861 }
9857 9862
9858 } } // namespace v8::internal 9863 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | test/mjsunit/compiler/increment-typefeedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698