Ignore:
Timestamp:
Jan 31, 2014, 5:37:59 PM (12 years ago)
Author:
[email protected]
Message:

2014-01-31 Oliver Hunt <[email protected]>

Rollout r163195 and related patches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r163195 r163225  
    3535#include "GetterSetter.h"
    3636#include "JSArray.h"
    37 #include "JSBoundFunction.h"
    38 #include "JSFunctionInlines.h"
     37#include "JSBoundFunction.h"
    3938#include "JSGlobalObject.h"
    4039#include "JSNotAnObject.h"
     
    111110}
    112111
    113 JSFunction* JSFunction::createBuiltinFunction(VM& vm, FunctionExecutable* executable, JSGlobalObject* globalObject)
    114 {
    115     JSFunction* function = create(vm, executable, globalObject);
    116     function->putDirect(vm, vm.propertyNames->name, jsString(&vm, executable->name().string()), DontDelete | ReadOnly | DontEnum);
    117     function->putDirect(vm, vm.propertyNames->length, jsNumber(executable->parameterCount()), DontDelete | ReadOnly | DontEnum);
    118     return function;
    119 }
    120 
    121112ObjectAllocationProfile* JSFunction::createAllocationProfile(ExecState* exec, size_t inlineCapacity)
    122113{
     
    152143   
    153144    const String actualName = name(exec);
    154     if (!actualName.isEmpty() || isHostOrBuiltinFunction())
     145    if (!actualName.isEmpty() || isHostFunction())
    155146        return actualName;
    156147   
     
    160151const SourceCode* JSFunction::sourceCode() const
    161152{
    162     if (isHostOrBuiltinFunction())
     153    if (isHostFunction())
    163154        return 0;
    164155    return &jsExecutable()->source();
    165 }
    166    
    167 bool JSFunction::isHostOrBuiltinFunction() const
    168 {
    169     return isHostFunction() || isBuiltinFunction();
    170 }
    171 
    172 bool JSFunction::isBuiltinFunction() const
    173 {
    174     return !isHostFunction() && jsExecutable()->isBuiltinFunction();
    175156}
    176157
     
    297278        return JSValue::encode(caller);
    298279    JSFunction* function = jsCast<JSFunction*>(caller);
    299     if (function->isHostOrBuiltinFunction() || !function->jsExecutable()->isStrictMode())
     280    if (function->isHostFunction() || !function->jsExecutable()->isStrictMode())
    300281        return JSValue::encode(caller);
    301282    return JSValue::encode(throwTypeError(exec, ASCIILiteral("Function.caller used to retrieve strict caller")));
     
    319300{
    320301    JSFunction* thisObject = jsCast<JSFunction*>(object);
    321     if (thisObject->isHostOrBuiltinFunction())
     302    if (thisObject->isHostFunction())
    322303        return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    323304
     
    381362{
    382363    JSFunction* thisObject = jsCast<JSFunction*>(object);
    383     if (!thisObject->isHostOrBuiltinFunction() && (mode == IncludeDontEnumProperties)) {
     364    if (!thisObject->isHostFunction() && (mode == IncludeDontEnumProperties)) {
    384365        // Make sure prototype has been reified.
    385366        PropertySlot slot(thisObject);
     
    397378{
    398379    JSFunction* thisObject = jsCast<JSFunction*>(cell);
    399     if (thisObject->isHostOrBuiltinFunction()) {
     380    if (thisObject->isHostFunction()) {
    400381        Base::put(thisObject, exec, propertyName, value, slot);
    401382        return;
     
    445426{
    446427    JSFunction* thisObject = jsCast<JSFunction*>(object);
    447     if (thisObject->isHostOrBuiltinFunction())
     428    if (thisObject->isHostFunction())
    448429        return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
    449430
Note: See TracChangeset for help on using the changeset viewer.