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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 22984009: Merged r16150, r16174, r16175 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 years, 4 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-instructions.h ('k') | src/mips/lithium-codegen-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3617 matching lines...) Expand 10 before | Expand all | Expand 10 after
3628 for (int i = 0; i < OperandCount(); ++i) { 3628 for (int i = 0; i < OperandCount(); ++i) {
3629 HConstant* operand = HConstant::cast(OperandAt(i)); 3629 HConstant* operand = HConstant::cast(OperandAt(i));
3630 if (operand->HasInteger32Value()) { 3630 if (operand->HasInteger32Value()) {
3631 continue; 3631 continue;
3632 } else if (operand->HasDoubleValue()) { 3632 } else if (operand->HasDoubleValue()) {
3633 HConstant* integer_input = 3633 HConstant* integer_input =
3634 new(graph->zone()) HConstant(DoubleToInt32(operand->DoubleValue()), 3634 new(graph->zone()) HConstant(DoubleToInt32(operand->DoubleValue()),
3635 Representation::Integer32()); 3635 Representation::Integer32());
3636 integer_input->InsertAfter(operand); 3636 integer_input->InsertAfter(operand);
3637 SetOperandAt(i, integer_input); 3637 SetOperandAt(i, integer_input);
3638 } else if (operand == graph->GetConstantTrue()) { 3638 } else if (operand->HasBooleanValue()) {
3639 SetOperandAt(i, graph->GetConstant1()); 3639 SetOperandAt(i, operand->BooleanValue() ? graph->GetConstant1()
3640 } else { 3640 : graph->GetConstant0());
3641 // This catches |false|, |undefined|, strings and objects. 3641 } else if (operand->ImmortalImmovable()) {
3642 SetOperandAt(i, graph->GetConstant0()); 3642 SetOperandAt(i, graph->GetConstant0());
3643 } 3643 }
3644 } 3644 }
3645 // Overwrite observed input representations because they are likely Tagged. 3645 // Overwrite observed input representations because they are likely Tagged.
3646 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { 3646 for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
3647 HValue* use = it.value(); 3647 HValue* use = it.value();
3648 if (use->IsBinaryOperation()) { 3648 if (use->IsBinaryOperation()) {
3649 HBinaryOperation::cast(use)->set_observed_input_representation( 3649 HBinaryOperation::cast(use)->set_observed_input_representation(
3650 it.index(), Representation::Integer32()); 3650 it.index(), Representation::Integer32());
3651 } 3651 }
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
3860 case kBackingStore: 3860 case kBackingStore:
3861 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3861 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3862 stream->Add("[backing-store]"); 3862 stream->Add("[backing-store]");
3863 break; 3863 break;
3864 } 3864 }
3865 3865
3866 stream->Add("@%d", offset()); 3866 stream->Add("@%d", offset());
3867 } 3867 }
3868 3868
3869 } } // namespace v8::internal 3869 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698