Ignore:
Timestamp:
Feb 16, 2012, 10:43:23 PM (13 years ago)
Author:
Csaba Osztrogonác
Message:

Unreviewed. Rolling out r107980, because it broke 32 bit platforms.

Source/JavaScriptCore:

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::throwException):
(JSC::Interpreter::privateExecute):

  • interpreter/Interpreter.h:

(JSC):
(Interpreter):

  • jsc.cpp:

(GlobalObject::finishCreation):

  • parser/Nodes.h:

(JSC::FunctionBodyNode::setInferredName):

  • parser/Parser.h:

(JSC::::parse):

  • runtime/CommonIdentifiers.h:
  • runtime/Error.cpp:

(JSC::addErrorInfo):

  • runtime/Error.h:

(JSC):

LayoutTests:

  • fast/js/exception-properties-expected.txt:
  • fast/js/script-tests/exception-properties.js:
  • fast/js/script-tests/stack-trace.js: Removed.
  • fast/js/stack-trace-expected.txt: Removed.
  • fast/js/stack-trace.html: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.h

    r108020 r108036  
    3232#include "ArgList.h"
    3333#include "JSCell.h"
    34 #include "JSFunction.h"
    3534#include "JSValue.h"
    3635#include "JSObject.h"
     
    4443    class CodeBlock;
    4544    class EvalExecutable;
    46     class ExecutableBase;
    4745    class FunctionExecutable;
     46    class JSFunction;
    4847    class JSGlobalObject;
    4948    class ProgramExecutable;
     
    6463    };
    6564
    66     enum StackFrameCodeType {
    67         StackFrameGlobalCode,
    68         StackFrameEvalCode,
    69         StackFrameFunctionCode,
    70         StackFrameNativeCode
    71     };
    72 
    73     struct StackFrame {
    74         Strong<JSObject> callee;
    75         StackFrameCodeType codeType;
    76         Strong<ExecutableBase> executable;
    77         int line;
    78         UString sourceURL;
    79         UString toString(CallFrame* callFrame) const
    80         {
    81             bool hasSourceURLInfo = !sourceURL.isNull() && !sourceURL.isEmpty();
    82             bool hasLineInfo = line > -1;
    83             String traceLine;
    84             JSObject* stackFrameCallee = callee.get();
    85 
    86             switch (codeType) {
    87             case StackFrameEvalCode:
    88                 if (hasSourceURLInfo) {
    89                     traceLine = hasLineInfo ? String::format("eval code@%s:%d", sourceURL.ascii().data(), line)
    90                                             : String::format("eval code@%s", sourceURL.ascii().data());
    91                 } else
    92                     traceLine = String::format("eval code");
    93                 break;
    94             case StackFrameNativeCode: {
    95                 if (callee) {
    96                     UString functionName = getCalculatedDisplayName(callFrame, stackFrameCallee);
    97                     traceLine = String::format("%s@[native code]", functionName.ascii().data());
    98                 } else
    99                     traceLine = "[native code]";
    100                 break;
    101             }
    102             case StackFrameFunctionCode: {
    103                 UString functionName = getCalculatedDisplayName(callFrame, stackFrameCallee);
    104                 if (hasSourceURLInfo) {
    105                     traceLine = hasLineInfo ? String::format("%s@%s:%d", functionName.ascii().data(), sourceURL.ascii().data(), line)
    106                                             : String::format("%s@%s", functionName.ascii().data(), sourceURL.ascii().data());
    107                 } else
    108                     traceLine = String::format("%s\n", functionName.ascii().data());
    109                 break;
    110             }
    111             case StackFrameGlobalCode:
    112                 if (hasSourceURLInfo) {
    113                     traceLine = hasLineInfo ? String::format("global code@%s:%d", sourceURL.ascii().data(), line)
    114                                             : String::format("global code@%s", sourceURL.ascii().data());
    115                 } else
    116                     traceLine = String::format("global code");
    117                    
    118             }
    119             return traceLine.impl();
    120         }
    121     };
    122 
    12365    class TopCallFrameSetter {
    12466    public:
     
    210152        NEVER_INLINE HandlerInfo* throwException(CallFrame*&, JSValue&, unsigned bytecodeOffset);
    211153        NEVER_INLINE void debug(CallFrame*, DebugHookID, int firstLine, int lastLine);
    212         static const UString getTraceLine(CallFrame*, StackFrameCodeType, const UString&, int);
    213         JS_EXPORT_PRIVATE static void getStackTrace(JSGlobalData*, int line, Vector<StackFrame>& results);
    214154
    215155        void dumpSampleData(ExecState* exec);
Note: See TracChangeset for help on using the changeset viewer.