OLD | NEW |
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 15832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15843 | 15843 |
15844 MaybeObject* PropertyCell::SetValueInferType(Object* value, | 15844 MaybeObject* PropertyCell::SetValueInferType(Object* value, |
15845 WriteBarrierMode ignored) { | 15845 WriteBarrierMode ignored) { |
15846 set_value(value, ignored); | 15846 set_value(value, ignored); |
15847 if (!Type::Any()->Is(type())) { | 15847 if (!Type::Any()->Is(type())) { |
15848 IdempotentPointerToHandleCodeTrampoline trampoline(GetIsolate()); | 15848 IdempotentPointerToHandleCodeTrampoline trampoline(GetIsolate()); |
15849 MaybeObject* maybe_type = trampoline.CallWithReturnValue( | 15849 MaybeObject* maybe_type = trampoline.CallWithReturnValue( |
15850 &PropertyCell::UpdateType, | 15850 &PropertyCell::UpdateType, |
15851 Handle<PropertyCell>(this), | 15851 Handle<PropertyCell>(this), |
15852 Handle<Object>(value, GetIsolate())); | 15852 Handle<Object>(value, GetIsolate())); |
15853 Type* new_type; | 15853 Type* new_type = NULL; |
15854 if (maybe_type->To(&new_type)) return maybe_type; | 15854 if (maybe_type->To(&new_type)) return maybe_type; |
15855 set_type(new_type); | 15855 set_type(new_type); |
15856 } | 15856 } |
15857 return value; | 15857 return value; |
15858 } | 15858 } |
15859 | 15859 |
15860 | 15860 |
15861 void PropertyCell::AddDependentCompilationInfo(CompilationInfo* info) { | 15861 void PropertyCell::AddDependentCompilationInfo(CompilationInfo* info) { |
15862 Handle<DependentCode> dep(dependent_code()); | 15862 Handle<DependentCode> dep(dependent_code()); |
15863 Handle<DependentCode> codes = | 15863 Handle<DependentCode> codes = |
15864 DependentCode::Insert(dep, DependentCode::kPropertyCellChangedGroup, | 15864 DependentCode::Insert(dep, DependentCode::kPropertyCellChangedGroup, |
15865 info->object_wrapper()); | 15865 info->object_wrapper()); |
15866 if (*codes != dependent_code()) set_dependent_code(*codes); | 15866 if (*codes != dependent_code()) set_dependent_code(*codes); |
15867 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 15867 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
15868 Handle<HeapObject>(this), info->zone()); | 15868 Handle<HeapObject>(this), info->zone()); |
15869 } | 15869 } |
15870 | 15870 |
15871 | 15871 |
15872 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15872 void PropertyCell::AddDependentCode(Handle<Code> code) { |
15873 Handle<DependentCode> codes = DependentCode::Insert( | 15873 Handle<DependentCode> codes = DependentCode::Insert( |
15874 Handle<DependentCode>(dependent_code()), | 15874 Handle<DependentCode>(dependent_code()), |
15875 DependentCode::kPropertyCellChangedGroup, code); | 15875 DependentCode::kPropertyCellChangedGroup, code); |
15876 if (*codes != dependent_code()) set_dependent_code(*codes); | 15876 if (*codes != dependent_code()) set_dependent_code(*codes); |
15877 } | 15877 } |
15878 | 15878 |
15879 | 15879 |
15880 } } // namespace v8::internal | 15880 } } // namespace v8::internal |
OLD | NEW |