Lines Matching refs:isolate

68 #define TRACE_GENERIC_IC(isolate, type, reason)                \
72 JavaScriptFrame::PrintTop(isolate, stdout, false, true); \
79 #define TRACE_GENERIC_IC(isolate, type, reason) \
141 IC::IC(FrameDepth depth, Isolate* isolate)
142 : isolate_(isolate), target_set_(false), target_maps_set_(false) {
146 const Address entry = Isolate::c_entry_fp(isolate->thread_local_top());
168 StackFrameIterator it(isolate);
177 isolate);
180 target_ = handle(raw_target(), isolate);
191 StackFrameIterator it(isolate());
202 HandleScope scope(isolate());
203 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate());
210 HandleScope scope(isolate());
211 Handle<SharedFunctionInfo> shared(GetSharedFunctionInfo(), isolate());
254 Handle<Map> receiver_map = TypeToMap(*receiver_type(), isolate());
277 GetICCacheHolder(*receiver_type(), isolate(), &flag));
342 HandleScope scope(isolate());
344 THROW_NEW_ERROR(isolate(), NewTypeError(type, HandleVector(args, 2)), Object);
349 HandleScope scope(isolate());
350 THROW_NEW_ERROR(isolate(), NewReferenceError(type, HandleVector(&name, 1)),
392 void IC::OnTypeFeedbackChanged(Isolate* isolate, Address address,
396 isolate->inner_pointer_to_code_cache()->GetCacheEntry(address)->code;
415 isolate->runtime_profiler()->NotifyICChanged();
427 Isolate* isolate = target->GetHeap()->isolate();
437 OnTypeFeedbackChanged(isolate, address, old_state, new_state,
463 Isolate* isolate = stub->GetIsolate();
464 Heap* heap = isolate->heap();
478 void IC::Clear(Isolate* isolate, Address address,
487 return LoadIC::Clear(isolate, address, target, constant_pool);
489 return KeyedLoadIC::Clear(isolate, address, target, constant_pool);
491 return StoreIC::Clear(isolate, address, target, constant_pool);
493 return KeyedStoreIC::Clear(isolate, address, target, constant_pool);
495 return CallIC::Clear(isolate, address, target, constant_pool);
497 return CompareIC::Clear(isolate, address, target, constant_pool);
511 void KeyedLoadIC::Clear(Isolate* isolate, Address address, Code* target,
517 SetTargetAtAddress(address, *pre_monomorphic_stub(isolate), constant_pool);
521 void CallIC::Clear(Isolate* isolate, Address address, Code* target,
527 void LoadIC::Clear(Isolate* isolate, Address address, Code* target,
530 Code* code = PropertyICCompiler::FindPreMonomorphic(isolate, Code::LOAD_IC,
536 void StoreIC::Clear(Isolate* isolate, Address address, Code* target,
539 Code* code = PropertyICCompiler::FindPreMonomorphic(isolate, Code::STORE_IC,
545 void KeyedStoreIC::Clear(Isolate* isolate, Address address, Code* target,
550 isolate, StoreIC::GetStrictMode(target->extra_ic_state())),
555 void CompareIC::Clear(Isolate* isolate, Address address, Code* target,
558 CompareICStub stub(target->stub_key(), isolate);
561 SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
568 Handle<Code> KeyedLoadIC::generic_stub(Isolate* isolate) {
570 return KeyedLoadGenericStub(isolate).GetCode();
572 return isolate->builtins()->KeyedLoadIC_Generic();
599 set_target(*KeyedLoadIC::generic_stub(isolate()));
601 TRACE_GENERIC_IC(isolate(), "LoadIC", "name as array index");
605 isolate(), result,
606 Runtime::GetElementOrCharAt(isolate(), object, index), Object);
622 ASSIGN_RETURN_ON_EXCEPTION(isolate(), result, Object::GetProperty(&it),
627 LOG(isolate(), SuspectReadEvent(*name, *object));
712 Handle<HeapType> IC::CurrentTypeOf(Handle<Object> object, Isolate* isolate) {
714 ? HeapType::Constant(Handle<JSGlobalObject>::cast(object), isolate)
715 : HeapType::NowOf(object, isolate);
719 Handle<Map> IC::TypeToMap(HeapType* type, Isolate* isolate) {
721 return isolate->factory()->heap_number_map();
722 if (type->Is(HeapType::Boolean())) return isolate->factory()->boolean_map();
815 Handle<Code> LoadIC::initialize_stub(Isolate* isolate,
817 return PropertyICCompiler::ComputeLoad(isolate, UNINITIALIZED, extra_state);
823 MegamorphicLoadStub stub(isolate(), LoadICState(extra_ic_state()));
827 return KeyedLoadIC::generic_stub(isolate());
832 Handle<Code> LoadIC::pre_monomorphic_stub(Isolate* isolate,
834 return PropertyICCompiler::ComputeLoad(isolate, PREMONOMORPHIC, extra_state);
838 Handle<Code> KeyedLoadIC::pre_monomorphic_stub(Isolate* isolate) {
839 return isolate->builtins()->KeyedLoadIC_PreMonomorphic();
845 return LoadIC::pre_monomorphic_stub(isolate(), extra_ic_state());
848 return KeyedLoadIC::pre_monomorphic_stub(isolate());
854 LoadFieldStub stub(isolate(), index);
892 Map* map = *TypeToMap(type, isolate());
893 isolate()->stub_cache()->Set(name, map, code);
902 *receiver_type(), receiver_is_holder, isolate(), &flag);
921 isolate()->stub_cache()->Get(*lookup->name(), map, code->flags());
952 Name::Equals(isolate()->factory()->length_string(), lookup->name())) {
958 Name::Equals(isolate()->factory()->length_string(), lookup->name())) {
959 StringLengthStub string_length_stub(isolate());
965 Name::Equals(isolate()->factory()->prototype_string(), lookup->name()) &&
971 FunctionPrototypeStub function_prototype_stub(isolate());
981 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1010 if (!ExecutableAccessorInfo::IsCompatibleReceiverType(isolate(), info,
1015 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1021 isolate());
1032 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1050 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1058 *type, receiver_is_holder, isolate(), &flag);
1067 return isolate()->builtins()->LoadIC_Normal();
1076 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1084 LoadConstantStub stub(isolate(), lookup->GetConstantIndex());
1087 NamedLoadHandlerCompiler compiler(isolate(), receiver_type(), holder,
1104 static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
1110 key = isolate->factory()->nan_string();
1114 key = Handle<Smi>(Smi::FromInt(int_value), isolate);
1118 key = isolate->factory()->undefined_string();
1125 Handle<Map> receiver_map(receiver->map(), isolate());
1128 target_receiver_maps.Add(isolate()->factory()->string_map());
1156 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "same map added twice");
1163 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "max polymorph exceeded");
1176 isolate(), result, Runtime::GetObjectProperty(isolate(), object, key),
1186 key = TryConvertKey(key, isolate());
1189 ASSIGN_RETURN_ON_EXCEPTION(isolate(), load_handle,
1197 if (!Object::ToSmi(isolate(), key).is_null()) {
1206 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
1214 ASSIGN_RETURN_ON_EXCEPTION(isolate(), result,
1215 Runtime::GetObjectProperty(isolate(), object, key),
1263 PrototypeIterator iter(it->isolate(), receiver);
1288 isolate(), result,
1309 isolate(), result,
1320 isolate(), result,
1332 isolate(), result,
1338 Handle<Code> CallIC::initialize_stub(Isolate* isolate, int argc,
1340 CallICStub stub(isolate, CallICState(argc, call_type));
1346 Handle<Code> StoreIC::initialize_stub(Isolate* isolate,
1350 PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state);
1357 return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC,
1362 return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
1364 return isolate()->builtins()->KeyedStoreIC_Generic();
1372 return PropertyICCompiler::ComputeStore(isolate(), GENERIC,
1377 return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
1379 return isolate()->builtins()->KeyedStoreIC_Generic();
1387 return isolate()->builtins()->StoreIC_Slow();
1390 return isolate()->builtins()->KeyedStoreIC_Slow();
1395 Handle<Code> StoreIC::pre_monomorphic_stub(Isolate* isolate,
1398 return PropertyICCompiler::ComputeStore(isolate, PREMONOMORPHIC, state);
1414 TRACE_GENERIC_IC(isolate(), "StoreIC", "LookupForWrite said 'false'");
1438 TRACE_GENERIC_IC(isolate(), "StoreIC", "transition from slow");
1443 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1449 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1455 TRACE_GENERIC_IC(isolate(), "StoreIC", "accessor on slow map");
1463 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter == 0");
1467 isolate(), info, receiver_type())) {
1468 TRACE_GENERIC_IC(isolate(), "StoreIC", "incompatible receiver type");
1471 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1475 isolate());
1477 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter not a function");
1482 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1493 TRACE_GENERIC_IC(isolate(), "StoreIC", "declared accessor info");
1502 StoreGlobalStub stub(isolate(), union_type->IsConstant(),
1511 return isolate()->builtins()->StoreIC_Normal();
1524 StoreFieldStub stub(isolate(), lookup->GetFieldIndex(),
1528 NamedStoreHandlerCompiler compiler(isolate(), receiver_type(), holder);
1534 TRACE_GENERIC_IC(isolate(), "StoreIC", "constant property");
1553 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "non-NORMAL target type");
1557 Handle<Map> receiver_map(receiver->map(), isolate());
1619 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "same map added twice");
1626 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "max polymorph exceeded");
1637 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "store mode mismatch");
1655 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
1710 Handle<Smi> smi_key = Object::ToSmi(isolate(), key).ToHandleChecked();
1791 isolate(), result, Runtime::SetObjectProperty(isolate(), object, key,
1799 key = TryConvertKey(key, isolate());
1806 isolate(), store_handle,
1812 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC",
1829 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "map in array prototype");
1839 bool key_is_smi_like = !Object::ToSmi(isolate(), key).is_null();
1841 isolate()->heap()->sloppy_arguments_elements_map()) {
1845 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "arguments receiver");
1857 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "dictionary prototype");
1860 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "non-smi-like key");
1863 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "non-JSObject receiver");
1869 isolate(), store_handle,
1870 Runtime::SetObjectProperty(isolate(), object, key, value,
1878 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "set generic");
1881 TRACE_GENERIC_IC(isolate(), "KeyedStoreIC", "slow stub");
1898 Handle<JSFunction>(isolate()->native_context()->array_function());
1905 isolate()->factory()->NewAllocationSite();
1909 CallIC_ArrayStub stub(isolate(), state);
1914 isolate());
1918 OnTypeFeedbackChanged(isolate(), address(), old_state, new_state, true);
1934 *TypeFeedbackVector::MegamorphicSentinel(isolate()),
1937 CallICStub stub(isolate(), state);
1941 Handle<Object> name = isolate()->factory()->empty_string();
1944 name = handle(js_function->shared()->name(), isolate());
1948 OnTypeFeedbackChanged(isolate(), address(), old_state, new_state, true);
1957 Handle<Object> name = isolate()->factory()->empty_string();
1966 *TypeFeedbackVector::MegamorphicSentinel(isolate()),
1975 DCHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate()) ||
1989 name = handle(js_function->shared()->name(), isolate());
1993 OnTypeFeedbackChanged(isolate(), address(), old_state, new_state, true);
2007 TimerEventScope<TimerEventIcMiss> timer(isolate);
2008 HandleScope scope(isolate);
2010 CallIC ic(isolate);
2021 TimerEventScope<TimerEventIcMiss> timer(isolate);
2022 HandleScope scope(isolate);
2025 CallIC ic(isolate);
2036 TimerEventScope<TimerEventIcMiss> timer(isolate);
2037 HandleScope scope(isolate);
2039 LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2044 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2051 TimerEventScope<TimerEventIcMiss> timer(isolate);
2052 HandleScope scope(isolate);
2054 KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2059 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2065 TimerEventScope<TimerEventIcMiss> timer(isolate);
2066 HandleScope scope(isolate);
2068 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate);
2073 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key));
2080 TimerEventScope<TimerEventIcMiss> timer(isolate);
2081 HandleScope scope(isolate);
2083 StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2089 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2095 TimerEventScope<TimerEventIcMiss> timer(isolate);
2096 HandleScope scope(isolate);
2098 StoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2104 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2113 TimerEventScope<TimerEventIcMiss> timer(isolate);
2114 HandleScope shs(isolate);
2135 TimerEventScope<TimerEventIcMiss> timer(isolate);
2136 HandleScope scope(isolate);
2138 KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2144 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2150 TimerEventScope<TimerEventIcMiss> timer(isolate);
2151 HandleScope scope(isolate);
2153 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2159 isolate, result, ic.Store(receiver, key, args.at<Object>(2)));
2165 HandleScope scope(isolate);
2167 StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2174 isolate, result,
2175 Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2181 HandleScope scope(isolate);
2183 KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2190 isolate, result,
2191 Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2197 TimerEventScope<TimerEventIcMiss> timer(isolate);
2198 HandleScope scope(isolate);
2200 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
2212 isolate, result,
2213 Runtime::SetObjectProperty(isolate, object, key, value, strict_mode));
2221 BinaryOpICState state(isolate(), target()->extra_ic_state());
2224 Object* builtin = isolate()->js_builtins_object()->javascript_builtin(
2226 Handle<JSFunction> function = handle(JSFunction::cast(builtin), isolate());
2229 isolate(), result, Execution::Call(isolate(), function, left, 1, &right),
2236 BinaryOpICState old_state(isolate(), target()->extra_ic_state());
2244 allocation_site = isolate()->factory()->NewAllocationSite();
2248 BinaryOpICWithAllocationSiteStub stub(isolate(), state);
2255 BinaryOpICStub stub(isolate(), state);
2267 JavaScriptFrame::PrintTop(isolate(), stdout, false, true);
2286 TimerEventScope<TimerEventIcMiss> timer(isolate);
2287 HandleScope scope(isolate);
2291 BinaryOpIC ic(isolate);
2294 isolate, result,
2301 TimerEventScope<TimerEventIcMiss> timer(isolate);
2302 HandleScope scope(isolate);
2309 BinaryOpIC ic(isolate);
2312 isolate, result, ic.Transition(allocation_site, left, right));
2317 Code* CompareIC::GetRawUninitialized(Isolate* isolate, Token::Value op) {
2318 CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
2327 Handle<Code> CompareIC::GetUninitialized(Isolate* isolate, Token::Value op) {
2328 CompareICStub stub(isolate, op, CompareICState::UNINITIALIZED,
2336 HandleScope scope(isolate());
2337 CompareICStub old_stub(target()->stub_key(), isolate());
2345 CompareICStub stub(isolate(), op_, new_left, new_right, state);
2348 Handle<Map>(Handle<JSObject>::cast(x)->map(), isolate()));
2355 JavaScriptFrame::PrintTop(isolate(), stdout, false, true);
2377 TimerEventScope<TimerEventIcMiss> timer(isolate);
2378 HandleScope scope(isolate);
2380 CompareIC ic(isolate, static_cast<Token::Value>(args.smi_at(2)));
2401 Handle<Object> CompareNilIC::DoCompareNilSlow(Isolate* isolate, NilValue nil,
2404 return handle(Smi::FromInt(true), isolate);
2406 return handle(Smi::FromInt(object->IsUndetectableObject()), isolate);
2413 CompareNilICStub stub(isolate(), extra_ic_state);
2434 return DoCompareNilSlow(isolate(), nil, object);
2439 TimerEventScope<TimerEventIcMiss> timer(isolate);
2440 HandleScope scope(isolate);
2442 CompareNilIC ic(isolate);
2450 return isolate->heap()->undefined_value();
2496 ToBooleanStub stub(isolate(), target()->extra_ic_state());
2500 return handle(Smi::FromInt(to_boolean_value ? 1 : 0), isolate());
2505 TimerEventScope<TimerEventIcMiss> timer(isolate);
2507 HandleScope scope(isolate);
2509 ToBooleanIC ic(isolate);
2520 HandleScope scope(isolate);
2529 LOG(isolate, ApiNamedPropertyAccess("store", *receiver, *name));
2530 PropertyCallbackArguments custom_args(isolate, callback->data(), *receiver,
2533 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
2554 return isolate->heap()->no_interceptor_result_sentinel();
2566 PropertyCallbackArguments callback_args(isolate, interceptor_info->data(),
2570 HandleScope scope(isolate);
2573 RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
2581 return isolate->heap()->no_interceptor_result_sentinel();
2585 static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
2588 HandleScope scope(isolate);
2589 LoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2591 return isolate->heap()->undefined_value();
2597 isolate, NewReferenceError("not_defined", HandleVector(&name_handle, 1)));
2606 HandleScope scope(isolate);
2617 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
2622 return ThrowReferenceError(isolate, Name::cast(args[0]));
2627 HandleScope scope(isolate);
2629 StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2634 PrototypeIterator iter(isolate, receiver,
2649 isolate, result,
2656 HandleScope scope(isolate);
2662 isolate, result,