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

Unified Diff: src/objects.h

Issue 1995323002: Revert of Refactor script position calculation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160517_refactor_position_info
Patch Set: Created 4 years, 7 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/js/messages.js ('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 89fc254b845fd7555a7f08d20b102fddf2feff29..0bce56c402ab7de3f98b3cf605e86f7524676a0c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6418,6 +6418,14 @@
// resource is accessible. Otherwise, always return true.
inline bool HasValidSource();
+ // Convert code offset into column number.
+ static int GetColumnNumber(Handle<Script> script, int code_offset);
+
+ // Convert code offset into (zero-based) line number.
+ // The non-handlified version does not allocate, but may be much slower.
+ static int GetLineNumber(Handle<Script> script, int code_offset);
+ int GetLineNumber(int code_pos);
+
static Handle<Object> GetNameOrSourceURL(Handle<Script> script);
// Set eval origin for stack trace formatting.
@@ -6429,33 +6437,6 @@
// Init line_ends array with source code positions of line ends.
static void InitLineEnds(Handle<Script> script);
-
- // Convert code offset into column number.
- static int GetColumnNumber(Handle<Script> script, int code_offset);
-
- // Convert code offset into (zero-based) line number.
- // The non-handlified version does not allocate, but may be much slower.
- static int GetLineNumber(Handle<Script> script, int code_offset);
- int GetLineNumber(int code_pos);
-
- // Carries information about a source position.
- struct PositionInfo {
- PositionInfo() : line(-1), column(-1), line_start(-1), line_end(-1) {}
-
- int line; // Zero-based line number.
- int column; // Zero-based column number.
- int line_start; // Position of first character in line.
- int line_end; // Position of last (non-linebreak) character in line.
- };
-
- // Specifies whether to add offsets to position infos.
- enum OffsetFlag { NO_OFFSET = 0, WITH_OFFSET = 1 };
-
- // Retrieves information about the given position, optionally with an offset.
- // Returns false on failure, and otherwise writes into the given info object
- // on success.
- bool GetPositionInfo(int position, PositionInfo* info,
- OffsetFlag offset_flag);
// Get the JS object wrapping the given script; create it if none exists.
static Handle<JSObject> GetWrapper(Handle<Script> script);
« no previous file with comments | « src/js/messages.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698