OLD | NEW |
---|---|
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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 // or returns the {value} converted to a String otherwise. | 460 // or returns the {value} converted to a String otherwise. |
461 compiler::Node* ToThisString(compiler::Node* context, compiler::Node* value, | 461 compiler::Node* ToThisString(compiler::Node* context, compiler::Node* value, |
462 char const* method_name); | 462 char const* method_name); |
463 // Throws a TypeError for {method_name} if {value} is neither of the given | 463 // Throws a TypeError for {method_name} if {value} is neither of the given |
464 // {primitive_type} nor a JSValue wrapping a value of {primitive_type}, or | 464 // {primitive_type} nor a JSValue wrapping a value of {primitive_type}, or |
465 // returns the {value} (or wrapped value) otherwise. | 465 // returns the {value} (or wrapped value) otherwise. |
466 compiler::Node* ToThisValue(compiler::Node* context, compiler::Node* value, | 466 compiler::Node* ToThisValue(compiler::Node* context, compiler::Node* value, |
467 PrimitiveType primitive_type, | 467 PrimitiveType primitive_type, |
468 char const* method_name); | 468 char const* method_name); |
469 | 469 |
470 // Throws a TypeError for {method_name} if {value} is not of the given | |
471 // instance type. Returns {value}'s map. | |
472 compiler::Node* ThrowIfNotType(compiler::Node* context, compiler::Node* value, | |
Igor Sheludko
2016/09/29 12:55:29
Suggestion: ThrowIfNotInstanceType
jgruber
2016/09/29 14:40:27
Done.
| |
473 int instance_type, char const* method_name); | |
Igor Sheludko
2016/09/29 12:55:29
InstanceType instance_type
jgruber
2016/09/29 14:40:27
Done.
| |
474 | |
470 // String helpers. | 475 // String helpers. |
471 // Load a character from a String (might flatten a ConsString). | 476 // Load a character from a String (might flatten a ConsString). |
472 compiler::Node* StringCharCodeAt(compiler::Node* string, | 477 compiler::Node* StringCharCodeAt(compiler::Node* string, |
473 compiler::Node* smi_index); | 478 compiler::Node* smi_index); |
474 // Return the single character string with only {code}. | 479 // Return the single character string with only {code}. |
475 compiler::Node* StringFromCharCode(compiler::Node* code); | 480 compiler::Node* StringFromCharCode(compiler::Node* code); |
476 // Return a new string object which holds a substring containing the range | 481 // Return a new string object which holds a substring containing the range |
477 // [from,to[ of string. |from| and |to| are expected to be tagged. | 482 // [from,to[ of string. |from| and |to| are expected to be tagged. |
478 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, | 483 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, |
479 compiler::Node* from, compiler::Node* to); | 484 compiler::Node* from, compiler::Node* to); |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
863 Label* bailout); | 868 Label* bailout); |
864 | 869 |
865 static const int kElementLoopUnrollThreshold = 8; | 870 static const int kElementLoopUnrollThreshold = 8; |
866 }; | 871 }; |
867 | 872 |
868 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 873 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
869 | 874 |
870 } // namespace internal | 875 } // namespace internal |
871 } // namespace v8 | 876 } // namespace v8 |
872 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 877 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |