OLD | NEW |
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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 if (getter->IsSpecFunction()) { | 324 if (getter->IsSpecFunction()) { |
325 // TODO(rossberg): nicer would be to cast to some JSCallable here... | 325 // TODO(rossberg): nicer would be to cast to some JSCallable here... |
326 return Object::GetPropertyWithDefinedGetter( | 326 return Object::GetPropertyWithDefinedGetter( |
327 receiver, Handle<JSReceiver>::cast(getter)); | 327 receiver, Handle<JSReceiver>::cast(getter)); |
328 } | 328 } |
329 // Getter is not a function. | 329 // Getter is not a function. |
330 return isolate->factory()->undefined_value(); | 330 return isolate->factory()->undefined_value(); |
331 } | 331 } |
332 | 332 |
333 | 333 |
334 bool AccessorInfo::IsCompatibleReceiverType(Isolate* isolate, | 334 bool AccessorInfo::IsCompatibleReceiverMap(Isolate* isolate, |
335 Handle<AccessorInfo> info, | 335 Handle<AccessorInfo> info, |
336 Handle<HeapType> type) { | 336 Handle<Map> map) { |
337 if (!info->HasExpectedReceiverType()) return true; | 337 if (!info->HasExpectedReceiverType()) return true; |
338 Handle<Map> map = IC::TypeToMap(*type, isolate); | |
339 if (!map->IsJSObjectMap()) return false; | 338 if (!map->IsJSObjectMap()) return false; |
340 return FunctionTemplateInfo::cast(info->expected_receiver_type()) | 339 return FunctionTemplateInfo::cast(info->expected_receiver_type()) |
341 ->IsTemplateFor(*map); | 340 ->IsTemplateFor(*map); |
342 } | 341 } |
343 | 342 |
344 | 343 |
345 MaybeHandle<Object> Object::SetPropertyWithAccessor( | 344 MaybeHandle<Object> Object::SetPropertyWithAccessor( |
346 Handle<Object> receiver, Handle<Name> name, Handle<Object> value, | 345 Handle<Object> receiver, Handle<Name> name, Handle<Object> value, |
347 Handle<JSObject> holder, Handle<Object> structure, | 346 Handle<JSObject> holder, Handle<Object> structure, |
348 LanguageMode language_mode) { | 347 LanguageMode language_mode) { |
(...skipping 16864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17213 CompilationInfo* info) { | 17212 CompilationInfo* info) { |
17214 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17213 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
17215 handle(cell->dependent_code(), info->isolate()), | 17214 handle(cell->dependent_code(), info->isolate()), |
17216 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17215 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
17217 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17216 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
17218 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17217 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
17219 cell, info->zone()); | 17218 cell, info->zone()); |
17220 } | 17219 } |
17221 | 17220 |
17222 } } // namespace v8::internal | 17221 } } // namespace v8::internal |
OLD | NEW |