| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 9859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9870 ASSERT(shrink_by % kEntryLength == 0); | 9870 ASSERT(shrink_by % kEntryLength == 0); |
| 9871 ASSERT(shrink_by <= code_map->length() - kEntriesStart); | 9871 ASSERT(shrink_by <= code_map->length() - kEntriesStart); |
| 9872 // Always trim even when array is cleared because of heap verifier. | 9872 // Always trim even when array is cleared because of heap verifier. |
| 9873 RightTrimFixedArray<Heap::FROM_GC>(GetHeap(), code_map, shrink_by); | 9873 RightTrimFixedArray<Heap::FROM_GC>(GetHeap(), code_map, shrink_by); |
| 9874 if (code_map->length() == kEntriesStart) { | 9874 if (code_map->length() == kEntriesStart) { |
| 9875 ClearOptimizedCodeMap(); | 9875 ClearOptimizedCodeMap(); |
| 9876 } | 9876 } |
| 9877 } | 9877 } |
| 9878 | 9878 |
| 9879 | 9879 |
| 9880 bool SharedFunctionInfo::CanHandleArgumentsSafely() { |
| 9881 if (!HasBuiltinFunctionId()) return false; |
| 9882 switch (builtin_function_id()) { |
| 9883 default: return false; |
| 9884 } |
| 9885 UNREACHABLE(); |
| 9886 } |
| 9887 |
| 9888 |
| 9880 void JSObject::OptimizeAsPrototype(Handle<JSObject> object) { | 9889 void JSObject::OptimizeAsPrototype(Handle<JSObject> object) { |
| 9881 if (object->IsGlobalObject()) return; | 9890 if (object->IsGlobalObject()) return; |
| 9882 | 9891 |
| 9883 // Make sure prototypes are fast objects and their maps have the bit set | 9892 // Make sure prototypes are fast objects and their maps have the bit set |
| 9884 // so they remain fast. | 9893 // so they remain fast. |
| 9885 if (!object->HasFastProperties()) { | 9894 if (!object->HasFastProperties()) { |
| 9886 TransformToFastProperties(object, 0); | 9895 TransformToFastProperties(object, 0); |
| 9887 } | 9896 } |
| 9888 } | 9897 } |
| 9889 | 9898 |
| (...skipping 7064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16954 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16963 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16955 static const char* error_messages_[] = { | 16964 static const char* error_messages_[] = { |
| 16956 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16965 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16957 }; | 16966 }; |
| 16958 #undef ERROR_MESSAGES_TEXTS | 16967 #undef ERROR_MESSAGES_TEXTS |
| 16959 return error_messages_[reason]; | 16968 return error_messages_[reason]; |
| 16960 } | 16969 } |
| 16961 | 16970 |
| 16962 | 16971 |
| 16963 } } // namespace v8::internal | 16972 } } // namespace v8::internal |
| OLD | NEW |