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

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

Issue 2074063002: [builtins] Always pass target and new target to C++ builtins (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/counters.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // rewritten to be mostly table driven, as the callback macro style tends to 227 // rewritten to be mostly table driven, as the callback macro style tends to
228 // very easily cause code bloat. Please be careful in the future when adding 228 // very easily cause code bloat. Please be careful in the future when adding
229 // new references. 229 // new references.
230 230
231 struct RefTableEntry { 231 struct RefTableEntry {
232 uint16_t id; 232 uint16_t id;
233 const char* name; 233 const char* name;
234 }; 234 };
235 235
236 static const RefTableEntry c_builtins[] = { 236 static const RefTableEntry c_builtins[] = {
237 #define DEF_ENTRY_C(name, ignored) {Builtins::c_##name, "Builtins::" #name}, 237 #define DEF_ENTRY_C(name) {Builtins::c_##name, "Builtins::" #name},
238 BUILTIN_LIST_C(DEF_ENTRY_C) 238 BUILTIN_LIST_C(DEF_ENTRY_C)
239 #undef DEF_ENTRY_C 239 #undef DEF_ENTRY_C
240 }; 240 };
241 241
242 for (unsigned i = 0; i < arraysize(c_builtins); ++i) { 242 for (unsigned i = 0; i < arraysize(c_builtins); ++i) {
243 ExternalReference ref(static_cast<Builtins::CFunctionId>(c_builtins[i].id), 243 ExternalReference ref(static_cast<Builtins::CFunctionId>(c_builtins[i].id),
244 isolate); 244 isolate);
245 Add(ref.address(), c_builtins[i].name); 245 Add(ref.address(), c_builtins[i].name);
246 } 246 }
247 247
248 static const RefTableEntry builtins[] = { 248 static const RefTableEntry builtins[] = {
249 #define DEF_ENTRY_C(name, ignored) {Builtins::k##name, "Builtins::" #name}, 249 #define DEF_ENTRY_C(name) {Builtins::k##name, "Builtins::" #name},
250 #define DEF_ENTRY_A(name, i1, i2) {Builtins::k##name, "Builtins::" #name}, 250 #define DEF_ENTRY_A(name, i1, i2) {Builtins::k##name, "Builtins::" #name},
251 BUILTIN_LIST_C(DEF_ENTRY_C) BUILTIN_LIST_A(DEF_ENTRY_A) 251 BUILTIN_LIST_C(DEF_ENTRY_C) BUILTIN_LIST_A(DEF_ENTRY_A)
252 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A) 252 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A)
253 #undef DEF_ENTRY_C 253 #undef DEF_ENTRY_C
254 #undef DEF_ENTRY_A 254 #undef DEF_ENTRY_A
255 }; 255 };
256 256
257 for (unsigned i = 0; i < arraysize(builtins); ++i) { 257 for (unsigned i = 0; i < arraysize(builtins); ++i) {
258 ExternalReference ref(static_cast<Builtins::Name>(builtins[i].id), isolate); 258 ExternalReference ref(static_cast<Builtins::Name>(builtins[i].id), isolate);
259 Add(ref.address(), builtins[i].name); 259 Add(ref.address(), builtins[i].name);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { 371 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) {
372 Address address = Deoptimizer::GetDeoptimizationEntry( 372 Address address = Deoptimizer::GetDeoptimizationEntry(
373 isolate, entry, Deoptimizer::LAZY, 373 isolate, entry, Deoptimizer::LAZY,
374 Deoptimizer::CALCULATE_ENTRY_ADDRESS); 374 Deoptimizer::CALCULATE_ENTRY_ADDRESS);
375 Add(address, "lazy_deopt"); 375 Add(address, "lazy_deopt");
376 } 376 }
377 } 377 }
378 378
379 } // namespace internal 379 } // namespace internal
380 } // namespace v8 380 } // namespace v8
OLDNEW
« no previous file with comments | « src/counters.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698