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

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

Issue 2581683003: Introduce {ConstantElementsPair} struct for type safety. (Closed)
Patch Set: Rebased. Created 4 years 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-types.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
1 // Copyright 2015 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_COMPILE_TIME_VALUE 5 #ifndef V8_AST_COMPILE_TIME_VALUE
6 #define V8_AST_COMPILE_TIME_VALUE 6 #define V8_AST_COMPILE_TIME_VALUE
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 13 matching lines...) Expand all
24 }; 24 };
25 25
26 static bool IsCompileTimeValue(Expression* expression); 26 static bool IsCompileTimeValue(Expression* expression);
27 27
28 // Get the value as a compile time value. 28 // Get the value as a compile time value.
29 static Handle<FixedArray> GetValue(Isolate* isolate, Expression* expression); 29 static Handle<FixedArray> GetValue(Isolate* isolate, Expression* expression);
30 30
31 // Get the type of a compile time value returned by GetValue(). 31 // Get the type of a compile time value returned by GetValue().
32 static LiteralType GetLiteralType(Handle<FixedArray> value); 32 static LiteralType GetLiteralType(Handle<FixedArray> value);
33 33
34 // Get the elements array of a compile time value returned by GetValue(). 34 // Get the elements of a compile time value returned by GetValue().
35 static Handle<FixedArray> GetElements(Handle<FixedArray> value); 35 static Handle<HeapObject> GetElements(Handle<FixedArray> value);
36 36
37 private: 37 private:
38 static const int kLiteralTypeSlot = 0; 38 static const int kLiteralTypeSlot = 0;
39 static const int kElementsSlot = 1; 39 static const int kElementsSlot = 1;
40 }; 40 };
41 41
42 } // namespace internal 42 } // namespace internal
43 } // namespace v8 43 } // namespace v8
44 44
45 #endif // V8_AST_COMPILE_TIME_VALUE 45 #endif // V8_AST_COMPILE_TIME_VALUE
OLDNEW
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/ast/compile-time-value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698