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

Side by Side Diff: src/objects.cc

Issue 670703002: Remove unused IsDirty (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/objects.h ('k') | no next file » | no next file with comments »
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 // 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 NameDictionary::Shrink(dictionary, name); 724 NameDictionary::Shrink(dictionary, name);
725 object->set_properties(*new_properties); 725 object->set_properties(*new_properties);
726 } 726 }
727 return deleted; 727 return deleted;
728 } 728 }
729 } 729 }
730 return isolate->factory()->true_value(); 730 return isolate->factory()->true_value();
731 } 731 }
732 732
733 733
734 bool JSObject::IsDirty() {
735 Object* cons_obj = map()->constructor();
736 if (!cons_obj->IsJSFunction())
737 return true;
738 JSFunction* fun = JSFunction::cast(cons_obj);
739 if (!fun->shared()->IsApiFunction())
740 return true;
741 // If the object is fully fast case and has the same map it was
742 // created with then no changes can have been made to it.
743 return map() != fun->initial_map()
744 || !HasFastObjectElements()
745 || !HasFastProperties();
746 }
747
748
749 MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate, 734 MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate,
750 Handle<Object> object, 735 Handle<Object> object,
751 Handle<Object> receiver, 736 Handle<Object> receiver,
752 uint32_t index) { 737 uint32_t index) {
753 if (object->IsUndefined()) { 738 if (object->IsUndefined()) {
754 // TODO(verwaest): Why is this check here? 739 // TODO(verwaest): Why is this check here?
755 UNREACHABLE(); 740 UNREACHABLE();
756 return isolate->factory()->undefined_value(); 741 return isolate->factory()->undefined_value();
757 } 742 }
758 743
(...skipping 15725 matching lines...) Expand 10 before | Expand all | Expand 10 after
16484 Handle<DependentCode> codes = 16469 Handle<DependentCode> codes =
16485 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16470 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16486 DependentCode::kPropertyCellChangedGroup, 16471 DependentCode::kPropertyCellChangedGroup,
16487 info->object_wrapper()); 16472 info->object_wrapper());
16488 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16473 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16489 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16474 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16490 cell, info->zone()); 16475 cell, info->zone());
16491 } 16476 }
16492 16477
16493 } } // namespace v8::internal 16478 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698