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

Side by Side Diff: src/objects.cc

Issue 228483005: Bugfix: A TransitionArray can disappear during copy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Missing line. Created 6 years, 8 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
« no previous file with comments | « no previous file | src/transitions.h » ('j') | src/transitions.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 // thread can not get confused with the filler creation. No synchronization 2494 // thread can not get confused with the filler creation. No synchronization
2495 // needed. 2495 // needed.
2496 object->set_map(*new_map); 2496 object->set_map(*new_map);
2497 } 2497 }
2498 2498
2499 2499
2500 Handle<TransitionArray> Map::AddTransition(Handle<Map> map, 2500 Handle<TransitionArray> Map::AddTransition(Handle<Map> map,
2501 Handle<Name> key, 2501 Handle<Name> key,
2502 Handle<Map> target, 2502 Handle<Map> target,
2503 SimpleTransitionFlag flag) { 2503 SimpleTransitionFlag flag) {
2504 if (map->HasTransitionArray()) { 2504 return TransitionArray::AddTransition(map, key, target, flag);
Toon Verwaest 2014/04/10 11:49:28 I presume there's no point anymore to having this
mvstanton 2014/04/10 13:10:45 Yep, bye-bye silly wabbit.
2505 return TransitionArray::CopyInsert(map, key, target);
2506 }
2507 return TransitionArray::NewWith(
2508 flag, key, target, handle(map->GetBackPointer(), map->GetIsolate()));
2509 } 2505 }
2510 2506
2511 2507
2512 void JSObject::GeneralizeFieldRepresentation(Handle<JSObject> object, 2508 void JSObject::GeneralizeFieldRepresentation(Handle<JSObject> object,
2513 int modify_index, 2509 int modify_index,
2514 Representation new_representation, 2510 Representation new_representation,
2515 StoreMode store_mode) { 2511 StoreMode store_mode) {
2516 Handle<Map> new_map = Map::GeneralizeRepresentation( 2512 Handle<Map> new_map = Map::GeneralizeRepresentation(
2517 handle(object->map()), modify_index, new_representation, store_mode); 2513 handle(object->map()), modify_index, new_representation, store_mode);
2518 if (object->map() == *new_map) return; 2514 if (object->map() == *new_map) return;
(...skipping 14112 matching lines...) Expand 10 before | Expand all | Expand 10 after
16631 #define ERROR_MESSAGES_TEXTS(C, T) T, 16627 #define ERROR_MESSAGES_TEXTS(C, T) T,
16632 static const char* error_messages_[] = { 16628 static const char* error_messages_[] = {
16633 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16629 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16634 }; 16630 };
16635 #undef ERROR_MESSAGES_TEXTS 16631 #undef ERROR_MESSAGES_TEXTS
16636 return error_messages_[reason]; 16632 return error_messages_[reason];
16637 } 16633 }
16638 16634
16639 16635
16640 } } // namespace v8::internal 16636 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/transitions.h » ('j') | src/transitions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698