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

Side by Side Diff: src/compiler/simplified-operator.cc

Issue 1109773002: [turbofan] Add SimplifiedOperator::Allocate operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 7 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/compiler/simplified-operator.h ('k') | src/compiler/typer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/compiler/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 236
237 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { 237 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
238 // TODO(titzer): What about the type parameter? 238 // TODO(titzer): What about the type parameter?
239 return new (zone()) Operator(IrOpcode::kReferenceEqual, 239 return new (zone()) Operator(IrOpcode::kReferenceEqual,
240 Operator::kCommutative | Operator::kPure, 240 Operator::kCommutative | Operator::kPure,
241 "ReferenceEqual", 2, 0, 0, 1, 0, 0); 241 "ReferenceEqual", 2, 0, 0, 1, 0, 0);
242 } 242 }
243 243
244 244
245 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) {
246 return new (zone())
247 Operator1<PretenureFlag>(IrOpcode::kAllocate, Operator::kNoThrow,
248 "Allocate", 1, 1, 1, 1, 1, 0, pretenure);
249 }
250
251
245 const Operator* SimplifiedOperatorBuilder::LoadBuffer(BufferAccess access) { 252 const Operator* SimplifiedOperatorBuilder::LoadBuffer(BufferAccess access) {
246 switch (access.external_array_type()) { 253 switch (access.external_array_type()) {
247 #define LOAD_BUFFER(Type, type, TYPE, ctype, size) \ 254 #define LOAD_BUFFER(Type, type, TYPE, ctype, size) \
248 case kExternal##Type##Array: \ 255 case kExternal##Type##Array: \
249 return &cache_.kLoadBuffer##Type; 256 return &cache_.kLoadBuffer##Type;
250 TYPED_ARRAYS(LOAD_BUFFER) 257 TYPED_ARRAYS(LOAD_BUFFER)
251 #undef LOAD_BUFFER 258 #undef LOAD_BUFFER
252 } 259 }
253 UNREACHABLE(); 260 UNREACHABLE();
254 return nullptr; 261 return nullptr;
(...skipping 27 matching lines...) Expand all
282 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ 289 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
283 #Name, value_input_count, 1, control_input_count, \ 290 #Name, value_input_count, 1, control_input_count, \
284 output_count, 1, 0, access); \ 291 output_count, 1, 0, access); \
285 } 292 }
286 ACCESS_OP_LIST(ACCESS) 293 ACCESS_OP_LIST(ACCESS)
287 #undef ACCESS 294 #undef ACCESS
288 295
289 } // namespace compiler 296 } // namespace compiler
290 } // namespace internal 297 } // namespace internal
291 } // namespace v8 298 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698