[webkit-changes] cvs commit: JavaScriptCore/kjs debugger.cpp
debugger.h function.cpp function_object.cpp grammar.y
internal.cpp internal.h interpreter.cpp interpreter.h nodes.cpp
Maciej
mjs at opensource.apple.com
Wed Jul 27 16:10:51 PDT 2005
mjs 05/07/27 16:10:51
Modified: . ChangeLog
JavaScriptCore.xcodeproj project.pbxproj
kjs debugger.cpp debugger.h function.cpp
function_object.cpp grammar.y internal.cpp
internal.h interpreter.cpp interpreter.h nodes.cpp
Log:
Changes by Michael Kahl, reviewed by me.
- fixed <rdar://problem/4194278> Need better debugging support in JavaScriptCore
* JavaScriptCore.xcodeproj/project.pbxproj:
* kjs/debugger.cpp:
(KJS::AttachedInterpreter::AttachedInterpreter):
(KJS::AttachedInterpreter::~AttachedInterpreter):
(Debugger::~Debugger):
(Debugger::attach):
(Debugger::detach):
(Debugger::sourceParsed):
* kjs/debugger.h:
* kjs/function.cpp:
(KJS::FunctionImp::call):
(KJS::GlobalFuncImp::call):
* kjs/function_object.cpp:
(FunctionObjectImp::construct):
* kjs/grammar.y:
* kjs/internal.cpp:
(Parser::parse):
(InterpreterImp::evaluate):
* kjs/internal.h:
(KJS::InterpreterImp::setDebugger):
* kjs/interpreter.cpp:
* kjs/interpreter.h:
(KJS::Interpreter::imp):
* kjs/nodes.cpp:
Revision Changes Path
1.769 +31 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.768
retrieving revision 1.769
diff -u -r1.768 -r1.769
--- ChangeLog 27 Jul 2005 19:54:13 -0000 1.768
+++ ChangeLog 27 Jul 2005 23:10:48 -0000 1.769
@@ -1,3 +1,34 @@
+2005-07-27 Maciej Stachowiak <mjs at apple.com>
+
+ Changes by Michael Kahl, reviewed by me.
+
+ - fixed <rdar://problem/4194278> Need better debugging support in JavaScriptCore
+
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * kjs/debugger.cpp:
+ (KJS::AttachedInterpreter::AttachedInterpreter):
+ (KJS::AttachedInterpreter::~AttachedInterpreter):
+ (Debugger::~Debugger):
+ (Debugger::attach):
+ (Debugger::detach):
+ (Debugger::sourceParsed):
+ * kjs/debugger.h:
+ * kjs/function.cpp:
+ (KJS::FunctionImp::call):
+ (KJS::GlobalFuncImp::call):
+ * kjs/function_object.cpp:
+ (FunctionObjectImp::construct):
+ * kjs/grammar.y:
+ * kjs/internal.cpp:
+ (Parser::parse):
+ (InterpreterImp::evaluate):
+ * kjs/internal.h:
+ (KJS::InterpreterImp::setDebugger):
+ * kjs/interpreter.cpp:
+ * kjs/interpreter.h:
+ (KJS::Interpreter::imp):
+ * kjs/nodes.cpp:
+
2005-07-27 Geoffrey Garen <ggaren at apple.com>
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=3381
1.2 +4 -4 JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Index: project.pbxproj
===================================================================
RCS file: /cvs/root/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project.pbxproj 21 Jul 2005 19:44:11 -0000 1.1
+++ project.pbxproj 27 Jul 2005 23:10:49 -0000 1.2
@@ -28,7 +28,7 @@
932F5B400822A1C700736975 /* array_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A84E0255597D01FF60F7 /* array_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B420822A1C700736975 /* collector.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8530255597D01FF60F7 /* collector.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B430822A1C700736975 /* date_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8560255597D01FF60F7 /* date_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 932F5B450822A1C700736975 /* debugger.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8590255597D01FF60F7 /* debugger.h */; };
+ 932F5B450822A1C700736975 /* debugger.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8590255597D01FF60F7 /* debugger.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B460822A1C700736975 /* error_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85B0255597D01FF60F7 /* error_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B470822A1C700736975 /* function_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85D0255597D01FF60F7 /* function_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B480822A1C700736975 /* function.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85F0255597D01FF60F7 /* function.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -56,7 +56,7 @@
932F5B640822A1C700736975 /* reference.h in Headers */ = {isa = PBXBuildFile; fileRef = F5341391030CEEB1018BE7F3 /* reference.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B650822A1C700736975 /* completion.h in Headers */ = {isa = PBXBuildFile; fileRef = F5BB2BC5030F772101FCFE1D /* completion.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B660822A1C700736975 /* identifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 933A349A038AE7C6008635CE /* identifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 932F5B670822A1C700736975 /* array_instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* array_instance.h */; };
+ 932F5B670822A1C700736975 /* array_instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* array_instance.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B680822A1C700736975 /* scope_chain.h in Headers */ = {isa = PBXBuildFile; fileRef = 9374D3A7038D9D74008635CE /* scope_chain.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B690822A1C700736975 /* context.h in Headers */ = {isa = PBXBuildFile; fileRef = 9373524E038DA8C2008635CE /* context.h */; settings = {ATTRIBUTES = (Private, ); }; };
932F5B6A0822A1C700736975 /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = 931C6CEF038EE8DE008635CE /* list.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -172,7 +172,7 @@
A85D81F8087B2822006A9172 /* array_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A84E0255597D01FF60F7 /* array_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D81F9087B2822006A9172 /* collector.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8530255597D01FF60F7 /* collector.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D81FA087B2822006A9172 /* date_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8560255597D01FF60F7 /* date_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A85D81FB087B2822006A9172 /* debugger.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8590255597D01FF60F7 /* debugger.h */; };
+ A85D81FB087B2822006A9172 /* debugger.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A8590255597D01FF60F7 /* debugger.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D81FC087B2822006A9172 /* error_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85B0255597D01FF60F7 /* error_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D81FD087B2822006A9172 /* function_object.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85D0255597D01FF60F7 /* function_object.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D81FE087B2822006A9172 /* function.h in Headers */ = {isa = PBXBuildFile; fileRef = F692A85F0255597D01FF60F7 /* function.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -200,7 +200,7 @@
A85D8214087B2822006A9172 /* reference.h in Headers */ = {isa = PBXBuildFile; fileRef = F5341391030CEEB1018BE7F3 /* reference.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D8215087B2822006A9172 /* completion.h in Headers */ = {isa = PBXBuildFile; fileRef = F5BB2BC5030F772101FCFE1D /* completion.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D8216087B2822006A9172 /* identifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 933A349A038AE7C6008635CE /* identifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A85D8217087B2822006A9172 /* array_instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* array_instance.h */; };
+ A85D8217087B2822006A9172 /* array_instance.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* array_instance.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D8218087B2822006A9172 /* scope_chain.h in Headers */ = {isa = PBXBuildFile; fileRef = 9374D3A7038D9D74008635CE /* scope_chain.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D8219087B2822006A9172 /* context.h in Headers */ = {isa = PBXBuildFile; fileRef = 9373524E038DA8C2008635CE /* context.h */; settings = {ATTRIBUTES = (Private, ); }; };
A85D821A087B2822006A9172 /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = 931C6CEF038EE8DE008635CE /* list.h */; settings = {ATTRIBUTES = (Private, ); }; };
1.5 +27 -35 JavaScriptCore/kjs/debugger.cpp
Index: debugger.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/debugger.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- debugger.cpp 14 Jul 2005 18:27:02 -0000 1.4
+++ debugger.cpp 27 Jul 2005 23:10:49 -0000 1.5
@@ -36,13 +36,16 @@
struct AttachedInterpreter
{
public:
- AttachedInterpreter(Interpreter *i) : interp(i) {}
+ AttachedInterpreter(Interpreter *i, AttachedInterpreter *ai) : interp(i), next(ai) { ++Debugger::debuggersPresent; }
+ ~AttachedInterpreter() { --Debugger::debuggersPresent; }
Interpreter *interp;
AttachedInterpreter *next;
};
}
+int Debugger::debuggersPresent = 0;
+
Debugger::Debugger()
{
rep = new DebuggerImp();
@@ -50,53 +53,42 @@
Debugger::~Debugger()
{
- // detach from all interpreters
- while (rep->interps)
- detach(rep->interps->interp);
-
+ detach(0);
delete rep;
}
void Debugger::attach(Interpreter *interp)
{
- if (interp->imp()->debugger() != this)
- interp->imp()->setDebugger(this);
-
- // add to the list of attached interpreters
- if (!rep->interps)
- rep->interps = new AttachedInterpreter(interp);
- else {
- AttachedInterpreter *ai = rep->interps;
- while (ai->next)
- ai = ai->next;
- ai->next = new AttachedInterpreter(interp);;
- }
+ Debugger *other = interp->imp()->debugger();
+ if (other == this)
+ return;
+ if (other)
+ other->detach(interp);
+ interp->imp()->setDebugger(this);
+ rep->interps = new AttachedInterpreter(interp, rep->interps);
}
void Debugger::detach(Interpreter *interp)
{
- if (interp->imp()->debugger() == this)
- interp->imp()->setDebugger(this);
-
- // remove from the list of attached interpreters
- if (rep->interps->interp == interp) {
- AttachedInterpreter *old = rep->interps;
- rep->interps = rep->interps->next;
- delete old;
- }
+ if (interp && interp->imp()->debugger() == this)
+ interp->imp()->setDebugger(0);
- AttachedInterpreter *ai = rep->interps;
- while (ai->next && ai->next->interp != interp)
- ai = ai->next;
- if (ai->next) {
- AttachedInterpreter *old = ai->next;
- ai->next = ai->next->next;
- delete old;
+ // iterate the addresses where AttachedInterpreter pointers are stored
+ // so we can unlink items from the list
+ AttachedInterpreter **p = &rep->interps;
+ AttachedInterpreter *q;
+ while ((q = *p)) {
+ if (!interp || q->interp == interp) {
+ *p = q->next;
+ delete q;
+ } else {
+ p = &q->next;
+ }
}
}
-bool Debugger::sourceParsed(ExecState */*exec*/, int /*sourceId*/,
- const UString &/*source*/, int /*errorLine*/)
+bool Debugger::sourceParsed(ExecState */*exec*/, int /*sourceId*/, const UString &/*sourceURL*/,
+ const UString &/*source*/, int /*errorLine*/)
{
return true;
}
1.5 +5 -1 JavaScriptCore/kjs/debugger.h
Index: debugger.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/debugger.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- debugger.h 14 Jul 2005 18:27:02 -0000 1.4
+++ debugger.h 27 Jul 2005 23:10:49 -0000 1.5
@@ -101,13 +101,14 @@
* @param exec The current execution state
* @param sourceId The ID of the source code (corresponds to the
* sourceId supplied in other functions such as atStatement()
+ * @param sourceURL Where the source code that was parsed came from
* @param source The source code that was parsed
* @param errorLine The line number at which parsing encountered an
* error, or -1 if the source code was valid and parsed successfully
* @return true if execution should be continue, false if it should
* be aborted
*/
- virtual bool sourceParsed(ExecState *exec, int sourceId,
+ virtual bool sourceParsed(ExecState *exec, int sourceId, const UString &sourceURL,
const UString &source, int errorLine);
/**
@@ -205,6 +206,9 @@
private:
DebuggerImp *rep;
+
+ public:
+ static int debuggersPresent;
};
};
1.50 +28 -15 JavaScriptCore/kjs/function.cpp
Index: function.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/function.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- function.cpp 25 Jul 2005 22:17:12 -0000 1.49
+++ function.cpp 27 Jul 2005 23:10:49 -0000 1.50
@@ -77,6 +77,17 @@
{
Object &globalObj = exec->dynamicInterpreter()->globalObject();
+ // enter a new execution context
+ ContextImp ctx(globalObj, exec->dynamicInterpreter()->imp(), thisObj, codeType(),
+ exec->context().imp(), this, &args);
+ ExecState newExec(exec->dynamicInterpreter(), &ctx);
+ newExec.setException(exec->exception()); // could be null
+
+ // assign user supplied arguments to parameters
+ processParameters(&newExec, args);
+ // add variable declarations (initialized to undefined)
+ processVarDecls(&newExec);
+
Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
int sid = -1;
int lineno = -1;
@@ -87,29 +98,18 @@
}
Object func(this);
- bool cont = dbg->callEvent(exec,sid,lineno,func,args);
+ bool cont = dbg->callEvent(&newExec,sid,lineno,func,args);
if (!cont) {
dbg->imp()->abort();
return Undefined();
}
}
- // enter a new execution context
- ContextImp ctx(globalObj, exec->dynamicInterpreter()->imp(), thisObj, codeType(),
- exec->context().imp(), this, &args);
- ExecState newExec(exec->dynamicInterpreter(), &ctx);
- newExec.setException(exec->exception()); // could be null
-
- // assign user supplied arguments to parameters
- processParameters(&newExec, args);
- // add variable declarations (initialized to undefined)
- processVarDecls(&newExec);
-
Completion comp = execute(&newExec);
// if an exception occured, propogate it back to the previous execution object
if (newExec.hadException())
- exec->setException(newExec.exception());
+ comp = Completion(Throw, newExec.exception());
#ifdef KJS_VERBOSE
if (comp.complType() == Throw)
@@ -121,8 +121,14 @@
#endif
if (dbg) {
+ if (inherits(&DeclaredFunctionImp::info))
+ lineno = static_cast<DeclaredFunctionImp*>(this)->body->lastLine();
+
+ if (comp.complType() == Throw)
+ newExec.setException(comp.value());
+
Object func(this);
- int cont = dbg->returnEvent(exec,sid,lineno,func);
+ int cont = dbg->returnEvent(&newExec,sid,lineno,func);
if (!cont) {
dbg->imp()->abort();
return Undefined();
@@ -789,7 +795,14 @@
int errLine;
UString errMsg;
ProgramNode *progNode = Parser::parse(UString(), 0, s.data(),s.size(),&sid,&errLine,&errMsg);
-
+
+ Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
+ if (dbg) {
+ bool cont = dbg->sourceParsed(exec, sid, UString(), s, errLine);
+ if (!cont)
+ return Undefined();
+ }
+
// no program node means a syntax occurred
if (!progNode) {
Object err = Error::create(exec,SyntaxError,errMsg.ascii(),errLine);
1.26 +2 -1 JavaScriptCore/kjs/function_object.cpp
Index: function_object.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/function_object.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- function_object.cpp 14 Jul 2005 18:27:02 -0000 1.25
+++ function_object.cpp 27 Jul 2005 23:10:49 -0000 1.26
@@ -217,7 +217,8 @@
// notify debugger that source has been parsed
Debugger *dbg = exec->dynamicInterpreter()->imp()->debugger();
if (dbg) {
- bool cont = dbg->sourceParsed(exec,sid,body,errLine);
+ // send empty sourceURL to indicate constructed code
+ bool cont = dbg->sourceParsed(exec,sid,UString(),body,errLine);
if (!cont) {
dbg->imp()->abort();
return Object(new ObjectImp());
1.23 +10 -10 JavaScriptCore/kjs/grammar.y
Index: grammar.y
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/grammar.y,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- grammar.y 14 Jul 2005 18:27:02 -0000 1.22
+++ grammar.y 27 Jul 2005 23:10:49 -0000 1.23
@@ -508,7 +508,7 @@
ContinueStatement:
CONTINUE ';' { $$ = new ContinueNode(); DBG($$, at 1, at 2); }
| CONTINUE error { if (automatic()) {
- $$ = new ContinueNode(); DBG($$, at 1, at 2);
+ $$ = new ContinueNode(); DBG($$, at 1, at 1);
} else
YYABORT; }
| CONTINUE IDENT ';' { $$ = new ContinueNode(*$2); DBG($$, at 1, at 3); }
@@ -538,10 +538,10 @@
$$ = new ReturnNode(0); DBG($$, at 1, at 1);
} else
YYABORT; }
- | RETURN Expr ';' { $$ = new ReturnNode($2); }
- | RETURN Expr error { if (automatic())
- $$ = new ReturnNode($2);
- else
+ | RETURN Expr ';' { $$ = new ReturnNode($2); DBG($$, at 1, at 3); }
+ | RETURN Expr error { if (automatic()) {
+ $$ = new ReturnNode($2); DBG($$, at 1, at 2);
+ } else
YYABORT; }
;
@@ -587,14 +587,14 @@
;
ThrowStatement:
- THROW Expr ';' { $$ = new ThrowNode($2); }
- | THROW Expr error { if (automatic()) $$ = new ThrowNode($2); else YYABORT; }
+ THROW Expr ';' { $$ = new ThrowNode($2); DBG($$, at 1, at 3); }
+ | THROW Expr error { if (automatic()) { $$ = new ThrowNode($2); DBG($$, at 1, at 2); } else YYABORT; }
;
TryStatement:
- TRY Block Catch { $$ = new TryNode($2, $3); }
- | TRY Block Finally { $$ = new TryNode($2, $3); }
- | TRY Block Catch Finally { $$ = new TryNode($2, $3, $4); }
+ TRY Block Catch { $$ = new TryNode($2, $3); DBG($$, at 1, at 2); }
+ | TRY Block Finally { $$ = new TryNode($2, $3); DBG($$, at 1, at 2); }
+ | TRY Block Catch Finally { $$ = new TryNode($2, $3, $4); DBG($$, at 1, at 2); }
;
Catch:
1.59 +2 -9 JavaScriptCore/kjs/internal.cpp
Index: internal.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/internal.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- internal.cpp 14 Jul 2005 18:27:02 -0000 1.58
+++ internal.cpp 27 Jul 2005 23:10:49 -0000 1.59
@@ -452,7 +452,7 @@
Lexer::curr()->doneParsing();
ProgramNode *prog = progNode;
progNode = 0;
- sid = -1;
+// sid = -1;
if (parseError || lexError) {
int eline = Lexer::curr()->lineNo();
@@ -761,7 +761,7 @@
// notify debugger that source has been parsed
if (dbg) {
- bool cont = dbg->sourceParsed(globExec,sid,code,errLine);
+ bool cont = dbg->sourceParsed(globExec,sid,sourceURL,code,errLine);
if (!cont)
#if APPLE_CHANGES
{
@@ -824,13 +824,6 @@
return res;
}
-void InterpreterImp::setDebugger(Debugger *d)
-{
- if (d)
- d->detach(m_interpreter);
- dbg = d;
-}
-
void InterpreterImp::saveBuiltins (SavedBuiltins &builtins) const
{
if (!builtins._internal) {
1.30 +1 -1 JavaScriptCore/kjs/internal.h
Index: internal.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/internal.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- internal.h 14 Jul 2005 18:27:02 -0000 1.29
+++ internal.h 27 Jul 2005 23:10:49 -0000 1.30
@@ -291,7 +291,7 @@
bool checkSyntax(const UString &code);
Completion evaluate(const UString &code, const Value &thisV, const UString &sourceURL, int startingLineNumber);
Debugger *debugger() const { return dbg; }
- void setDebugger(Debugger *d);
+ void setDebugger(Debugger *d) { dbg = d; }
Object builtinObject() const { return b_Object; }
Object builtinFunction() const { return b_Function; }
1.27 +0 -5 JavaScriptCore/kjs/interpreter.cpp
Index: interpreter.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/interpreter.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- interpreter.cpp 14 Jul 2005 22:32:16 -0000 1.26
+++ interpreter.cpp 27 Jul 2005 23:10:49 -0000 1.27
@@ -140,11 +140,6 @@
return comp;
}
-InterpreterImp *Interpreter::imp()
-{
- return rep;
-}
-
Object Interpreter::builtinObject() const
{
return rep->builtinObject();
1.25 +1 -1 JavaScriptCore/kjs/interpreter.h
Index: interpreter.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/interpreter.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- interpreter.h 14 Jul 2005 18:27:02 -0000 1.24
+++ interpreter.h 27 Jul 2005 23:10:49 -0000 1.25
@@ -221,7 +221,7 @@
* Returns the implementation object associated with this interpreter.
* Only useful for internal KJS operations.
*/
- InterpreterImp *imp();
+ InterpreterImp *imp() const { return rep; }
/**
* Returns the builtin "Object" object. This is the object that was set
1.68 +3 -12 JavaScriptCore/kjs/nodes.cpp
Index: nodes.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/nodes.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- nodes.cpp 25 Jul 2005 22:17:12 -0000 1.67
+++ nodes.cpp 27 Jul 2005 23:10:49 -0000 1.68
@@ -47,25 +47,16 @@
using namespace KJS;
-// Disabled for now because it shows up on benchmark (0.5%).
-#if DEBUGGER_SUPPORT
-
#define KJS_BREAKPOINT \
- if (!hitStatement(exec)) \
+ if (Debugger::debuggersPresent > 0 && !hitStatement(exec)) \
return Completion(Normal);
#define KJS_ABORTPOINT \
- if (exec->dynamicInterpreter()->imp()->debugger() && \
+ if (Debugger::debuggersPresent > 0 && \
+ exec->dynamicInterpreter()->imp()->debugger() && \
exec->dynamicInterpreter()->imp()->debugger()->imp()->aborted()) \
return Completion(Normal);
-#else
-
-#define KJS_BREAKPOINT
-#define KJS_ABORTPOINT
-
-#endif
-
#define KJS_CHECKEXCEPTION \
if (exec->hadException()) { \
setExceptionDetailsIfNeeded(exec); \
More information about the webkit-changes
mailing list