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

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

Issue 2395453002: [stubs] Add String and JSReceiver instance type predicates (Closed)
Patch Set: Created 4 years, 2 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 PrimitiveType primitive_type, 480 PrimitiveType primitive_type,
481 char const* method_name); 481 char const* method_name);
482 482
483 // Throws a TypeError for {method_name} if {value} is not of the given 483 // Throws a TypeError for {method_name} if {value} is not of the given
484 // instance type. Returns {value}'s map. 484 // instance type. Returns {value}'s map.
485 compiler::Node* ThrowIfNotInstanceType(compiler::Node* context, 485 compiler::Node* ThrowIfNotInstanceType(compiler::Node* context,
486 compiler::Node* value, 486 compiler::Node* value,
487 InstanceType instance_type, 487 InstanceType instance_type,
488 char const* method_name); 488 char const* method_name);
489 489
490 // Type checks.
491 compiler::Node* IsStringInstanceType(compiler::Node* instance_type);
492 compiler::Node* IsJSReceiverInstanceType(compiler::Node* instance_type);
493
490 // String helpers. 494 // String helpers.
491 // Load a character from a String (might flatten a ConsString). 495 // Load a character from a String (might flatten a ConsString).
492 compiler::Node* StringCharCodeAt(compiler::Node* string, 496 compiler::Node* StringCharCodeAt(compiler::Node* string,
493 compiler::Node* smi_index); 497 compiler::Node* smi_index);
494 // Return the single character string with only {code}. 498 // Return the single character string with only {code}.
495 compiler::Node* StringFromCharCode(compiler::Node* code); 499 compiler::Node* StringFromCharCode(compiler::Node* code);
496 // Return a new string object which holds a substring containing the range 500 // Return a new string object which holds a substring containing the range
497 // [from,to[ of string. |from| and |to| are expected to be tagged. 501 // [from,to[ of string. |from| and |to| are expected to be tagged.
498 compiler::Node* SubString(compiler::Node* context, compiler::Node* string, 502 compiler::Node* SubString(compiler::Node* context, compiler::Node* string,
499 compiler::Node* from, compiler::Node* to); 503 compiler::Node* from, compiler::Node* to);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 Label* bailout); 887 Label* bailout);
884 888
885 static const int kElementLoopUnrollThreshold = 8; 889 static const int kElementLoopUnrollThreshold = 8;
886 }; 890 };
887 891
888 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 892 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
889 893
890 } // namespace internal 894 } // namespace internal
891 } // namespace v8 895 } // namespace v8
892 #endif // V8_CODE_STUB_ASSEMBLER_H_ 896 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698