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

Unified Diff: src/ast/compile-time-value.h

Issue 2445333002: Ensure slow properties for simple {__proto__:null} literals. (Closed)
Patch Set: fixing compilation issue Created 3 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
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/compile-time-value.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/compile-time-value.h
diff --git a/src/ast/compile-time-value.h b/src/ast/compile-time-value.h
index d61443e5835e2708a9a82bfb88bdc3489ba21694..e8ded431227385b43d477bb986b00f47865eba93 100644
--- a/src/ast/compile-time-value.h
+++ b/src/ast/compile-time-value.h
@@ -17,19 +17,20 @@ class Expression;
// can be fully handled at compile time.
class CompileTimeValue : public AllStatic {
public:
- enum LiteralType {
- OBJECT_LITERAL_FAST_ELEMENTS,
- OBJECT_LITERAL_SLOW_ELEMENTS,
- ARRAY_LITERAL
- };
+ // This is a special marker used to encode array literals. The value has to be
+ // different from any value possibly returned by
+ // ObjectLiteral::EncodeLiteralType.
+ static const int kArrayLiteralFlag = -1;
static bool IsCompileTimeValue(Expression* expression);
// Get the value as a compile time value.
static Handle<FixedArray> GetValue(Isolate* isolate, Expression* expression);
- // Get the type of a compile time value returned by GetValue().
- static LiteralType GetLiteralType(Handle<FixedArray> value);
+ // Get the encoded literal type. This can either be kArrayLiteralFlag or
+ // encoded properties of an ObjectLiteral returned by
+ // ObjectLiteral::EncodeLiteralType.
+ static int GetLiteralTypeFlags(Handle<FixedArray> value);
// Get the elements of a compile time value returned by GetValue().
static Handle<HeapObject> GetElements(Handle<FixedArray> value);
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/compile-time-value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698