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

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

Issue 2539093002: [runtime] Port simple String.prototype.indexOf cases to TF Builtin (Closed)
Patch Set: merging with master 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/code-stub-assembler.h ('k') | src/compiler/code-assembler.h » ('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 #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 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 Node* capacity = IntPtrRoundUpToPowerOfTwo32( 4373 Node* capacity = IntPtrRoundUpToPowerOfTwo32(
4374 WordShl(at_least_space_for, IntPtrConstant(1))); 4374 WordShl(at_least_space_for, IntPtrConstant(1)));
4375 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); 4375 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity));
4376 } 4376 }
4377 4377
4378 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { 4378 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) {
4379 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right, 4379 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right,
4380 MachineType::PointerRepresentation()); 4380 MachineType::PointerRepresentation());
4381 } 4381 }
4382 4382
4383 Node* CodeStubAssembler::IntPtrMin(Node* left, Node* right) {
4384 return SelectConstant(IntPtrLessThanOrEqual(left, right), left, right,
4385 MachineType::PointerRepresentation());
4386 }
4387
4383 template <class Dictionary> 4388 template <class Dictionary>
4384 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) { 4389 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) {
4385 return LoadFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex); 4390 return LoadFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex);
4386 } 4391 }
4387 4392
4388 template <class Dictionary> 4393 template <class Dictionary>
4389 void CodeStubAssembler::SetNumberOfElements(Node* dictionary, 4394 void CodeStubAssembler::SetNumberOfElements(Node* dictionary,
4390 Node* num_elements_smi) { 4395 Node* num_elements_smi) {
4391 StoreFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex, 4396 StoreFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex,
4392 num_elements_smi, SKIP_WRITE_BARRIER); 4397 num_elements_smi, SKIP_WRITE_BARRIER);
(...skipping 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after
8289 Heap::kUndefinedValueRootIndex); 8294 Heap::kUndefinedValueRootIndex);
8290 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, 8295 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset,
8291 Heap::kUndefinedValueRootIndex); 8296 Heap::kUndefinedValueRootIndex);
8292 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, 8297 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset,
8293 context); 8298 context);
8294 return result; 8299 return result;
8295 } 8300 }
8296 8301
8297 } // namespace internal 8302 } // namespace internal
8298 } // namespace v8 8303 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698