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

Unified Diff: src/objects.h

Issue 1903463002: Make global eval faster by lazily computing its call position. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index a2ff1ecde645e68da95807872fa3f578243df26b..e764c272a4bdc6d5a5b2f0a91a0e7cc57fad03e6 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6436,8 +6436,9 @@ class Script: public Struct {
// function from which eval was called.
DECL_ACCESSORS(eval_from_shared, Object)
- // [eval_from_position]: the source position in the code for the
- // function from which eval was called.
+ // [eval_from_position]: the source position in the code for the function
+ // from which eval was called, as positive integer. Or the code offset in the
+ // code from which eval was called, as negative integer.
DECL_INT_ACCESSORS(eval_from_position)
// [shared_function_infos]: weak fixed array containing all shared
@@ -6490,6 +6491,13 @@ class Script: public Struct {
static Handle<Object> GetNameOrSourceURL(Handle<Script> script);
+ // Set eval origin for stack trace formatting.
+ static void SetEvalOrigin(Handle<Script> script,
+ Handle<SharedFunctionInfo> outer,
+ int eval_position);
+ // Retrieve source position from where eval was called.
+ int GetEvalPosition();
+
// Init line_ends array with source code positions of line ends.
static void InitLineEnds(Handle<Script> script);
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698