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

Side by Side Diff: src/ast/compile-time-value.h

Issue 2305883002: Remove unnessary includes of parser.h (Closed)
Patch Set: More fixes in asm-js.h Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/ast/ast.cc ('k') | src/ast/compile-time-value.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_AST_COMPILE_TIME_VALUE
6 #define V8_AST_COMPILE_TIME_VALUE
7
8 #include "src/allocation.h"
9 #include "src/globals.h"
10
11 namespace v8 {
12 namespace internal {
13
14 class Expression;
15
16 // Support for handling complex values (array and object literals) that
17 // can be fully handled at compile time.
18 class CompileTimeValue : public AllStatic {
19 public:
20 enum LiteralType {
21 OBJECT_LITERAL_FAST_ELEMENTS,
22 OBJECT_LITERAL_SLOW_ELEMENTS,
23 ARRAY_LITERAL
24 };
25
26 static bool IsCompileTimeValue(Expression* expression);
27
28 // Get the value as a compile time value.
29 static Handle<FixedArray> GetValue(Isolate* isolate, Expression* expression);
30
31 // Get the type of a compile time value returned by GetValue().
32 static LiteralType GetLiteralType(Handle<FixedArray> value);
33
34 // Get the elements array of a compile time value returned by GetValue().
35 static Handle<FixedArray> GetElements(Handle<FixedArray> value);
36
37 private:
38 static const int kLiteralTypeSlot = 0;
39 static const int kElementsSlot = 1;
40 };
41
42 } // namespace internal
43 } // namespace v8
44
45 #endif // V8_AST_COMPILE_TIME_VALUE
OLDNEW
« 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