Index: src/ast.cc |
=================================================================== |
--- src/ast.cc (revision 3152) |
+++ src/ast.cc (working copy) |
@@ -28,6 +28,7 @@ |
#include "v8.h" |
#include "ast.h" |
+#include "parser.h" |
#include "scopes.h" |
#include "string-stream.h" |
@@ -138,6 +139,13 @@ |
} |
+bool ObjectLiteral::Property::IsCompileTimeValue() { |
+ return kind_ == CONSTANT || |
+ (kind_ == MATERIALIZED_LITERAL && |
+ CompileTimeValue::IsCompileTimeValue(value_)); |
+} |
+ |
+ |
bool ObjectLiteral::IsValidJSON() { |
int length = properties()->length(); |
for (int i = 0; i < length; i++) { |