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

Side by Side Diff: src/interpreter/interpreter-intrinsics.h

Issue 2637403008: [async-iteration] add support for for-await-of loops in Async Functions (Closed)
Patch Set: Created 3 years, 11 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_INTERPRETER_INTERPRETER_INTRINSICS_H_ 5 #ifndef V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
6 #define V8_INTERPRETER_INTERPRETER_INTRINSICS_H_ 6 #define V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/builtins/builtins.h" 9 #include "src/builtins/builtins.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
11 #include "src/interpreter/bytecodes.h" 11 #include "src/interpreter/bytecodes.h"
12 #include "src/interpreter/interpreter-assembler.h" 12 #include "src/interpreter/interpreter-assembler.h"
13 #include "src/runtime/runtime.h" 13 #include "src/runtime/runtime.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 17
18 namespace compiler { 18 namespace compiler {
19 class Node; 19 class Node;
20 } // namespace compiler 20 } // namespace compiler
21 21
22 namespace interpreter { 22 namespace interpreter {
23 23
24 // List of supported intrisics, with upper case name, lower case name and 24 // List of supported intrisics, with upper case name, lower case name and
25 // expected number of arguments (-1 denoting argument count is variable). 25 // expected number of arguments (-1 denoting argument count is variable).
26 #define INTRINSICS_LIST(V) \ 26 #define INTRINSICS_LIST(V) \
27 V(Call, call, -1) \ 27 V(Call, call, -1) \
28 V(ClassOf, class_of, 1) \ 28 V(ClassOf, class_of, 1) \
29 V(CreateIterResultObject, create_iter_result_object, 2) \ 29 V(CreateAsyncFromSyncIterator, create_async_from_sync_iterator, 1) \
30 V(HasProperty, has_property, 2) \ 30 V(CreateIterResultObject, create_iter_result_object, 2) \
31 V(IsArray, is_array, 1) \ 31 V(HasProperty, has_property, 2) \
32 V(IsJSProxy, is_js_proxy, 1) \ 32 V(IsArray, is_array, 1) \
33 V(IsJSReceiver, is_js_receiver, 1) \ 33 V(IsJSProxy, is_js_proxy, 1) \
34 V(IsSmi, is_smi, 1) \ 34 V(IsJSReceiver, is_js_receiver, 1) \
35 V(IsTypedArray, is_typed_array, 1) \ 35 V(IsSmi, is_smi, 1) \
36 V(NumberToString, number_to_string, 1) \ 36 V(IsTypedArray, is_typed_array, 1) \
37 V(RegExpExec, reg_exp_exec, 4) \ 37 V(NumberToString, number_to_string, 1) \
38 V(SubString, sub_string, 3) \ 38 V(RegExpExec, reg_exp_exec, 4) \
39 V(ToString, to_string, 1) \ 39 V(SubString, sub_string, 3) \
40 V(ToLength, to_length, 1) \ 40 V(ToString, to_string, 1) \
41 V(ToInteger, to_integer, 1) \ 41 V(ToLength, to_length, 1) \
42 V(ToNumber, to_number, 1) \ 42 V(ToInteger, to_integer, 1) \
43 V(ToObject, to_object, 1) \ 43 V(ToNumber, to_number, 1) \
44 V(ToObject, to_object, 1) \
44 V(ValueOf, value_of, 1) 45 V(ValueOf, value_of, 1)
45 46
46 class IntrinsicsHelper { 47 class IntrinsicsHelper {
47 public: 48 public:
48 enum class IntrinsicId { 49 enum class IntrinsicId {
49 #define DECLARE_INTRINSIC_ID(name, lower_case, count) k##name, 50 #define DECLARE_INTRINSIC_ID(name, lower_case, count) k##name,
50 INTRINSICS_LIST(DECLARE_INTRINSIC_ID) 51 INTRINSICS_LIST(DECLARE_INTRINSIC_ID)
51 #undef DECLARE_INTRINSIC_ID 52 #undef DECLARE_INTRINSIC_ID
52 kIdCount 53 kIdCount
53 }; 54 };
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 InterpreterAssembler* assembler_; 93 InterpreterAssembler* assembler_;
93 94
94 DISALLOW_COPY_AND_ASSIGN(IntrinsicsHelper); 95 DISALLOW_COPY_AND_ASSIGN(IntrinsicsHelper);
95 }; 96 };
96 97
97 } // namespace interpreter 98 } // namespace interpreter
98 } // namespace internal 99 } // namespace internal
99 } // namespace v8 100 } // namespace v8
100 101
101 #endif 102 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698