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

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

Issue 2302923002: [stubs] Port ToName stub to TurboFan. (Closed)
Patch Set: Create ToName helper and inline Interpreter::DoToName Created 4 years, 3 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
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 4
5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 PrimitiveType primitive_type, 347 PrimitiveType primitive_type,
348 char const* method_name); 348 char const* method_name);
349 349
350 // String helpers. 350 // String helpers.
351 // Load a character from a String (might flatten a ConsString). 351 // Load a character from a String (might flatten a ConsString).
352 compiler::Node* StringCharCodeAt(compiler::Node* string, 352 compiler::Node* StringCharCodeAt(compiler::Node* string,
353 compiler::Node* smi_index); 353 compiler::Node* smi_index);
354 // Return the single character string with only {code}. 354 // Return the single character string with only {code}.
355 compiler::Node* StringFromCharCode(compiler::Node* code); 355 compiler::Node* StringFromCharCode(compiler::Node* code);
356 356
357 // Type conversion helpers.
358 // Convert an object to a name.
359 compiler::Node* ToName(compiler::Node* context, compiler::Node* input);
360
357 // Returns a node that is true if the given bit is set in |word32|. 361 // Returns a node that is true if the given bit is set in |word32|.
358 template <typename T> 362 template <typename T>
359 compiler::Node* BitFieldDecode(compiler::Node* word32) { 363 compiler::Node* BitFieldDecode(compiler::Node* word32) {
360 return BitFieldDecode(word32, T::kShift, T::kMask); 364 return BitFieldDecode(word32, T::kShift, T::kMask);
361 } 365 }
362 366
363 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift, 367 compiler::Node* BitFieldDecode(compiler::Node* word32, uint32_t shift,
364 uint32_t mask); 368 uint32_t mask);
365 369
366 void SetCounter(StatsCounter* counter, int value); 370 void SetCounter(StatsCounter* counter, int value);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 compiler::Node* SmiShiftBitsConstant(); 612 compiler::Node* SmiShiftBitsConstant();
609 613
610 static const int kElementLoopUnrollThreshold = 8; 614 static const int kElementLoopUnrollThreshold = 8;
611 }; 615 };
612 616
613 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 617 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
614 618
615 } // namespace internal 619 } // namespace internal
616 } // namespace v8 620 } // namespace v8
617 #endif // V8_CODE_STUB_ASSEMBLER_H_ 621 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stub-assembler.cc » ('j') | src/code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698