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

Side by Side Diff: src/heap.cc

Issue 15681004: Revert "Make Object.freeze fast" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2946 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 2957
2958 // Allocate object to hold object observation state. 2958 // Allocate object to hold object observation state.
2959 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 2959 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2960 if (!maybe_obj->ToObject(&obj)) return false; 2960 if (!maybe_obj->ToObject(&obj)) return false;
2961 } 2961 }
2962 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); 2962 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj));
2963 if (!maybe_obj->ToObject(&obj)) return false; 2963 if (!maybe_obj->ToObject(&obj)) return false;
2964 } 2964 }
2965 set_observation_state(JSObject::cast(obj)); 2965 set_observation_state(JSObject::cast(obj));
2966 2966
2967 { MaybeObject* maybe_obj = AllocateSymbol();
2968 if (!maybe_obj->ToObject(&obj)) return false;
2969 }
2970 set_frozen_symbol(Symbol::cast(obj));
2971
2972 { MaybeObject* maybe_obj = SeededNumberDictionary::Allocate(this, 0, TENURED);
2973 if (!maybe_obj->ToObject(&obj)) return false;
2974 }
2975 SeededNumberDictionary::cast(obj)->set_requires_slow_elements();
2976 set_empty_slow_element_dictionary(SeededNumberDictionary::cast(obj));
2977
2978 // Handling of script id generation is in FACTORY->NewScript. 2967 // Handling of script id generation is in FACTORY->NewScript.
2979 set_last_script_id(undefined_value()); 2968 set_last_script_id(undefined_value());
2980 2969
2981 // Initialize keyed lookup cache. 2970 // Initialize keyed lookup cache.
2982 isolate_->keyed_lookup_cache()->Clear(); 2971 isolate_->keyed_lookup_cache()->Clear();
2983 2972
2984 // Initialize context slot cache. 2973 // Initialize context slot cache.
2985 isolate_->context_slot_cache()->Clear(); 2974 isolate_->context_slot_cache()->Clear();
2986 2975
2987 // Initialize descriptor cache. 2976 // Initialize descriptor cache.
(...skipping 4966 matching lines...) Expand 10 before | Expand all | Expand 10 after
7954 if (FLAG_parallel_recompilation) { 7943 if (FLAG_parallel_recompilation) {
7955 heap_->relocation_mutex_->Lock(); 7944 heap_->relocation_mutex_->Lock();
7956 #ifdef DEBUG 7945 #ifdef DEBUG
7957 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7946 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7958 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7947 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7959 #endif // DEBUG 7948 #endif // DEBUG
7960 } 7949 }
7961 } 7950 }
7962 7951
7963 } } // namespace v8::internal 7952 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698