| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |