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

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

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/compile-time-value.h ('k') | src/compiler/bytecode-graph-builder.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/ast/compile-time-value.h" 5 #include "src/ast/compile-time-value.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/handles-inl.h" 9 #include "src/handles-inl.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 return result; 42 return result;
43 } 43 }
44 44
45 CompileTimeValue::LiteralType CompileTimeValue::GetLiteralType( 45 CompileTimeValue::LiteralType CompileTimeValue::GetLiteralType(
46 Handle<FixedArray> value) { 46 Handle<FixedArray> value) {
47 Smi* literal_type = Smi::cast(value->get(kLiteralTypeSlot)); 47 Smi* literal_type = Smi::cast(value->get(kLiteralTypeSlot));
48 return static_cast<LiteralType>(literal_type->value()); 48 return static_cast<LiteralType>(literal_type->value());
49 } 49 }
50 50
51 Handle<FixedArray> CompileTimeValue::GetElements(Handle<FixedArray> value) { 51 Handle<HeapObject> CompileTimeValue::GetElements(Handle<FixedArray> value) {
52 return Handle<FixedArray>(FixedArray::cast(value->get(kElementsSlot))); 52 return Handle<HeapObject>(HeapObject::cast(value->get(kElementsSlot)));
53 } 53 }
54 54
55 } // namespace internal 55 } // namespace internal
56 } // namespace v8 56 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/compile-time-value.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698