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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 // Add a small set of deopt entry addresses to encoder without generating the | 372 // Add a small set of deopt entry addresses to encoder without generating the |
373 // deopt table code, which isn't possible at deserialization time. | 373 // deopt table code, which isn't possible at deserialization time. |
374 HandleScope scope(isolate); | 374 HandleScope scope(isolate); |
375 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { | 375 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { |
376 Address address = Deoptimizer::GetDeoptimizationEntry( | 376 Address address = Deoptimizer::GetDeoptimizationEntry( |
377 isolate, entry, Deoptimizer::LAZY, | 377 isolate, entry, Deoptimizer::LAZY, |
378 Deoptimizer::CALCULATE_ENTRY_ADDRESS); | 378 Deoptimizer::CALCULATE_ENTRY_ADDRESS); |
379 Add(address, "lazy_deopt"); | 379 Add(address, "lazy_deopt"); |
380 } | 380 } |
| 381 |
| 382 // Add external references provided by the embedder (a null-terminated array). |
| 383 intptr_t* api_external_references = isolate->api_external_references(); |
| 384 if (api_external_references != nullptr) { |
| 385 while (*api_external_references != 0) { |
| 386 Add(reinterpret_cast<Address>(*api_external_references), "<embedder>"); |
| 387 api_external_references++; |
| 388 } |
| 389 } |
381 } | 390 } |
382 | 391 |
383 } // namespace internal | 392 } // namespace internal |
384 } // namespace v8 | 393 } // namespace v8 |
OLD | NEW |