Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Unified Diff: src/objects.h

Issue 119108: Add more debugging information to scripts compiled through eval (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mirror-delay.js ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
===================================================================
--- src/objects.h (revision 2090)
+++ src/objects.h (working copy)
@@ -2630,17 +2630,23 @@
};
-// Script types.
-enum ScriptType {
- SCRIPT_TYPE_NATIVE,
- SCRIPT_TYPE_EXTENSION,
- SCRIPT_TYPE_NORMAL
-};
-
-
// Script describes a script which has been added to the VM.
class Script: public Struct {
public:
+ // Script types.
+ enum Type {
+ TYPE_NATIVE,
+ TYPE_EXTENSION,
+ TYPE_NORMAL
+ };
+
+ // Script compilation types.
+ enum CompilationType {
+ COMPILATION_TYPE_HOST,
+ COMPILATION_TYPE_EVAL,
+ COMPILATION_TYPE_JSON
+ };
+
// [source]: the script source.
DECL_ACCESSORS(source, Object)
@@ -2669,9 +2675,20 @@
// [type]: the script type.
DECL_ACCESSORS(type, Smi)
- // [line_ends]: array of line ends positions
+ // [compilation]: how the the script was compiled.
+ DECL_ACCESSORS(compilation_type, Smi)
+
+ // [line_ends]: array of line ends positions.
DECL_ACCESSORS(line_ends, Object)
+ // [eval_from_function]: for eval scripts the funcion from which eval was
+ // called.
+ DECL_ACCESSORS(eval_from_function, Object)
+
+ // [eval_from_instructions_offset]: the instruction offset in the code for the
+ // function from which eval was called where eval was called.
+ DECL_ACCESSORS(eval_from_instructions_offset, Smi)
+
static inline Script* cast(Object* obj);
#ifdef DEBUG
@@ -2687,9 +2704,13 @@
static const int kContextOffset = kDataOffset + kPointerSize;
static const int kWrapperOffset = kContextOffset + kPointerSize;
static const int kTypeOffset = kWrapperOffset + kPointerSize;
- static const int kLineEndsOffset = kTypeOffset + kPointerSize;
+ static const int kCompilationTypeOffset = kTypeOffset + kPointerSize;
+ static const int kLineEndsOffset = kCompilationTypeOffset + kPointerSize;
static const int kIdOffset = kLineEndsOffset + kPointerSize;
- static const int kSize = kIdOffset + kPointerSize;
+ static const int kEvalFromFunctionOffset = kIdOffset + kPointerSize;
+ static const int kEvalFrominstructionsOffsetOffset =
+ kEvalFromFunctionOffset + kPointerSize;
+ static const int kSize = kEvalFrominstructionsOffsetOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Script);
« no previous file with comments | « src/mirror-delay.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698