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

Unified Diff: src/objects-inl.h

Issue 11293059: Fix slack tracking when instance prototype changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Daniel Clifford. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 4e7d8f8c08702943ef60fb3692b5ceb56482ec5d..afd40821cc8beb258b906fd6b16195987ec9ca3e 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4413,42 +4413,6 @@ void JSFunction::set_initial_map(Map* value) {
}
-MaybeObject* JSFunction::set_initial_map_and_cache_transitions(
- Map* initial_map) {
- Context* native_context = context()->native_context();
- Object* array_function =
- native_context->get(Context::ARRAY_FUNCTION_INDEX);
- if (array_function->IsJSFunction() &&
- this == JSFunction::cast(array_function)) {
- // Replace all of the cached initial array maps in the native context with
- // the appropriate transitioned elements kind maps.
- Heap* heap = GetHeap();
- MaybeObject* maybe_maps =
- heap->AllocateFixedArrayWithHoles(kElementsKindCount);
- FixedArray* maps;
- if (!maybe_maps->To(&maps)) return maybe_maps;
-
- Map* current_map = initial_map;
- ElementsKind kind = current_map->elements_kind();
- ASSERT(kind == GetInitialFastElementsKind());
- maps->set(kind, current_map);
- for (int i = GetSequenceIndexFromFastElementsKind(kind) + 1;
- i < kFastElementsKindCount; ++i) {
- Map* new_map;
- ElementsKind next_kind = GetFastElementsKindFromSequenceIndex(i);
- MaybeObject* maybe_new_map =
- current_map->CopyAsElementsKind(next_kind, INSERT_TRANSITION);
- if (!maybe_new_map->To(&new_map)) return maybe_new_map;
- maps->set(next_kind, new_map);
- current_map = new_map;
- }
- native_context->set_js_array_maps(maps);
- }
- set_initial_map(initial_map);
- return this;
-}
-
-
bool JSFunction::has_initial_map() {
return prototype_or_initial_map()->IsMap();
}
« no previous file with comments | « src/objects.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698