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

Unified Diff: src/ast.h

Issue 267118: Added first support for tracking locations of expressions in the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/arm/fast-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
===================================================================
--- src/ast.h (revision 3074)
+++ src/ast.h (working copy)
@@ -28,6 +28,7 @@
#ifndef V8_AST_H_
#define V8_AST_H_
+#include "location.h"
#include "execution.h"
#include "factory.h"
#include "jsregexp.h"
@@ -161,6 +162,8 @@
class Expression: public AstNode {
public:
+ Expression() : location_(Location::Temporary()) {}
+
virtual Expression* AsExpression() { return this; }
virtual bool IsValidJSON() { return false; }
@@ -174,8 +177,12 @@
// Static type information for this expression.
SmiAnalysis* type() { return &type_; }
+ Location location() { return location_; }
+ void set_location(Location loc) { location_ = loc; }
+
private:
SmiAnalysis type_;
+ Location location_;
};
« no previous file with comments | « src/arm/fast-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698