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

Side by Side Diff: src/compiler/effect-control-linearizer.cc

Issue 2913783002: [builtins] Begin removing CodeFactory accessors (Closed)
Patch Set: V8_EXPORT_PRIVATE Created 3 years, 6 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/code-stub-assembler.cc ('k') | src/compiler/js-generic-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 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 #include "src/compiler/effect-control-linearizer.h" 5 #include "src/compiler/effect-control-linearizer.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/compiler-source-position-table.h" 9 #include "src/compiler/compiler-source-position-table.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 __ Word32And(value_bit_field, 2123 __ Word32And(value_bit_field,
2124 __ Int32Constant(JSArrayBuffer::WasNeutered::kMask)), 2124 __ Int32Constant(JSArrayBuffer::WasNeutered::kMask)),
2125 __ Int32Constant(0)), 2125 __ Int32Constant(0)),
2126 __ Int32Constant(0)); 2126 __ Int32Constant(0));
2127 } 2127 }
2128 2128
2129 Node* EffectControlLinearizer::LowerStringCharAt(Node* node) { 2129 Node* EffectControlLinearizer::LowerStringCharAt(Node* node) {
2130 Node* receiver = node->InputAt(0); 2130 Node* receiver = node->InputAt(0);
2131 Node* position = node->InputAt(1); 2131 Node* position = node->InputAt(1);
2132 2132
2133 Callable const callable = CodeFactory::StringCharAt(isolate()); 2133 Callable const callable =
2134 Builtins::CallableFor(isolate(), Builtins::kStringCharAt);
2134 Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite; 2135 Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite;
2135 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 2136 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
2136 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 2137 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
2137 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties); 2138 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
2138 return __ Call(desc, __ HeapConstant(callable.code()), receiver, position, 2139 return __ Call(desc, __ HeapConstant(callable.code()), receiver, position,
2139 __ NoContextConstant()); 2140 __ NoContextConstant());
2140 } 2141 }
2141 2142
2142 Node* EffectControlLinearizer::LowerStringCharCodeAt(Node* node) { 2143 Node* EffectControlLinearizer::LowerStringCharCodeAt(Node* node) {
2143 Node* receiver = node->InputAt(0); 2144 Node* receiver = node->InputAt(0);
2144 Node* position = node->InputAt(1); 2145 Node* position = node->InputAt(1);
2145 2146
2146 Callable const callable = CodeFactory::StringCharCodeAt(isolate()); 2147 Callable const callable =
2148 Builtins::CallableFor(isolate(), Builtins::kStringCharCodeAt);
2147 Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite; 2149 Operator::Properties properties = Operator::kNoThrow | Operator::kNoWrite;
2148 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 2150 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
2149 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 2151 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
2150 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties, 2152 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties,
2151 MachineType::TaggedSigned()); 2153 MachineType::TaggedSigned());
2152 return __ Call(desc, __ HeapConstant(callable.code()), receiver, position, 2154 return __ Call(desc, __ HeapConstant(callable.code()), receiver, position,
2153 __ NoContextConstant()); 2155 __ NoContextConstant());
2154 } 2156 }
2155 2157
2156 Node* EffectControlLinearizer::LowerSeqStringCharCodeAt(Node* node) { 2158 Node* EffectControlLinearizer::LowerSeqStringCharCodeAt(Node* node) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 2377
2376 Operator::Properties properties = Operator::kEliminatable; 2378 Operator::Properties properties = Operator::kEliminatable;
2377 CallDescriptor::Flags flags = CallDescriptor::kNoFlags; 2379 CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
2378 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 2380 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
2379 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties); 2381 isolate(), graph()->zone(), callable.descriptor(), 0, flags, properties);
2380 return __ Call(desc, __ HeapConstant(callable.code()), lhs, rhs, 2382 return __ Call(desc, __ HeapConstant(callable.code()), lhs, rhs,
2381 __ NoContextConstant()); 2383 __ NoContextConstant());
2382 } 2384 }
2383 2385
2384 Node* EffectControlLinearizer::LowerStringEqual(Node* node) { 2386 Node* EffectControlLinearizer::LowerStringEqual(Node* node) {
2385 return LowerStringComparison(CodeFactory::StringEqual(isolate()), node); 2387 return LowerStringComparison(
2388 Builtins::CallableFor(isolate(), Builtins::kStringEqual), node);
2386 } 2389 }
2387 2390
2388 Node* EffectControlLinearizer::LowerStringLessThan(Node* node) { 2391 Node* EffectControlLinearizer::LowerStringLessThan(Node* node) {
2389 return LowerStringComparison(CodeFactory::StringLessThan(isolate()), node); 2392 return LowerStringComparison(
2393 Builtins::CallableFor(isolate(), Builtins::kStringLessThan), node);
2390 } 2394 }
2391 2395
2392 Node* EffectControlLinearizer::LowerStringLessThanOrEqual(Node* node) { 2396 Node* EffectControlLinearizer::LowerStringLessThanOrEqual(Node* node) {
2393 return LowerStringComparison(CodeFactory::StringLessThanOrEqual(isolate()), 2397 return LowerStringComparison(
2394 node); 2398 Builtins::CallableFor(isolate(), Builtins::kStringLessThanOrEqual), node);
2395 } 2399 }
2396 2400
2397 Node* EffectControlLinearizer::LowerCheckFloat64Hole(Node* node, 2401 Node* EffectControlLinearizer::LowerCheckFloat64Hole(Node* node,
2398 Node* frame_state) { 2402 Node* frame_state) {
2399 // If we reach this point w/o eliminating the {node} that's marked 2403 // If we reach this point w/o eliminating the {node} that's marked
2400 // with allow-return-hole, we cannot do anything, so just deoptimize 2404 // with allow-return-hole, we cannot do anything, so just deoptimize
2401 // in case of the hole NaN (similar to Crankshaft). 2405 // in case of the hole NaN (similar to Crankshaft).
2402 Node* value = node->InputAt(0); 2406 Node* value = node->InputAt(0);
2403 Node* check = __ Word32Equal(__ Float64ExtractHighWord32(value), 2407 Node* check = __ Word32Equal(__ Float64ExtractHighWord32(value),
2404 __ Int32Constant(kHoleNanUpper32)); 2408 __ Int32Constant(kHoleNanUpper32));
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
3061 return isolate()->factory(); 3065 return isolate()->factory();
3062 } 3066 }
3063 3067
3064 Isolate* EffectControlLinearizer::isolate() const { 3068 Isolate* EffectControlLinearizer::isolate() const {
3065 return jsgraph()->isolate(); 3069 return jsgraph()->isolate();
3066 } 3070 }
3067 3071
3068 } // namespace compiler 3072 } // namespace compiler
3069 } // namespace internal 3073 } // namespace internal
3070 } // namespace v8 3074 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698