Changeset 199946 in webkit for trunk/Source/JavaScriptCore/jit/JITThunks.cpp
- Timestamp:
- Apr 22, 2016, 7:00:38 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITThunks.cpp
r197815 r199946 1 1 /* 2 * Copyright (C) 2012, 2013, 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2012, 2013, 2015-2016 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 65 65 } 66 66 67 MacroAssemblerCodePtr JITThunks::ctiNativeTailCallWithoutSavedTags(VM* vm) 68 { 69 ASSERT(vm->canUseJIT()); 70 return ctiStub(vm, nativeTailCallWithoutSavedTagsGenerator).code(); 71 } 72 67 73 MacroAssemblerCodeRef JITThunks::ctiStub(VM* vm, ThunkGenerator generator) 68 74 { … … 85 91 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor, const String& name) 86 92 { 87 ASSERT(!isCompilationThread()); 88 89 if (NativeExecutable* nativeExecutable = m_hostFunctionStubMap->get(std::make_tuple(function, constructor, name))) 90 return nativeExecutable; 91 92 NativeExecutable* nativeExecutable = NativeExecutable::create( 93 *vm, 94 adoptRef(new NativeJITCode(JIT::compileCTINativeCall(vm, function), JITCode::HostCallThunk)), 95 function, 96 adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk)), 97 constructor, NoIntrinsic, name); 98 weakAdd(*m_hostFunctionStubMap, std::make_tuple(function, constructor, name), Weak<NativeExecutable>(nativeExecutable, this)); 99 return nativeExecutable; 93 return hostFunctionStub(vm, function, constructor, nullptr, NoIntrinsic, name); 100 94 } 101 95 102 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic, const String& name)96 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor, ThunkGenerator generator, Intrinsic intrinsic, const String& name) 103 97 { 104 98 ASSERT(!isCompilationThread()); 105 99 ASSERT(vm->canUseJIT()); 106 100 107 if (NativeExecutable* nativeExecutable = m_hostFunctionStubMap->get(std::make_tuple(function, &callHostFunctionAsConstructor, name)))101 if (NativeExecutable* nativeExecutable = m_hostFunctionStubMap->get(std::make_tuple(function, constructor, name))) 108 102 return nativeExecutable; 109 103 … … 117 111 RefPtr<JITCode> forConstruct = adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk)); 118 112 119 NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, c allHostFunctionAsConstructor, intrinsic, name);120 weakAdd(*m_hostFunctionStubMap, std::make_tuple(function, &callHostFunctionAsConstructor, name), Weak<NativeExecutable>(nativeExecutable, this));113 NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, constructor, intrinsic, name); 114 weakAdd(*m_hostFunctionStubMap, std::make_tuple(function, constructor, name), Weak<NativeExecutable>(nativeExecutable, this)); 121 115 return nativeExecutable; 116 } 117 118 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic, const String& name) 119 { 120 return hostFunctionStub(vm, function, callHostFunctionAsConstructor, generator, intrinsic, name); 122 121 } 123 122
Note:
See TracChangeset
for help on using the changeset viewer.