Changeset 34499 in webkit
- Timestamp:
- Jun 11, 2008 3:01:40 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34497 r34499 1 2008-06-11 Darin Adler <darin@apple.com> 2 3 Reviewed by Maciej. 4 5 - a little bit of cleanup and prep for some upcoming optimizations 6 7 * JavaScriptCore.exp: Re-sorted this file (with sort command line tool). 8 * VM/CodeBlock.cpp: 9 (KJS::CodeBlock::dump): Fixed printf to avoid warnings -- to use %lu we 10 need to make sure the type is unsigned long. 11 * kjs/object.cpp: 12 (KJS::Error::create): Eliminated unused error names array, and also put 13 the strings into the code since there was already a switch statment. 14 This also avoids having to contemplate a hypothetical access past the 15 end of the array. 16 * kjs/object.h: Got rid of errorNames. 17 * kjs/property_slot.cpp: Deleted unused ungettableGetter. 18 * kjs/property_slot.h: Ditto. 19 * wtf/AlwaysInline.h: Added LIKELY alongside UNLIKELY. 20 1 21 2008-06-11 Cameron Zwarich <cwzwarich@uwaterloo.ca> 2 22 -
trunk/JavaScriptCore/JavaScriptCore.exp
r34412 r34499 1 _JSCheckScriptSyntax 2 _JSClassCreate 3 _JSClassRelease 4 _JSClassRetain 5 _JSContextGetGlobalObject 6 _JSEvaluateScript 7 _JSGarbageCollect 8 _JSGlobalContextCreate 9 _JSGlobalContextRelease 10 _JSGlobalContextRetain 11 _JSObjectCallAsConstructor 12 _JSObjectCallAsFunction 13 _JSObjectCopyPropertyNames 14 _JSObjectDeleteProperty 15 _JSObjectGetPrivate 16 _JSObjectGetProperty 17 _JSObjectGetPropertyAtIndex 18 _JSObjectGetPrototype 19 _JSObjectHasProperty 20 _JSObjectIsConstructor 21 _JSObjectIsFunction 22 _JSObjectMake 23 _JSObjectMakeConstructor 24 _JSObjectMakeFunction 25 _JSObjectMakeFunctionWithCallback 26 _JSObjectSetPrivate 27 _JSObjectSetProperty 28 _JSObjectSetPropertyAtIndex 29 _JSObjectSetPrototype 30 _JSPropertyNameAccumulatorAddName 31 _JSPropertyNameArrayGetCount 32 _JSPropertyNameArrayGetNameAtIndex 33 _JSPropertyNameArrayRelease 34 _JSPropertyNameArrayRetain 35 _JSStringCopyCFString 36 _JSStringCreateWithCFString 37 _JSStringCreateWithCharacters 38 _JSStringCreateWithUTF8CString 39 _JSStringGetCharactersPtr 40 _JSStringGetLength 41 _JSStringGetMaximumUTF8CStringSize 42 _JSStringGetUTF8CString 43 _JSStringIsEqual 44 _JSStringIsEqualToUTF8CString 45 _JSStringRelease 46 _JSStringRetain 47 _JSValueGetType 48 _JSValueIsBoolean 49 _JSValueIsEqual 50 _JSValueIsInstanceOfConstructor 51 _JSValueIsNull 52 _JSValueIsNumber 53 _JSValueIsObject 54 _JSValueIsObjectOfClass 55 _JSValueIsStrictEqual 56 _JSValueIsString 57 _JSValueIsUndefined 58 _JSValueMakeBoolean 59 _JSValueMakeNull 60 _JSValueMakeNumber 61 _JSValueMakeString 62 _JSValueMakeUndefined 63 _JSValueProtect 64 _JSValueToBoolean 65 _JSValueToNumber 66 _JSValueToObject 67 _JSValueToStringCopy 68 _JSValueUnprotect 69 _WTFLog 70 _WTFLogVerbose 71 _WTFReportArgumentAssertionFailure 72 _WTFReportAssertionFailure 73 _WTFReportAssertionFailureWithMessage 74 _WTFReportError 75 _WTFReportFatalError 1 76 __Z12jsRegExpFreeP8JSRegExp 2 77 __Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc … … 30 105 __ZN3KJS13ArrayInstance4infoE 31 106 __ZN3KJS13CodeGenerator21setDumpsGeneratedCodeEb 107 __ZN3KJS13StatementNode6setLocEii 32 108 __ZN3KJS13jsOwnedStringERKNS_7UStringE 33 __ZN3KJS13StatementNode6setLocEii34 109 __ZN3KJS14JSGlobalObject10globalExecEv 35 110 __ZN3KJS14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectE … … 45 120 __ZN3KJS14StringInstance14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 46 121 __ZN3KJS14StringInstance16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE 122 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 47 123 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 48 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE49 124 __ZN3KJS14StringInstance3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 50 125 __ZN3KJS14StringInstance4infoE … … 57 132 __ZN3KJS16ParserRefCounted5derefEv 58 133 __ZN3KJS17PropertyNameArray3addEPNS_7UString3RepE 134 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEPNS_17FunctionPrototypeEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE 59 135 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE 60 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEPNS_17FunctionPrototypeEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE61 136 __ZN3KJS17RegisterFileStack20allocateRegisterFileEmPS0_ 62 __ZN3KJS19initializeThreadingEv63 137 __ZN3KJS19InternalFunctionImp11getCallDataERNS_8CallDataE 64 138 __ZN3KJS19InternalFunctionImp4infoE 65 139 __ZN3KJS19InternalFunctionImpC2EPNS_17FunctionPrototypeERKNS_10IdentifierE 140 __ZN3KJS19initializeThreadingEv 66 141 __ZN3KJS23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectERKNS_4ListE 67 142 __ZN3KJS4List15expandAndAppendEPNS_7JSValueE … … 70 145 __ZN3KJS6JSCell11getCallDataERNS_8CallDataE 71 146 __ZN3KJS6JSCell16getConstructDataERNS_13ConstructDataE 147 __ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 72 148 __ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 73 __ZN3KJS6JSCell 18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE149 __ZN3KJS6JSCell3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 74 150 __ZN3KJS6JSCell3putEPNS_9ExecStateEjPNS_7JSValueE 75 __ZN3KJS6JSCell3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE76 151 __ZN3KJS6JSCell9getObjectEv 77 152 __ZN3KJS6JSCellnwEm … … 84 159 __ZN3KJS6Parser5parseEPNS_9ExecStateERKNS_7UStringEiN3WTF10PassRefPtrINS_14SourceProviderEEEPiSA_PS3_ 85 160 __ZN3KJS6strtodEPKcPPc 161 __ZN3KJS7CStringD1Ev 86 162 __ZN3KJS7CStringaSERKS0_ 87 __ZN3KJS7CStringD1Ev88 163 __ZN3KJS7Machine13dumpCallFrameEPKNS_9CodeBlockEPNS_14ScopeChainNodeEPNS_12RegisterFileEPKNS_8RegisterE 164 __ZN3KJS7Profile10restoreAllEv 89 165 __ZN3KJS7Profile7forEachEPFvPNS_11ProfileNodeEE 90 __ZN3KJS7Profile10restoreAllEv91 166 __ZN3KJS7UString3Rep11computeHashEPKti 92 167 __ZN3KJS7UString3Rep4nullE … … 95 170 __ZN3KJS7UString6appendEPKc 96 171 __ZN3KJS7UString6appendERKS0_ 97 __ZN3KJS7UStringaSEPKc98 172 __ZN3KJS7UStringC1EPKc 99 173 __ZN3KJS7UStringC1EPKti 100 174 __ZN3KJS7UStringC1ERKS0_S2_ 175 __ZN3KJS7UStringaSEPKc 101 176 __ZN3KJS8Debugger6attachEPNS_14JSGlobalObjectE 102 177 __ZN3KJS8Debugger6detachEPNS_14JSGlobalObjectE … … 110 185 __ZN3KJS8JSObject12removeDirectERKNS_10IdentifierE 111 186 __ZN3KJS8JSObject14callAsFunctionEPNS_9ExecStateEPS0_RKNS_4ListE 187 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 112 188 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateEj 113 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE114 189 __ZN3KJS8JSObject14implementsCallEv 115 190 __ZN3KJS8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE 116 191 __ZN3KJS8JSObject17putDirectFunctionEPNS_19InternalFunctionImpEi 192 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj 117 193 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateEjPNS_7JSValueEj 118 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj119 194 __ZN3KJS8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 120 195 __ZN3KJS8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRPNS_7JSValueE 121 196 __ZN3KJS8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPPNS_7JSValueE 197 __ZN3KJS8JSObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 122 198 __ZN3KJS8JSObject3putEPNS_9ExecStateEjPNS_7JSValueE 123 __ZN3KJS8JSObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE124 199 __ZN3KJS8JSObject4markEv 125 200 __ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListE 126 201 __ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListERKNS_10IdentifierERKNS_7UStringEi 127 __ZN3KJS8jsStringEPKc128 __ZN3KJS8jsStringERKNS_7UStringE129 202 __ZN3KJS8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE 130 203 __ZN3KJS8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE 131 204 __ZN3KJS8Profiler8profilerEv 205 __ZN3KJS8jsStringEPKc 206 __ZN3KJS8jsStringERKNS_7UStringE 132 207 __ZN3KJS9Collector14allocateNumberEm 133 208 __ZN3KJS9Collector15recordExtraCostEm … … 206 281 __ZNK3KJS7UString8toUInt32EPb 207 282 __ZNK3KJS7UString8toUInt32EPbb 283 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE 208 284 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateEj 209 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE210 285 __ZNK3KJS8JSObject12defaultValueEPNS_9ExecStateENS_6JSTypeE 211 286 __ZNK3KJS8JSObject12toThisObjectEPNS_9ExecStateE … … 230 305 __ZTVN3KJS8JSObjectE 231 306 __ZTVN3KJS9NumberImpE 232 _JSCheckScriptSyntax233 _JSClassCreate234 _JSClassRelease235 _JSClassRetain236 _JSContextGetGlobalObject237 307 _jscore_collector_introspection 238 308 _jscore_fastmalloc_introspection 239 _JSEvaluateScript240 _JSGarbageCollect241 _JSGlobalContextCreate242 _JSGlobalContextRelease243 _JSGlobalContextRetain244 _JSObjectCallAsConstructor245 _JSObjectCallAsFunction246 _JSObjectCopyPropertyNames247 _JSObjectDeleteProperty248 _JSObjectGetPrivate249 _JSObjectGetProperty250 _JSObjectGetPropertyAtIndex251 _JSObjectGetPrototype252 _JSObjectHasProperty253 _JSObjectIsConstructor254 _JSObjectIsFunction255 _JSObjectMake256 _JSObjectMakeConstructor257 _JSObjectMakeFunction258 _JSObjectMakeFunctionWithCallback259 _JSObjectSetPrivate260 _JSObjectSetProperty261 _JSObjectSetPropertyAtIndex262 _JSObjectSetPrototype263 _JSPropertyNameAccumulatorAddName264 _JSPropertyNameArrayGetCount265 _JSPropertyNameArrayGetNameAtIndex266 _JSPropertyNameArrayRelease267 _JSPropertyNameArrayRetain268 _JSStringCopyCFString269 _JSStringCreateWithCFString270 _JSStringCreateWithCharacters271 _JSStringCreateWithUTF8CString272 _JSStringGetCharactersPtr273 _JSStringGetLength274 _JSStringGetMaximumUTF8CStringSize275 _JSStringGetUTF8CString276 _JSStringIsEqual277 _JSStringIsEqualToUTF8CString278 _JSStringRelease279 _JSStringRetain280 _JSValueGetType281 _JSValueIsBoolean282 _JSValueIsEqual283 _JSValueIsInstanceOfConstructor284 _JSValueIsNull285 _JSValueIsNumber286 _JSValueIsObject287 _JSValueIsObjectOfClass288 _JSValueIsStrictEqual289 _JSValueIsString290 _JSValueIsUndefined291 _JSValueMakeBoolean292 _JSValueMakeNull293 _JSValueMakeNumber294 _JSValueMakeString295 _JSValueMakeUndefined296 _JSValueProtect297 _JSValueToBoolean298 _JSValueToNumber299 _JSValueToObject300 _JSValueToStringCopy301 _JSValueUnprotect302 309 _kJSClassDefinitionEmpty 303 310 _releaseFastMallocFreeMemory 304 _WTFLog305 _WTFLogVerbose306 _WTFReportArgumentAssertionFailure307 _WTFReportAssertionFailure308 _WTFReportAssertionFailureWithMessage309 _WTFReportError310 _WTFReportFatalError -
trunk/JavaScriptCore/VM/CodeBlock.cpp
r34497 r34499 155 155 ++instructionCount; 156 156 157 printf("%lu instructions; %lu bytes at %p; %d locals (%d parameters); %d temporaries\n\n", instructionCount, instructions.size() * sizeof(Instruction), this, numLocals, numParameters, numTemporaries); 157 printf("%lu instructions; %lu bytes at %p; %d locals (%d parameters); %d temporaries\n\n", 158 static_cast<unsigned long>(instructionCount), 159 static_cast<unsigned long>(instructions.size() * sizeof(Instruction)), 160 this, numLocals, numParameters, numTemporaries); 158 161 159 162 for (Vector<Instruction>::const_iterator it = begin; it != end; ++it) -
trunk/JavaScriptCore/kjs/object.cpp
r34355 r34499 520 520 // ------------------------------ Error ---------------------------------------- 521 521 522 const char * const errorNamesArr[] = { 523 I18N_NOOP("Error"), // GeneralError 524 I18N_NOOP("Evaluation error"), // EvalError 525 I18N_NOOP("Range error"), // RangeError 526 I18N_NOOP("Reference error"), // ReferenceError 527 I18N_NOOP("Syntax error"), // SyntaxError 528 I18N_NOOP("Type error"), // TypeError 529 I18N_NOOP("URI error"), // URIError 530 }; 531 532 const char * const * const Error::errorNames = errorNamesArr; 533 534 JSObject *Error::create(ExecState *exec, ErrorType errtype, const UString &message, 535 int lineno, int sourceId, const UString &sourceURL) 536 { 537 JSObject *cons; 522 JSObject* Error::create(ExecState* exec, ErrorType errtype, const UString& message, 523 int lineno, int sourceId, const UString& sourceURL) 524 { 525 JSObject* cons; 526 const char* name; 538 527 switch (errtype) { 539 528 case EvalError: 540 529 cons = exec->lexicalGlobalObject()->evalErrorConstructor(); 530 name = "Evaluation error"; 541 531 break; 542 532 case RangeError: 543 533 cons = exec->lexicalGlobalObject()->rangeErrorConstructor(); 534 name = "Range error"; 544 535 break; 545 536 case ReferenceError: 546 537 cons = exec->lexicalGlobalObject()->referenceErrorConstructor(); 538 name = "Reference error"; 547 539 break; 548 540 case SyntaxError: 549 541 cons = exec->lexicalGlobalObject()->syntaxErrorConstructor(); 542 name = "Syntax error"; 550 543 break; 551 544 case TypeError: 552 545 cons = exec->lexicalGlobalObject()->typeErrorConstructor(); 546 name = "Type error"; 553 547 break; 554 548 case URIError: 555 549 cons = exec->lexicalGlobalObject()->URIErrorConstructor(); 550 name = "URI error"; 556 551 break; 557 552 default: 558 553 cons = exec->lexicalGlobalObject()->errorConstructor(); 554 name = "Error"; 559 555 break; 560 556 } … … 562 558 List args; 563 559 if (message.isEmpty()) 564 args.append(jsString( errorNames[errtype]));560 args.append(jsString(name)); 565 561 else 566 562 args.append(jsString(message)); -
trunk/JavaScriptCore/kjs/object.h
r34355 r34499 1 1 // -*- c-basic-offset: 2 -*- 2 2 /* 3 * This file is part of the KDE libraries4 3 * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) 5 4 * Copyright (C) 2001 Peter Kelly (pmk@post.com) 6 * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 7 6 * 8 7 * This library is free software; you can redistribute it and/or … … 477 476 static JSObject *create(ExecState *, ErrorType, const UString &message, int lineNumber, int sourceId, const UString &sourceURL); 478 477 static JSObject *create(ExecState *, ErrorType, const char *message); 479 480 /**481 * Array of error names corresponding to ErrorType482 */483 static const char * const * const errorNames;484 478 }; 485 479 -
trunk/JavaScriptCore/kjs/property_slot.cpp
r34355 r34499 35 35 } 36 36 37 JSValue* PropertySlot::ungettableGetter(ExecState*, const Identifier&, const PropertySlot&)38 {39 ASSERT_NOT_REACHED();40 return jsUndefined();41 }42 43 37 JSValue* PropertySlot::functionGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 44 38 { -
trunk/JavaScriptCore/kjs/property_slot.h
r34355 r34499 153 153 private: 154 154 static JSValue* undefinedGetter(ExecState*, const Identifier&, const PropertySlot&); 155 static JSValue* ungettableGetter(ExecState*, const Identifier&, const PropertySlot&);156 155 static JSValue* functionGetter(ExecState*, const Identifier&, const PropertySlot&); 157 156 -
trunk/JavaScriptCore/wtf/AlwaysInline.h
r34355 r34499 46 46 #endif 47 47 #endif 48 49 #ifndef LIKELY 50 #if COMPILER(GCC) 51 #define LIKELY(x) __builtin_expect((x), 1) 52 #else 53 #define LIKELY(x) (x) 54 #endif 55 #endif
Note: See TracChangeset
for help on using the changeset viewer.