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

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

Issue 23198002: Fix Crankshafted CompareNil of constant values (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix both uses of handle_ 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 | « no previous file | test/mjsunit/constant-compare-nil-value.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 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 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3223 // Default arguments to is_not_in_new_space depend on this heap number 3223 // Default arguments to is_not_in_new_space depend on this heap number
3224 // to be tenured so that it's guaranteed not be be located in new space. 3224 // to be tenured so that it's guaranteed not be be located in new space.
3225 handle_ = factory->NewNumber(double_value_, TENURED); 3225 handle_ = factory->NewNumber(double_value_, TENURED);
3226 } 3226 }
3227 AllowDeferredHandleDereference smi_check; 3227 AllowDeferredHandleDereference smi_check;
3228 ASSERT(has_int32_value_ || !handle_->IsSmi()); 3228 ASSERT(has_int32_value_ || !handle_->IsSmi());
3229 return handle_; 3229 return handle_;
3230 } 3230 }
3231 3231
3232 bool InstanceOf(Handle<Map> map) { 3232 bool InstanceOf(Handle<Map> map) {
3233 return handle_->IsJSObject() && 3233 return handle()->IsJSObject() &&
3234 Handle<JSObject>::cast(handle_)->map() == *map; 3234 Handle<JSObject>::cast(handle())->map() == *map;
3235 } 3235 }
3236 3236
3237 bool IsSpecialDouble() const { 3237 bool IsSpecialDouble() const {
3238 return has_double_value_ && 3238 return has_double_value_ &&
3239 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || 3239 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) ||
3240 FixedDoubleArray::is_the_hole_nan(double_value_) || 3240 FixedDoubleArray::is_the_hole_nan(double_value_) ||
3241 std::isnan(double_value_)); 3241 std::isnan(double_value_));
3242 } 3242 }
3243 3243
3244 bool NotInNewSpace() const { 3244 bool NotInNewSpace() const {
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after
6787 virtual bool IsDeletable() const { return true; } 6787 virtual bool IsDeletable() const { return true; }
6788 }; 6788 };
6789 6789
6790 6790
6791 #undef DECLARE_INSTRUCTION 6791 #undef DECLARE_INSTRUCTION
6792 #undef DECLARE_CONCRETE_INSTRUCTION 6792 #undef DECLARE_CONCRETE_INSTRUCTION
6793 6793
6794 } } // namespace v8::internal 6794 } } // namespace v8::internal
6795 6795
6796 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6796 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/constant-compare-nil-value.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698