| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 11595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11606 EnsureElementsMode mode) { | 11606 EnsureElementsMode mode) { |
| 11607 // Elements in |Arguments| are ordered backwards (because they're on the | 11607 // Elements in |Arguments| are ordered backwards (because they're on the |
| 11608 // stack), but the method that's called here iterates over them in forward | 11608 // stack), but the method that's called here iterates over them in forward |
| 11609 // direction. | 11609 // direction. |
| 11610 return EnsureCanContainElements( | 11610 return EnsureCanContainElements( |
| 11611 args->arguments() - first_arg - (arg_count - 1), | 11611 args->arguments() - first_arg - (arg_count - 1), |
| 11612 arg_count, mode); | 11612 arg_count, mode); |
| 11613 } | 11613 } |
| 11614 | 11614 |
| 11615 | 11615 |
| 11616 PropertyType JSObject::GetLocalPropertyType(Name* name) { | |
| 11617 uint32_t index = 0; | |
| 11618 if (name->AsArrayIndex(&index)) { | |
| 11619 return GetLocalElementType(index); | |
| 11620 } | |
| 11621 LookupResult lookup(GetIsolate()); | |
| 11622 LocalLookup(name, &lookup, true); | |
| 11623 return lookup.type(); | |
| 11624 } | |
| 11625 | |
| 11626 | |
| 11627 PropertyType JSObject::GetLocalElementType(uint32_t index) { | |
| 11628 return GetElementsAccessor()->GetType(this, this, index); | |
| 11629 } | |
| 11630 | |
| 11631 | |
| 11632 AccessorPair* JSObject::GetLocalPropertyAccessorPair(Name* name) { | 11616 AccessorPair* JSObject::GetLocalPropertyAccessorPair(Name* name) { |
| 11633 uint32_t index = 0; | 11617 uint32_t index = 0; |
| 11634 if (name->AsArrayIndex(&index)) { | 11618 if (name->AsArrayIndex(&index)) { |
| 11635 return GetLocalElementAccessorPair(index); | 11619 return GetLocalElementAccessorPair(index); |
| 11636 } | 11620 } |
| 11637 | 11621 |
| 11638 LookupResult lookup(GetIsolate()); | 11622 LookupResult lookup(GetIsolate()); |
| 11639 LocalLookupRealNamedProperty(name, &lookup); | 11623 LocalLookupRealNamedProperty(name, &lookup); |
| 11640 | 11624 |
| 11641 if (lookup.IsPropertyCallbacks() && | 11625 if (lookup.IsPropertyCallbacks() && |
| (...skipping 4537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16179 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16163 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16180 static const char* error_messages_[] = { | 16164 static const char* error_messages_[] = { |
| 16181 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16165 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16182 }; | 16166 }; |
| 16183 #undef ERROR_MESSAGES_TEXTS | 16167 #undef ERROR_MESSAGES_TEXTS |
| 16184 return error_messages_[reason]; | 16168 return error_messages_[reason]; |
| 16185 } | 16169 } |
| 16186 | 16170 |
| 16187 | 16171 |
| 16188 } } // namespace v8::internal | 16172 } } // namespace v8::internal |
| OLD | NEW |