Changeset 63244 in webkit for trunk/JavaScriptCore/runtime/JSGlobalData.cpp
- Timestamp:
- Jul 13, 2010, 1:34:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSGlobalData.cpp
r62847 r63244 141 141 #endif 142 142 , heap(this) 143 , initializingLazyNumericCompareFunction(false)144 143 , head(0) 145 144 , dynamicGlobalObject(0) … … 258 257 } 259 258 260 // FIXME: We can also detect forms like v1 < v2 ? -1 : 0, reverse comparison, etc.261 const Vector<Instruction>& JSGlobalData::numericCompareFunction(ExecState* exec)262 {263 if (!lazyNumericCompareFunction.size() && !initializingLazyNumericCompareFunction) {264 initializingLazyNumericCompareFunction = true;265 RefPtr<FunctionExecutable> function = FunctionExecutable::fromGlobalCode(Identifier(exec, "numericCompare"), exec, 0, makeSource(UString("(function (v1, v2) { return v1 - v2; })")), 0, 0);266 lazyNumericCompareFunction = function->bytecodeForCall(exec, exec->scopeChain())->instructions();267 initializingLazyNumericCompareFunction = false;268 }269 270 return lazyNumericCompareFunction;271 }272 273 259 #if ENABLE(JIT) 274 260 PassRefPtr<NativeExecutable> JSGlobalData::getHostFunction(NativeFunction function)
Note:
See TracChangeset
for help on using the changeset viewer.