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

Side by Side Diff: src/objects.cc

Issue 18751003: Calls to HCheckFunction can be eliminated if the value is an HConstant (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed two issues Created 7 years, 5 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/hydrogen-instructions.cc ('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 // 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 15818 matching lines...) Expand 10 before | Expand all | Expand 10 after
15829 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { 15829 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
15830 ASSERT(IsPropertyCell()); 15830 ASSERT(IsPropertyCell());
15831 set_type_raw(type, ignored); 15831 set_type_raw(type, ignored);
15832 } 15832 }
15833 15833
15834 15834
15835 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell, 15835 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell,
15836 Handle<Object> value) { 15836 Handle<Object> value) {
15837 Isolate* isolate = cell->GetIsolate(); 15837 Isolate* isolate = cell->GetIsolate();
15838 Handle<Type> old_type(cell->type(), isolate); 15838 Handle<Type> old_type(cell->type(), isolate);
15839 Handle<Type> new_type((value->IsSmi() || value->IsUndefined()) 15839 Handle<Type> new_type((value->IsSmi() || value->IsJSFunction() ||
15840 value->IsUndefined())
15840 ? Type::Constant(value, isolate) 15841 ? Type::Constant(value, isolate)
15841 : Type::Any(), isolate); 15842 : Type::Any(), isolate);
15842 15843
15843 if (new_type->Is(old_type)) { 15844 if (new_type->Is(old_type)) {
15844 return *old_type; 15845 return *old_type;
15845 } 15846 }
15846 15847
15847 cell->dependent_code()->DeoptimizeDependentCodeGroup( 15848 cell->dependent_code()->DeoptimizeDependentCodeGroup(
15848 isolate, DependentCode::kPropertyCellChangedGroup); 15849 isolate, DependentCode::kPropertyCellChangedGroup);
15849 15850
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
15885 15886
15886 void PropertyCell::AddDependentCode(Handle<Code> code) { 15887 void PropertyCell::AddDependentCode(Handle<Code> code) {
15887 Handle<DependentCode> codes = DependentCode::Insert( 15888 Handle<DependentCode> codes = DependentCode::Insert(
15888 Handle<DependentCode>(dependent_code()), 15889 Handle<DependentCode>(dependent_code()),
15889 DependentCode::kPropertyCellChangedGroup, code); 15890 DependentCode::kPropertyCellChangedGroup, code);
15890 if (*codes != dependent_code()) set_dependent_code(*codes); 15891 if (*codes != dependent_code()) set_dependent_code(*codes);
15891 } 15892 }
15892 15893
15893 15894
15894 } } // namespace v8::internal 15895 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698