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 11800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11811 // map go generic. | 11811 // map go generic. |
11812 object->GetHeap()->ClearAllICsByKind(Code::KEYED_STORE_IC); | 11812 object->GetHeap()->ClearAllICsByKind(Code::KEYED_STORE_IC); |
11813 } | 11813 } |
11814 | 11814 |
11815 heap->ClearInstanceofCache(); | 11815 heap->ClearInstanceofCache(); |
11816 ASSERT(size == object->Size()); | 11816 ASSERT(size == object->Size()); |
11817 return value; | 11817 return value; |
11818 } | 11818 } |
11819 | 11819 |
11820 | 11820 |
11821 // TODO(ishell): temporary wrapper until handilfied. | |
11822 // static | |
11823 void JSObject::EnsureCanContainElements(Handle<JSObject> object, | 11821 void JSObject::EnsureCanContainElements(Handle<JSObject> object, |
11824 Arguments* args, | 11822 Arguments* args, |
11825 uint32_t first_arg, | 11823 uint32_t first_arg, |
11826 uint32_t arg_count, | 11824 uint32_t arg_count, |
11827 EnsureElementsMode mode) { | 11825 EnsureElementsMode mode) { |
11828 CALL_HEAP_FUNCTION_VOID(object->GetIsolate(), | |
11829 object->EnsureCanContainElements(args, | |
11830 first_arg, | |
11831 arg_count, | |
11832 mode)); | |
11833 } | |
11834 | |
11835 | |
11836 MaybeObject* JSObject::EnsureCanContainElements(Arguments* args, | |
11837 uint32_t first_arg, | |
11838 uint32_t arg_count, | |
11839 EnsureElementsMode mode) { | |
11840 // Elements in |Arguments| are ordered backwards (because they're on the | 11826 // Elements in |Arguments| are ordered backwards (because they're on the |
11841 // stack), but the method that's called here iterates over them in forward | 11827 // stack), but the method that's called here iterates over them in forward |
11842 // direction. | 11828 // direction. |
11843 return EnsureCanContainElements( | 11829 return EnsureCanContainElements( |
11844 args->arguments() - first_arg - (arg_count - 1), | 11830 object, args->arguments() - first_arg - (arg_count - 1), arg_count, mode); |
11845 arg_count, mode); | |
11846 } | 11831 } |
11847 | 11832 |
11848 | 11833 |
11849 AccessorPair* JSObject::GetLocalPropertyAccessorPair(Name* name) { | 11834 AccessorPair* JSObject::GetLocalPropertyAccessorPair(Name* name) { |
11850 uint32_t index = 0; | 11835 uint32_t index = 0; |
11851 if (name->AsArrayIndex(&index)) { | 11836 if (name->AsArrayIndex(&index)) { |
11852 return GetLocalElementAccessorPair(index); | 11837 return GetLocalElementAccessorPair(index); |
11853 } | 11838 } |
11854 | 11839 |
11855 LookupResult lookup(GetIsolate()); | 11840 LookupResult lookup(GetIsolate()); |
(...skipping 4578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16434 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16419 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16435 static const char* error_messages_[] = { | 16420 static const char* error_messages_[] = { |
16436 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16421 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16437 }; | 16422 }; |
16438 #undef ERROR_MESSAGES_TEXTS | 16423 #undef ERROR_MESSAGES_TEXTS |
16439 return error_messages_[reason]; | 16424 return error_messages_[reason]; |
16440 } | 16425 } |
16441 | 16426 |
16442 | 16427 |
16443 } } // namespace v8::internal | 16428 } } // namespace v8::internal |
OLD | NEW |