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

Side by Side Diff: src/external-reference-table.cc

Issue 2090723005: [builtins] New frame type for exits to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 #include "src/external-reference-table.h" 5 #include "src/external-reference-table.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // rewritten to be mostly table driven, as the callback macro style tends to 231 // rewritten to be mostly table driven, as the callback macro style tends to
232 // very easily cause code bloat. Please be careful in the future when adding 232 // very easily cause code bloat. Please be careful in the future when adding
233 // new references. 233 // new references.
234 234
235 struct RefTableEntry { 235 struct RefTableEntry {
236 uint16_t id; 236 uint16_t id;
237 const char* name; 237 const char* name;
238 }; 238 };
239 239
240 static const RefTableEntry c_builtins[] = { 240 static const RefTableEntry c_builtins[] = {
241 #define DEF_ENTRY_C(name) {Builtins::c_##name, "Builtins::" #name}, 241 #define DEF_ENTRY_C(name, ignore) {Builtins::c_##name, "Builtins::" #name},
242 BUILTIN_LIST_C(DEF_ENTRY_C) 242 BUILTIN_LIST_C(DEF_ENTRY_C)
243 #undef DEF_ENTRY_C 243 #undef DEF_ENTRY_C
244 }; 244 };
245 245
246 for (unsigned i = 0; i < arraysize(c_builtins); ++i) { 246 for (unsigned i = 0; i < arraysize(c_builtins); ++i) {
247 ExternalReference ref(static_cast<Builtins::CFunctionId>(c_builtins[i].id), 247 ExternalReference ref(static_cast<Builtins::CFunctionId>(c_builtins[i].id),
248 isolate); 248 isolate);
249 Add(ref.address(), c_builtins[i].name); 249 Add(ref.address(), c_builtins[i].name);
250 } 250 }
251 251
252 static const RefTableEntry builtins[] = { 252 static const RefTableEntry builtins[] = {
253 #define DEF_ENTRY_C(name) {Builtins::k##name, "Builtins::" #name}, 253 #define DEF_ENTRY_C(name, ignore) {Builtins::k##name, "Builtins::" #name},
254 #define DEF_ENTRY_A(name, i1, i2) {Builtins::k##name, "Builtins::" #name}, 254 #define DEF_ENTRY_A(name, i1, i2) {Builtins::k##name, "Builtins::" #name},
255 BUILTIN_LIST_C(DEF_ENTRY_C) BUILTIN_LIST_A(DEF_ENTRY_A) 255 BUILTIN_LIST_C(DEF_ENTRY_C) BUILTIN_LIST_A(DEF_ENTRY_A)
256 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A) 256 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A)
257 #undef DEF_ENTRY_C 257 #undef DEF_ENTRY_C
258 #undef DEF_ENTRY_A 258 #undef DEF_ENTRY_A
259 }; 259 };
260 260
261 for (unsigned i = 0; i < arraysize(builtins); ++i) { 261 for (unsigned i = 0; i < arraysize(builtins); ++i) {
262 ExternalReference ref(static_cast<Builtins::Name>(builtins[i].id), isolate); 262 ExternalReference ref(static_cast<Builtins::Name>(builtins[i].id), isolate);
263 Add(ref.address(), builtins[i].name); 263 Add(ref.address(), builtins[i].name);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 if (api_external_references != nullptr) { 384 if (api_external_references != nullptr) {
385 while (*api_external_references != 0) { 385 while (*api_external_references != 0) {
386 Add(reinterpret_cast<Address>(*api_external_references), "<embedder>"); 386 Add(reinterpret_cast<Address>(*api_external_references), "<embedder>");
387 api_external_references++; 387 api_external_references++;
388 } 388 }
389 } 389 }
390 } 390 }
391 391
392 } // namespace internal 392 } // namespace internal
393 } // namespace v8 393 } // namespace v8
OLDNEW
« src/builtins.h ('K') | « src/debug/liveedit.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698