OLD | NEW |
---|---|
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 2271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2282 | 2282 |
2283 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps) | 2283 DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps) |
2284 | 2284 |
2285 virtual Representation RequiredInputRepresentation(int index) { | 2285 virtual Representation RequiredInputRepresentation(int index) { |
2286 return Representation::None(); | 2286 return Representation::None(); |
2287 } | 2287 } |
2288 | 2288 |
2289 virtual void PrintDataTo(StringStream* stream); | 2289 virtual void PrintDataTo(StringStream* stream); |
2290 | 2290 |
2291 virtual intptr_t Hashcode() { | 2291 virtual intptr_t Hashcode() { |
2292 ASSERT(!HEAP->IsAllocationAllowed()); | |
Yang
2012/07/19 12:47:30
It would be great if we could distinguish between
sanjoy
2012/07/19 15:06:09
We can't leave in the checks as-is since the JS th
| |
2293 intptr_t hash = reinterpret_cast<intptr_t>(*prototype()); | 2292 intptr_t hash = reinterpret_cast<intptr_t>(*prototype()); |
2294 hash = 17 * hash + reinterpret_cast<intptr_t>(*holder()); | 2293 hash = 17 * hash + reinterpret_cast<intptr_t>(*holder()); |
2295 return hash; | 2294 return hash; |
2296 } | 2295 } |
2297 | 2296 |
2298 protected: | 2297 protected: |
2299 virtual bool DataEquals(HValue* other) { | 2298 virtual bool DataEquals(HValue* other) { |
2300 HCheckPrototypeMaps* b = HCheckPrototypeMaps::cast(other); | 2299 HCheckPrototypeMaps* b = HCheckPrototypeMaps::cast(other); |
2301 return prototype_.is_identical_to(b->prototype()) && | 2300 return prototype_.is_identical_to(b->prototype()) && |
2302 holder_.is_identical_to(b->holder()); | 2301 holder_.is_identical_to(b->holder()); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2528 ASSERT(HasNumberValue()); | 2527 ASSERT(HasNumberValue()); |
2529 // Irrespective of whether a numeric HConstant can be safely | 2528 // Irrespective of whether a numeric HConstant can be safely |
2530 // represented as an int32, we store the (in some cases lossy) | 2529 // represented as an int32, we store the (in some cases lossy) |
2531 // representation of the number in int32_value_. | 2530 // representation of the number in int32_value_. |
2532 return int32_value_; | 2531 return int32_value_; |
2533 } | 2532 } |
2534 | 2533 |
2535 bool ToBoolean(); | 2534 bool ToBoolean(); |
2536 | 2535 |
2537 virtual intptr_t Hashcode() { | 2536 virtual intptr_t Hashcode() { |
2538 ASSERT(!HEAP->allow_allocation(false)); | |
2539 intptr_t hash; | 2537 intptr_t hash; |
2540 | 2538 |
2541 if (has_int32_value_) { | 2539 if (has_int32_value_) { |
2542 hash = static_cast<intptr_t>(int32_value_); | 2540 hash = static_cast<intptr_t>(int32_value_); |
2543 } else if (has_double_value_) { | 2541 } else if (has_double_value_) { |
2544 hash = static_cast<intptr_t>(BitCast<int64_t>(double_value_)); | 2542 hash = static_cast<intptr_t>(BitCast<int64_t>(double_value_)); |
2545 } else { | 2543 } else { |
2546 ASSERT(!handle_.is_null()); | 2544 ASSERT(!handle_.is_null()); |
2547 hash = reinterpret_cast<intptr_t>(*handle_); | 2545 hash = reinterpret_cast<intptr_t>(*handle_); |
2548 } | 2546 } |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3633 SetFlag(kUseGVN); | 3631 SetFlag(kUseGVN); |
3634 SetGVNFlag(kDependsOnGlobalVars); | 3632 SetGVNFlag(kDependsOnGlobalVars); |
3635 } | 3633 } |
3636 | 3634 |
3637 Handle<JSGlobalPropertyCell> cell() const { return cell_; } | 3635 Handle<JSGlobalPropertyCell> cell() const { return cell_; } |
3638 bool RequiresHoleCheck(); | 3636 bool RequiresHoleCheck(); |
3639 | 3637 |
3640 virtual void PrintDataTo(StringStream* stream); | 3638 virtual void PrintDataTo(StringStream* stream); |
3641 | 3639 |
3642 virtual intptr_t Hashcode() { | 3640 virtual intptr_t Hashcode() { |
3643 ASSERT(!HEAP->allow_allocation(false)); | |
3644 return reinterpret_cast<intptr_t>(*cell_); | 3641 return reinterpret_cast<intptr_t>(*cell_); |
3645 } | 3642 } |
3646 | 3643 |
3647 virtual Representation RequiredInputRepresentation(int index) { | 3644 virtual Representation RequiredInputRepresentation(int index) { |
3648 return Representation::None(); | 3645 return Representation::None(); |
3649 } | 3646 } |
3650 | 3647 |
3651 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) | 3648 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) |
3652 | 3649 |
3653 protected: | 3650 protected: |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5150 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5147 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5151 }; | 5148 }; |
5152 | 5149 |
5153 | 5150 |
5154 #undef DECLARE_INSTRUCTION | 5151 #undef DECLARE_INSTRUCTION |
5155 #undef DECLARE_CONCRETE_INSTRUCTION | 5152 #undef DECLARE_CONCRETE_INSTRUCTION |
5156 | 5153 |
5157 } } // namespace v8::internal | 5154 } } // namespace v8::internal |
5158 | 5155 |
5159 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5156 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |