Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(574)

Side by Side Diff: src/objects.cc

Issue 254763007: Introduce DisallowDeoptimization scope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 proto_map = Handle<Map>(holder->map()); 2774 proto_map = Handle<Map>(holder->map());
2775 } 2775 }
2776 } 2776 }
2777 return CurrentMapForDeprecatedInternal(map); 2777 return CurrentMapForDeprecatedInternal(map);
2778 } 2778 }
2779 2779
2780 2780
2781 // static 2781 // static
2782 MaybeHandle<Map> Map::CurrentMapForDeprecatedInternal(Handle<Map> old_map) { 2782 MaybeHandle<Map> Map::CurrentMapForDeprecatedInternal(Handle<Map> old_map) {
2783 DisallowHeapAllocation no_allocation; 2783 DisallowHeapAllocation no_allocation;
2784 DisallowDeoptimization no_deoptimization(old_map->GetIsolate());
2784 2785
2785 if (!old_map->is_deprecated()) return old_map; 2786 if (!old_map->is_deprecated()) return old_map;
2786 2787
2787 // Check the state of the root map. 2788 // Check the state of the root map.
2788 Map* root_map = old_map->FindRootMap(); 2789 Map* root_map = old_map->FindRootMap();
2789 if (!old_map->EquivalentToForTransition(root_map)) return MaybeHandle<Map>(); 2790 if (!old_map->EquivalentToForTransition(root_map)) return MaybeHandle<Map>();
2790 int root_nof = root_map->NumberOfOwnDescriptors(); 2791 int root_nof = root_map->NumberOfOwnDescriptors();
2791 2792
2792 int old_nof = old_map->NumberOfOwnDescriptors(); 2793 int old_nof = old_map->NumberOfOwnDescriptors();
2793 DescriptorArray* old_descriptors = old_map->instance_descriptors(); 2794 DescriptorArray* old_descriptors = old_map->instance_descriptors();
(...skipping 14545 matching lines...) Expand 10 before | Expand all | Expand 10 after
17339 #define ERROR_MESSAGES_TEXTS(C, T) T, 17340 #define ERROR_MESSAGES_TEXTS(C, T) T,
17340 static const char* error_messages_[] = { 17341 static const char* error_messages_[] = {
17341 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17342 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17342 }; 17343 };
17343 #undef ERROR_MESSAGES_TEXTS 17344 #undef ERROR_MESSAGES_TEXTS
17344 return error_messages_[reason]; 17345 return error_messages_[reason];
17345 } 17346 }
17346 17347
17347 17348
17348 } } // namespace v8::internal 17349 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assert-scope.h ('k') | src/objects-inl.h » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698