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

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

Issue 23203002: Make HConstant::InstanceOf less ambiguous. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. 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 | src/hydrogen-instructions.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 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 SetFlag(kUseGVN); 2598 SetFlag(kUseGVN);
2599 SetFlag(kTrackSideEffectDominators); 2599 SetFlag(kTrackSideEffectDominators);
2600 SetGVNFlag(kDependsOnMaps); 2600 SetGVNFlag(kDependsOnMaps);
2601 SetGVNFlag(kDependsOnElementsKind); 2601 SetGVNFlag(kDependsOnElementsKind);
2602 } 2602 }
2603 2603
2604 void omit(CompilationInfo* info) { 2604 void omit(CompilationInfo* info) {
2605 omit_ = true; 2605 omit_ = true;
2606 for (int i = 0; i < map_set_.length(); i++) { 2606 for (int i = 0; i < map_set_.length(); i++) {
2607 Handle<Map> map = map_set_.at(i); 2607 Handle<Map> map = map_set_.at(i);
2608 if (!map->CanTransition()) continue;
2608 map->AddDependentCompilationInfo(DependentCode::kPrototypeCheckGroup, 2609 map->AddDependentCompilationInfo(DependentCode::kPrototypeCheckGroup,
2609 info); 2610 info);
2610 } 2611 }
2611 } 2612 }
2612 2613
2613 bool omit_; 2614 bool omit_;
2614 bool has_migration_target_; 2615 bool has_migration_target_;
2615 SmallMapList map_set_; 2616 SmallMapList map_set_;
2616 ZoneList<UniqueValueId> map_unique_ids_; 2617 ZoneList<UniqueValueId> map_unique_ids_;
2617 }; 2618 };
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3222 Factory* factory = Isolate::Current()->factory(); 3223 Factory* factory = Isolate::Current()->factory();
3223 // Default arguments to is_not_in_new_space depend on this heap number 3224 // 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. 3225 // to be tenured so that it's guaranteed not be be located in new space.
3225 handle_ = factory->NewNumber(double_value_, TENURED); 3226 handle_ = factory->NewNumber(double_value_, TENURED);
3226 } 3227 }
3227 AllowDeferredHandleDereference smi_check; 3228 AllowDeferredHandleDereference smi_check;
3228 ASSERT(has_int32_value_ || !handle_->IsSmi()); 3229 ASSERT(has_int32_value_ || !handle_->IsSmi());
3229 return handle_; 3230 return handle_;
3230 } 3231 }
3231 3232
3232 bool InstanceOf(Handle<Map> map) { 3233 bool HasMap(Handle<Map> map) {
3233 Handle<Object> constant_object = handle(); 3234 Handle<Object> constant_object = handle();
3234 return constant_object->IsJSObject() && 3235 return constant_object->IsHeapObject() &&
3235 Handle<JSObject>::cast(constant_object)->map() == *map; 3236 Handle<HeapObject>::cast(constant_object)->map() == *map;
3236 } 3237 }
3237 3238
3238 bool IsSpecialDouble() const { 3239 bool IsSpecialDouble() const {
3239 return has_double_value_ && 3240 return has_double_value_ &&
3240 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) || 3241 (BitCast<int64_t>(double_value_) == BitCast<int64_t>(-0.0) ||
3241 FixedDoubleArray::is_the_hole_nan(double_value_) || 3242 FixedDoubleArray::is_the_hole_nan(double_value_) ||
3242 std::isnan(double_value_)); 3243 std::isnan(double_value_));
3243 } 3244 }
3244 3245
3245 bool NotInNewSpace() const { 3246 bool NotInNewSpace() const {
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after
6788 virtual bool IsDeletable() const { return true; } 6789 virtual bool IsDeletable() const { return true; }
6789 }; 6790 };
6790 6791
6791 6792
6792 #undef DECLARE_INSTRUCTION 6793 #undef DECLARE_INSTRUCTION
6793 #undef DECLARE_CONCRETE_INSTRUCTION 6794 #undef DECLARE_CONCRETE_INSTRUCTION
6794 6795
6795 } } // namespace v8::internal 6796 } } // namespace v8::internal
6796 6797
6797 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6798 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698