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

Side by Side Diff: src/builtins/builtins.cc

Issue 2839933003: [builtins] Builtins::CallableFor(): generate CPP case for ConsoleAssert only. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/builtins/builtins.h" 5 #include "src/builtins/builtins.h"
6 #include "src/api.h" 6 #include "src/api.h"
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/builtins/builtins-descriptors.h" 8 #include "src/builtins/builtins-descriptors.h"
9 #include "src/callable.h" 9 #include "src/callable.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 switch (name) { 120 switch (name) {
121 #define CASE(Name, ...) \ 121 #define CASE(Name, ...) \
122 case k##Name: { \ 122 case k##Name: { \
123 Handle<Code> code = isolate->builtins()->Name(); \ 123 Handle<Code> code = isolate->builtins()->Name(); \
124 auto descriptor = Builtin_##Name##_InterfaceDescriptor(isolate); \ 124 auto descriptor = Builtin_##Name##_InterfaceDescriptor(isolate); \
125 return Callable(code, descriptor); \ 125 return Callable(code, descriptor); \
126 } 126 }
127 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, CASE, CASE, 127 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, CASE, CASE,
128 CASE, IGNORE_BUILTIN, IGNORE_BUILTIN) 128 CASE, IGNORE_BUILTIN, IGNORE_BUILTIN)
129 #undef CASE 129 #undef CASE
130 #define CASE(Name, ...) \ 130 case kConsoleAssert: {
131 case k##Name: { \ 131 Handle<Code> code = isolate->builtins()->ConsoleAssert();
132 Handle<Code> code = isolate->builtins()->Name(); \ 132 return Callable(code, BuiltinDescriptor(isolate));
133 return Callable(code, BuiltinDescriptor(isolate)); \ 133 }
134 }
135 BUILTIN_LIST(CASE, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN,
136 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
137 #undef CASE
138 default: 134 default:
139 UNREACHABLE(); 135 UNREACHABLE();
140 return Callable(Handle<Code>::null(), VoidDescriptor(isolate)); 136 return Callable(Handle<Code>::null(), VoidDescriptor(isolate));
141 } 137 }
142 } 138 }
143 139
144 // static 140 // static
145 const char* Builtins::name(int index) { 141 const char* Builtins::name(int index) {
146 switch (index) { 142 switch (index) {
147 #define CASE(Name, ...) \ 143 #define CASE(Name, ...) \
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 // TODO(jochen): Remove this. 239 // TODO(jochen): Remove this.
244 if (responsible_context.is_null()) { 240 if (responsible_context.is_null()) {
245 return true; 241 return true;
246 } 242 }
247 if (*responsible_context == target->context()) return true; 243 if (*responsible_context == target->context()) return true;
248 return isolate->MayAccess(responsible_context, target_global_proxy); 244 return isolate->MayAccess(responsible_context, target_global_proxy);
249 } 245 }
250 246
251 } // namespace internal 247 } // namespace internal
252 } // namespace v8 248 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698