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

Side by Side Diff: src/compiler/js-typed-lowering.h

Issue 1465203002: [turbofan] Initial support for inline allocations of arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unbounded inlining. Reduce code duplication. Add proper code dependencies. Created 5 years, 1 month 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/compiler/access-builder.cc ('k') | src/compiler/js-typed-lowering.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_JS_TYPED_LOWERING_H_ 5 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_
6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ 6 #define V8_COMPILER_JS_TYPED_LOWERING_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 // Forward declarations. 15 // Forward declarations.
16 class CompilationDependencies; 16 class CompilationDependencies;
17 class Factory; 17 class Factory;
18 class TypeCache;
18 19
19 20
20 namespace compiler { 21 namespace compiler {
21 22
22 // Forward declarations. 23 // Forward declarations.
23 class CommonOperatorBuilder; 24 class CommonOperatorBuilder;
24 class JSGraph; 25 class JSGraph;
25 class JSOperatorBuilder; 26 class JSOperatorBuilder;
26 class MachineOperatorBuilder; 27 class MachineOperatorBuilder;
27 class SimplifiedOperatorBuilder; 28 class SimplifiedOperatorBuilder;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 Reduction ReduceJSCreateBlockContext(Node* node); 80 Reduction ReduceJSCreateBlockContext(Node* node);
80 Reduction ReduceJSCallFunction(Node* node); 81 Reduction ReduceJSCallFunction(Node* node);
81 Reduction ReduceJSForInDone(Node* node); 82 Reduction ReduceJSForInDone(Node* node);
82 Reduction ReduceJSForInNext(Node* node); 83 Reduction ReduceJSForInNext(Node* node);
83 Reduction ReduceJSForInPrepare(Node* node); 84 Reduction ReduceJSForInPrepare(Node* node);
84 Reduction ReduceJSForInStep(Node* node); 85 Reduction ReduceJSForInStep(Node* node);
85 Reduction ReduceNumberBinop(Node* node, const Operator* numberOp); 86 Reduction ReduceNumberBinop(Node* node, const Operator* numberOp);
86 Reduction ReduceInt32Binop(Node* node, const Operator* intOp); 87 Reduction ReduceInt32Binop(Node* node, const Operator* intOp);
87 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness, 88 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness,
88 const Operator* shift_op); 89 const Operator* shift_op);
90 Reduction ReduceNewArray(Node* node, Node* length, int capacity,
91 Handle<AllocationSite> site);
89 92
90 Node* Word32Shl(Node* const lhs, int32_t const rhs); 93 Node* Word32Shl(Node* const lhs, int32_t const rhs);
91 Node* AllocateArguments(Node* effect, Node* control, Node* frame_state); 94 Node* AllocateArguments(Node* effect, Node* control, Node* frame_state);
92 Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state, 95 Node* AllocateAliasedArguments(Node* effect, Node* control, Node* frame_state,
93 Node* context, Handle<SharedFunctionInfo>, 96 Node* context, Handle<SharedFunctionInfo>,
94 bool* has_aliased_arguments); 97 bool* has_aliased_arguments);
98 Node* AllocateElements(Node* effect, Node* control,
99 ElementsKind elements_kind, int capacity,
100 PretenureFlag pretenure);
95 101
96 Factory* factory() const; 102 Factory* factory() const;
97 Graph* graph() const; 103 Graph* graph() const;
98 JSGraph* jsgraph() const { return jsgraph_; } 104 JSGraph* jsgraph() const { return jsgraph_; }
99 Isolate* isolate() const; 105 Isolate* isolate() const;
100 JSOperatorBuilder* javascript() const; 106 JSOperatorBuilder* javascript() const;
101 CommonOperatorBuilder* common() const; 107 CommonOperatorBuilder* common() const;
102 SimplifiedOperatorBuilder* simplified() const; 108 SimplifiedOperatorBuilder* simplified() const;
103 MachineOperatorBuilder* machine() const; 109 MachineOperatorBuilder* machine() const;
104 CompilationDependencies* dependencies() const; 110 CompilationDependencies* dependencies() const;
105 Flags flags() const { return flags_; } 111 Flags flags() const { return flags_; }
106 112
107 // Limits up to which context allocations are inlined. 113 // Limits up to which context allocations are inlined.
108 static const int kFunctionContextAllocationLimit = 16; 114 static const int kFunctionContextAllocationLimit = 16;
109 static const int kBlockContextAllocationLimit = 16; 115 static const int kBlockContextAllocationLimit = 16;
110 116
111 CompilationDependencies* dependencies_; 117 CompilationDependencies* dependencies_;
112 Flags flags_; 118 Flags flags_;
113 JSGraph* jsgraph_; 119 JSGraph* jsgraph_;
114 Type* shifted_int32_ranges_[4]; 120 Type* shifted_int32_ranges_[4];
121 TypeCache const& type_cache_;
115 }; 122 };
116 123
117 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) 124 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags)
118 125
119 } // namespace compiler 126 } // namespace compiler
120 } // namespace internal 127 } // namespace internal
121 } // namespace v8 128 } // namespace v8
122 129
123 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ 130 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698