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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: call runtime for large strings 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
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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 4124 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 Node* capacity = IntPtrRoundUpToPowerOfTwo32( 4135 Node* capacity = IntPtrRoundUpToPowerOfTwo32(
4136 WordShl(at_least_space_for, IntPtrConstant(1))); 4136 WordShl(at_least_space_for, IntPtrConstant(1)));
4137 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); 4137 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity));
4138 } 4138 }
4139 4139
4140 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { 4140 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) {
4141 return Select(IntPtrGreaterThanOrEqual(left, right), left, right, 4141 return Select(IntPtrGreaterThanOrEqual(left, right), left, right,
4142 MachineType::PointerRepresentation()); 4142 MachineType::PointerRepresentation());
4143 } 4143 }
4144 4144
4145 Node* CodeStubAssembler::IntPtrMin(Node* left, Node* right) {
4146 return Select(IntPtrLessThanOrEqual(left, right), left, right,
4147 MachineType::PointerRepresentation());
4148 }
4149
4145 template <class Dictionary> 4150 template <class Dictionary>
4146 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) { 4151 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) {
4147 return LoadFixedArrayElement( 4152 return LoadFixedArrayElement(
4148 dictionary, IntPtrConstant(Dictionary::kNumberOfElementsIndex), 0, 4153 dictionary, IntPtrConstant(Dictionary::kNumberOfElementsIndex), 0,
4149 INTPTR_PARAMETERS); 4154 INTPTR_PARAMETERS);
4150 } 4155 }
4151 4156
4152 template <class Dictionary> 4157 template <class Dictionary>
4153 void CodeStubAssembler::SetNumberOfElements(Node* dictionary, 4158 void CodeStubAssembler::SetNumberOfElements(Node* dictionary,
4154 Node* num_elements_smi) { 4159 Node* num_elements_smi) {
(...skipping 3815 matching lines...) Expand 10 before | Expand all | Expand 10 after
7970 7975
7971 Node* CodeStubAssembler::IsDebugActive() { 7976 Node* CodeStubAssembler::IsDebugActive() {
7972 Node* is_debug_active = Load( 7977 Node* is_debug_active = Load(
7973 MachineType::Uint8(), 7978 MachineType::Uint8(),
7974 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); 7979 ExternalConstant(ExternalReference::debug_is_active_address(isolate())));
7975 return WordNotEqual(is_debug_active, Int32Constant(0)); 7980 return WordNotEqual(is_debug_active, Int32Constant(0));
7976 } 7981 }
7977 7982
7978 } // namespace internal 7983 } // namespace internal
7979 } // namespace v8 7984 } // namespace v8
OLDNEW
« src/code-stub-assembler.h ('K') | « src/code-stub-assembler.h ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698