| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2417 bool GetJSObjectFieldAccess(HObjectAccess* access) { | 2417 bool GetJSObjectFieldAccess(HObjectAccess* access) { |
| 2418 int offset; | 2418 int offset; |
| 2419 if (Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset)) { | 2419 if (Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset)) { |
| 2420 if (type_->Is(Type::String())) { | 2420 if (type_->Is(Type::String())) { |
| 2421 ASSERT(String::Equals(isolate()->factory()->length_string(), name_)); | 2421 ASSERT(String::Equals(isolate()->factory()->length_string(), name_)); |
| 2422 *access = HObjectAccess::ForStringLength(); | 2422 *access = HObjectAccess::ForStringLength(); |
| 2423 } else if (type_->Is(Type::Array())) { | 2423 } else if (type_->Is(Type::Array())) { |
| 2424 ASSERT(String::Equals(isolate()->factory()->length_string(), name_)); | 2424 ASSERT(String::Equals(isolate()->factory()->length_string(), name_)); |
| 2425 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); | 2425 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); |
| 2426 } else { | 2426 } else { |
| 2427 *access = HObjectAccess::ForMapAndOffset(map(), offset); | 2427 *access = HObjectAccess::ForMapAndOffset(map(), offset, |
| 2428 HObjectAccess::FOR_FIELD); |
| 2428 } | 2429 } |
| 2429 return true; | 2430 return true; |
| 2430 } | 2431 } |
| 2431 return false; | 2432 return false; |
| 2432 } | 2433 } |
| 2433 | 2434 |
| 2434 bool has_holder() { return !holder_.is_null(); } | 2435 bool has_holder() { return !holder_.is_null(); } |
| 2435 bool IsLoad() const { return access_type_ == LOAD; } | 2436 bool IsLoad() const { return access_type_ == LOAD; } |
| 2436 | 2437 |
| 2437 LookupResult* lookup() { return &lookup_; } | 2438 LookupResult* lookup() { return &lookup_; } |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2830 } | 2831 } |
| 2831 | 2832 |
| 2832 private: | 2833 private: |
| 2833 HGraphBuilder* builder_; | 2834 HGraphBuilder* builder_; |
| 2834 }; | 2835 }; |
| 2835 | 2836 |
| 2836 | 2837 |
| 2837 } } // namespace v8::internal | 2838 } } // namespace v8::internal |
| 2838 | 2839 |
| 2839 #endif // V8_HYDROGEN_H_ | 2840 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |