OLD | NEW |
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 Add(isolate->get_address_from_id(static_cast<Isolate::AddressId>(i)), | 290 Add(isolate->get_address_from_id(static_cast<Isolate::AddressId>(i)), |
291 address_names[i]); | 291 address_names[i]); |
292 } | 292 } |
293 | 293 |
294 // Accessors | 294 // Accessors |
295 struct AccessorRefTable { | 295 struct AccessorRefTable { |
296 Address address; | 296 Address address; |
297 const char* name; | 297 const char* name; |
298 }; | 298 }; |
299 | 299 |
300 static const AccessorRefTable accessors[] = { | 300 static const AccessorRefTable getters[] = { |
301 #define ACCESSOR_INFO_DECLARATION(name) \ | 301 #define ACCESSOR_INFO_DECLARATION(name) \ |
302 {FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter"}, | 302 {FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter"}, |
303 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) | 303 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) |
304 #undef ACCESSOR_INFO_DECLARATION | 304 #undef ACCESSOR_INFO_DECLARATION |
| 305 }; |
| 306 static const AccessorRefTable setters[] = { |
305 #define ACCESSOR_SETTER_DECLARATION(name) \ | 307 #define ACCESSOR_SETTER_DECLARATION(name) \ |
306 {FUNCTION_ADDR(&Accessors::name), "Accessors::" #name}, | 308 {FUNCTION_ADDR(&Accessors::name), "Accessors::" #name}, |
307 ACCESSOR_SETTER_LIST(ACCESSOR_SETTER_DECLARATION) | 309 ACCESSOR_SETTER_LIST(ACCESSOR_SETTER_DECLARATION) |
308 #undef ACCESSOR_INFO_DECLARATION | 310 #undef ACCESSOR_INFO_DECLARATION |
309 }; | 311 }; |
310 | 312 |
311 for (unsigned i = 0; i < arraysize(accessors); ++i) { | 313 for (unsigned i = 0; i < arraysize(getters); ++i) { |
312 Add(accessors[i].address, accessors[i].name); | 314 Add(getters[i].address, getters[i].name); |
| 315 #ifdef USE_SIMULATOR |
| 316 Add(AccessorInfo::redirect(isolate, getters[i].address, ACCESSOR_GETTER), |
| 317 getters[i].name); |
| 318 #endif |
| 319 } |
| 320 |
| 321 for (unsigned i = 0; i < arraysize(setters); ++i) { |
| 322 Add(setters[i].address, setters[i].name); |
313 } | 323 } |
314 | 324 |
315 StubCache* stub_cache = isolate->stub_cache(); | 325 StubCache* stub_cache = isolate->stub_cache(); |
316 | 326 |
317 // Stub cache tables | 327 // Stub cache tables |
318 Add(stub_cache->key_reference(StubCache::kPrimary).address(), | 328 Add(stub_cache->key_reference(StubCache::kPrimary).address(), |
319 "StubCache::primary_->key"); | 329 "StubCache::primary_->key"); |
320 Add(stub_cache->value_reference(StubCache::kPrimary).address(), | 330 Add(stub_cache->value_reference(StubCache::kPrimary).address(), |
321 "StubCache::primary_->value"); | 331 "StubCache::primary_->value"); |
322 Add(stub_cache->map_reference(StubCache::kPrimary).address(), | 332 Add(stub_cache->map_reference(StubCache::kPrimary).address(), |
(...skipping 24 matching lines...) Expand all Loading... |
347 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { | 357 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { |
348 Address address = Deoptimizer::GetDeoptimizationEntry( | 358 Address address = Deoptimizer::GetDeoptimizationEntry( |
349 isolate, entry, Deoptimizer::LAZY, | 359 isolate, entry, Deoptimizer::LAZY, |
350 Deoptimizer::CALCULATE_ENTRY_ADDRESS); | 360 Deoptimizer::CALCULATE_ENTRY_ADDRESS); |
351 Add(address, "lazy_deopt"); | 361 Add(address, "lazy_deopt"); |
352 } | 362 } |
353 } | 363 } |
354 | 364 |
355 } // namespace internal | 365 } // namespace internal |
356 } // namespace v8 | 366 } // namespace v8 |
OLD | NEW |