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

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

Issue 16026023: Avoid Unnecessary Smi Checks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review Created 7 years, 5 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/ia32/lithium-codegen-ia32.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 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 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 HType HCheckMaps::CalculateInferredType() { 3058 HType HCheckMaps::CalculateInferredType() {
3059 return value()->type(); 3059 return value()->type();
3060 } 3060 }
3061 3061
3062 3062
3063 HType HCheckFunction::CalculateInferredType() { 3063 HType HCheckFunction::CalculateInferredType() {
3064 return value()->type(); 3064 return value()->type();
3065 } 3065 }
3066 3066
3067 3067
3068 HType HCheckNonSmi::CalculateInferredType() { 3068 HType HCheckHeapObject::CalculateInferredType() {
3069 // TODO(kasperl): Is there any way to signal that this isn't a smi? 3069 return HType::NonPrimitive();
3070 return HType::Tagged();
3071 } 3070 }
3072 3071
3073 3072
3074 HType HPhi::CalculateInferredType() { 3073 HType HPhi::CalculateInferredType() {
3075 HType result = HType::Uninitialized(); 3074 HType result = HType::Uninitialized();
3076 for (int i = 0; i < OperandCount(); ++i) { 3075 for (int i = 0; i < OperandCount(); ++i) {
3077 HType current = OperandAt(i)->type(); 3076 HType current = OperandAt(i)->type();
3078 result = result.Combine(current); 3077 result = result.Combine(current);
3079 } 3078 }
3080 return result; 3079 return result;
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
3729 } 3728 }
3730 } 3729 }
3731 3730
3732 3731
3733 void HSimulate::Verify() { 3732 void HSimulate::Verify() {
3734 HInstruction::Verify(); 3733 HInstruction::Verify();
3735 ASSERT(HasAstId()); 3734 ASSERT(HasAstId());
3736 } 3735 }
3737 3736
3738 3737
3739 void HCheckNonSmi::Verify() { 3738 void HCheckHeapObject::Verify() {
3740 HInstruction::Verify(); 3739 HInstruction::Verify();
3741 ASSERT(HasNoUses()); 3740 ASSERT(HasNoUses());
3742 } 3741 }
3743 3742
3744 3743
3745 void HCheckFunction::Verify() { 3744 void HCheckFunction::Verify() {
3746 HInstruction::Verify(); 3745 HInstruction::Verify();
3747 ASSERT(HasNoUses()); 3746 ASSERT(HasNoUses());
3748 } 3747 }
3749 3748
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3879 case kBackingStore: 3878 case kBackingStore:
3880 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString()); 3879 if (!name_.is_null()) stream->Add(*String::cast(*name_)->ToCString());
3881 stream->Add("[backing-store]"); 3880 stream->Add("[backing-store]");
3882 break; 3881 break;
3883 } 3882 }
3884 3883
3885 stream->Add("@%d", offset()); 3884 stream->Add("@%d", offset());
3886 } 3885 }
3887 3886
3888 } } // namespace v8::internal 3887 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698