| OLD | NEW |
| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void ExternalReferenceTable::Add(Address address, | 93 void ExternalReferenceTable::Add(Address address, |
| 94 TypeCode type, | 94 TypeCode type, |
| 95 uint16_t id, | 95 uint16_t id, |
| 96 const char* name) { | 96 const char* name) { |
| 97 DCHECK_NE(NULL, address); | 97 DCHECK_NE(NULL, address); |
| 98 ExternalReferenceEntry entry; | 98 ExternalReferenceEntry entry; |
| 99 entry.address = address; | 99 entry.address = address; |
| 100 entry.code = EncodeExternal(type, id); | 100 entry.code = EncodeExternal(type, id); |
| 101 entry.name = name; | 101 entry.name = name; |
| 102 DCHECK_NE(0, entry.code); | 102 DCHECK_NE(0, entry.code); |
| 103 // Assert that the code is added in ascending order to rule out duplicates. |
| 104 DCHECK((size() == 0) || (code(size() - 1) < entry.code)); |
| 103 refs_.Add(entry); | 105 refs_.Add(entry); |
| 104 if (id > max_id_[type]) max_id_[type] = id; | 106 if (id > max_id_[type]) max_id_[type] = id; |
| 105 } | 107 } |
| 106 | 108 |
| 107 | 109 |
| 108 void ExternalReferenceTable::PopulateTable(Isolate* isolate) { | 110 void ExternalReferenceTable::PopulateTable(Isolate* isolate) { |
| 109 for (int type_code = 0; type_code < kTypeCodeCount; type_code++) { | 111 for (int type_code = 0; type_code < kTypeCodeCount; type_code++) { |
| 110 max_id_[type_code] = 0; | 112 max_id_[type_code] = 0; |
| 111 } | 113 } |
| 112 | 114 |
| 115 // Miscellaneous |
| 116 Add(ExternalReference::roots_array_start(isolate).address(), |
| 117 "Heap::roots_array_start()"); |
| 118 Add(ExternalReference::address_of_stack_limit(isolate).address(), |
| 119 "StackGuard::address_of_jslimit()"); |
| 120 Add(ExternalReference::address_of_real_stack_limit(isolate).address(), |
| 121 "StackGuard::address_of_real_jslimit()"); |
| 122 Add(ExternalReference::new_space_start(isolate).address(), |
| 123 "Heap::NewSpaceStart()"); |
| 124 Add(ExternalReference::new_space_mask(isolate).address(), |
| 125 "Heap::NewSpaceMask()"); |
| 126 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(), |
| 127 "Heap::NewSpaceAllocationLimitAddress()"); |
| 128 Add(ExternalReference::new_space_allocation_top_address(isolate).address(), |
| 129 "Heap::NewSpaceAllocationTopAddress()"); |
| 130 Add(ExternalReference::debug_break(isolate).address(), "Debug::Break()"); |
| 131 Add(ExternalReference::debug_step_in_fp_address(isolate).address(), |
| 132 "Debug::step_in_fp_addr()"); |
| 133 Add(ExternalReference::mod_two_doubles_operation(isolate).address(), |
| 134 "mod_two_doubles"); |
| 135 // Keyed lookup cache. |
| 136 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(), |
| 137 "KeyedLookupCache::keys()"); |
| 138 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(), |
| 139 "KeyedLookupCache::field_offsets()"); |
| 140 Add(ExternalReference::handle_scope_next_address(isolate).address(), |
| 141 "HandleScope::next"); |
| 142 Add(ExternalReference::handle_scope_limit_address(isolate).address(), |
| 143 "HandleScope::limit"); |
| 144 Add(ExternalReference::handle_scope_level_address(isolate).address(), |
| 145 "HandleScope::level"); |
| 146 Add(ExternalReference::new_deoptimizer_function(isolate).address(), |
| 147 "Deoptimizer::New()"); |
| 148 Add(ExternalReference::compute_output_frames_function(isolate).address(), |
| 149 "Deoptimizer::ComputeOutputFrames()"); |
| 150 Add(ExternalReference::address_of_min_int().address(), |
| 151 "LDoubleConstant::min_int"); |
| 152 Add(ExternalReference::address_of_one_half().address(), |
| 153 "LDoubleConstant::one_half"); |
| 154 Add(ExternalReference::isolate_address(isolate).address(), "isolate"); |
| 155 Add(ExternalReference::address_of_negative_infinity().address(), |
| 156 "LDoubleConstant::negative_infinity"); |
| 157 Add(ExternalReference::power_double_double_function(isolate).address(), |
| 158 "power_double_double_function"); |
| 159 Add(ExternalReference::power_double_int_function(isolate).address(), |
| 160 "power_double_int_function"); |
| 161 Add(ExternalReference::math_log_double_function(isolate).address(), |
| 162 "std::log"); |
| 163 Add(ExternalReference::store_buffer_top(isolate).address(), |
| 164 "store_buffer_top"); |
| 165 Add(ExternalReference::address_of_canonical_non_hole_nan().address(), |
| 166 "canonical_nan"); |
| 167 Add(ExternalReference::address_of_the_hole_nan().address(), "the_hole_nan"); |
| 168 Add(ExternalReference::get_date_field_function(isolate).address(), |
| 169 "JSDate::GetField"); |
| 170 Add(ExternalReference::date_cache_stamp(isolate).address(), |
| 171 "date_cache_stamp"); |
| 172 Add(ExternalReference::address_of_pending_message_obj(isolate).address(), |
| 173 "address_of_pending_message_obj"); |
| 174 Add(ExternalReference::address_of_has_pending_message(isolate).address(), |
| 175 "address_of_has_pending_message"); |
| 176 Add(ExternalReference::address_of_pending_message_script(isolate).address(), |
| 177 "pending_message_script"); |
| 178 Add(ExternalReference::get_make_code_young_function(isolate).address(), |
| 179 "Code::MakeCodeYoung"); |
| 180 Add(ExternalReference::cpu_features().address(), "cpu_features"); |
| 181 Add(ExternalReference(Runtime::kAllocateInNewSpace, isolate).address(), |
| 182 "Runtime::AllocateInNewSpace"); |
| 183 Add(ExternalReference(Runtime::kAllocateInTargetSpace, isolate).address(), |
| 184 "Runtime::AllocateInTargetSpace"); |
| 185 Add(ExternalReference::old_pointer_space_allocation_top_address(isolate) |
| 186 .address(), |
| 187 "Heap::OldPointerSpaceAllocationTopAddress"); |
| 188 Add(ExternalReference::old_pointer_space_allocation_limit_address(isolate) |
| 189 .address(), |
| 190 "Heap::OldPointerSpaceAllocationLimitAddress"); |
| 191 Add(ExternalReference::old_data_space_allocation_top_address(isolate) |
| 192 .address(), |
| 193 "Heap::OldDataSpaceAllocationTopAddress"); |
| 194 Add(ExternalReference::old_data_space_allocation_limit_address(isolate) |
| 195 .address(), |
| 196 "Heap::OldDataSpaceAllocationLimitAddress"); |
| 197 Add(ExternalReference::allocation_sites_list_address(isolate).address(), |
| 198 "Heap::allocation_sites_list_address()"); |
| 199 Add(ExternalReference::address_of_uint32_bias().address(), "uint32_bias"); |
| 200 Add(ExternalReference::get_mark_code_as_executed_function(isolate).address(), |
| 201 "Code::MarkCodeAsExecuted"); |
| 202 Add(ExternalReference::is_profiling_address(isolate).address(), |
| 203 "CpuProfiler::is_profiling"); |
| 204 Add(ExternalReference::scheduled_exception_address(isolate).address(), |
| 205 "Isolate::scheduled_exception"); |
| 206 Add(ExternalReference::invoke_function_callback(isolate).address(), |
| 207 "InvokeFunctionCallback"); |
| 208 Add(ExternalReference::invoke_accessor_getter_callback(isolate).address(), |
| 209 "InvokeAccessorGetterCallback"); |
| 210 Add(ExternalReference::flush_icache_function(isolate).address(), |
| 211 "CpuFeatures::FlushICache"); |
| 212 Add(ExternalReference::log_enter_external_function(isolate).address(), |
| 213 "Logger::EnterExternal"); |
| 214 Add(ExternalReference::log_leave_external_function(isolate).address(), |
| 215 "Logger::LeaveExternal"); |
| 216 Add(ExternalReference::address_of_minus_one_half().address(), |
| 217 "double_constants.minus_one_half"); |
| 218 Add(ExternalReference::stress_deopt_count(isolate).address(), |
| 219 "Isolate::stress_deopt_count_address()"); |
| 220 Add(ExternalReference::incremental_marking_record_write_function(isolate) |
| 221 .address(), |
| 222 "IncrementalMarking::RecordWriteFromCode"); |
| 223 |
| 224 // Debug addresses |
| 225 Add(ExternalReference::debug_after_break_target_address(isolate).address(), |
| 226 "Debug::after_break_target_address()"); |
| 227 Add(ExternalReference::debug_restarter_frame_function_pointer_address(isolate) |
| 228 .address(), |
| 229 "Debug::restarter_frame_function_pointer_address()"); |
| 230 Add(ExternalReference::debug_is_active_address(isolate).address(), |
| 231 "Debug::is_active_address()"); |
| 232 |
| 233 #ifndef V8_INTERPRETED_REGEXP |
| 234 Add(ExternalReference::re_case_insensitive_compare_uc16(isolate).address(), |
| 235 "NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()"); |
| 236 Add(ExternalReference::re_check_stack_guard_state(isolate).address(), |
| 237 "RegExpMacroAssembler*::CheckStackGuardState()"); |
| 238 Add(ExternalReference::re_grow_stack(isolate).address(), |
| 239 "NativeRegExpMacroAssembler::GrowStack()"); |
| 240 Add(ExternalReference::re_word_character_map().address(), |
| 241 "NativeRegExpMacroAssembler::word_character_map"); |
| 242 Add(ExternalReference::address_of_regexp_stack_limit(isolate).address(), |
| 243 "RegExpStack::limit_address()"); |
| 244 Add(ExternalReference::address_of_regexp_stack_memory_address(isolate) |
| 245 .address(), |
| 246 "RegExpStack::memory_address()"); |
| 247 Add(ExternalReference::address_of_regexp_stack_memory_size(isolate).address(), |
| 248 "RegExpStack::memory_size()"); |
| 249 Add(ExternalReference::address_of_static_offsets_vector(isolate).address(), |
| 250 "OffsetsVector::static_offsets_vector"); |
| 251 #endif // V8_INTERPRETED_REGEXP |
| 252 |
| 113 // The following populates all of the different type of external references | 253 // The following populates all of the different type of external references |
| 114 // into the ExternalReferenceTable. | 254 // into the ExternalReferenceTable. |
| 115 // | 255 // |
| 116 // NOTE: This function was originally 100k of code. It has since been | 256 // NOTE: This function was originally 100k of code. It has since been |
| 117 // rewritten to be mostly table driven, as the callback macro style tends to | 257 // rewritten to be mostly table driven, as the callback macro style tends to |
| 118 // very easily cause code bloat. Please be careful in the future when adding | 258 // very easily cause code bloat. Please be careful in the future when adding |
| 119 // new references. | 259 // new references. |
| 120 | 260 |
| 121 struct RefTableEntry { | 261 struct RefTableEntry { |
| 122 TypeCode type; | 262 TypeCode type; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 ACCESSOR, \ | 373 ACCESSOR, \ |
| 234 Accessors::k##name##Setter, \ | 374 Accessors::k##name##Setter, \ |
| 235 "Accessors::" #name "Setter"); | 375 "Accessors::" #name "Setter"); |
| 236 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) | 376 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) |
| 237 #undef ACCESSOR_INFO_DECLARATION | 377 #undef ACCESSOR_INFO_DECLARATION |
| 238 | 378 |
| 239 StubCache* stub_cache = isolate->stub_cache(); | 379 StubCache* stub_cache = isolate->stub_cache(); |
| 240 | 380 |
| 241 // Stub cache tables | 381 // Stub cache tables |
| 242 Add(stub_cache->key_reference(StubCache::kPrimary).address(), | 382 Add(stub_cache->key_reference(StubCache::kPrimary).address(), |
| 243 STUB_CACHE_TABLE, | 383 STUB_CACHE_TABLE, 1, "StubCache::primary_->key"); |
| 244 1, | |
| 245 "StubCache::primary_->key"); | |
| 246 Add(stub_cache->value_reference(StubCache::kPrimary).address(), | 384 Add(stub_cache->value_reference(StubCache::kPrimary).address(), |
| 247 STUB_CACHE_TABLE, | 385 STUB_CACHE_TABLE, 2, "StubCache::primary_->value"); |
| 248 2, | |
| 249 "StubCache::primary_->value"); | |
| 250 Add(stub_cache->map_reference(StubCache::kPrimary).address(), | 386 Add(stub_cache->map_reference(StubCache::kPrimary).address(), |
| 251 STUB_CACHE_TABLE, | 387 STUB_CACHE_TABLE, 3, "StubCache::primary_->map"); |
| 252 3, | |
| 253 "StubCache::primary_->map"); | |
| 254 Add(stub_cache->key_reference(StubCache::kSecondary).address(), | 388 Add(stub_cache->key_reference(StubCache::kSecondary).address(), |
| 255 STUB_CACHE_TABLE, | 389 STUB_CACHE_TABLE, 4, "StubCache::secondary_->key"); |
| 256 4, | |
| 257 "StubCache::secondary_->key"); | |
| 258 Add(stub_cache->value_reference(StubCache::kSecondary).address(), | 390 Add(stub_cache->value_reference(StubCache::kSecondary).address(), |
| 259 STUB_CACHE_TABLE, | 391 STUB_CACHE_TABLE, 5, "StubCache::secondary_->value"); |
| 260 5, | |
| 261 "StubCache::secondary_->value"); | |
| 262 Add(stub_cache->map_reference(StubCache::kSecondary).address(), | 392 Add(stub_cache->map_reference(StubCache::kSecondary).address(), |
| 263 STUB_CACHE_TABLE, | 393 STUB_CACHE_TABLE, 6, "StubCache::secondary_->map"); |
| 264 6, | |
| 265 "StubCache::secondary_->map"); | |
| 266 | 394 |
| 267 // Runtime entries | 395 // Runtime entries |
| 268 Add(ExternalReference::delete_handle_scope_extensions(isolate).address(), | 396 Add(ExternalReference::delete_handle_scope_extensions(isolate).address(), |
| 269 RUNTIME_ENTRY, | 397 RUNTIME_ENTRY, 1, "HandleScope::DeleteExtensions"); |
| 270 4, | 398 Add(ExternalReference::incremental_marking_record_write_function(isolate) |
| 271 "HandleScope::DeleteExtensions"); | 399 .address(), |
| 272 Add(ExternalReference:: | 400 RUNTIME_ENTRY, 2, "IncrementalMarking::RecordWrite"); |
| 273 incremental_marking_record_write_function(isolate).address(), | |
| 274 RUNTIME_ENTRY, | |
| 275 5, | |
| 276 "IncrementalMarking::RecordWrite"); | |
| 277 Add(ExternalReference::store_buffer_overflow_function(isolate).address(), | 401 Add(ExternalReference::store_buffer_overflow_function(isolate).address(), |
| 278 RUNTIME_ENTRY, | 402 RUNTIME_ENTRY, 3, "StoreBuffer::StoreBufferOverflow"); |
| 279 6, | |
| 280 "StoreBuffer::StoreBufferOverflow"); | |
| 281 | |
| 282 // Miscellaneous | |
| 283 Add(ExternalReference::roots_array_start(isolate).address(), | |
| 284 UNCLASSIFIED, | |
| 285 3, | |
| 286 "Heap::roots_array_start()"); | |
| 287 Add(ExternalReference::address_of_stack_limit(isolate).address(), | |
| 288 UNCLASSIFIED, | |
| 289 4, | |
| 290 "StackGuard::address_of_jslimit()"); | |
| 291 Add(ExternalReference::address_of_real_stack_limit(isolate).address(), | |
| 292 UNCLASSIFIED, | |
| 293 5, | |
| 294 "StackGuard::address_of_real_jslimit()"); | |
| 295 #ifndef V8_INTERPRETED_REGEXP | |
| 296 Add(ExternalReference::address_of_regexp_stack_limit(isolate).address(), | |
| 297 UNCLASSIFIED, | |
| 298 6, | |
| 299 "RegExpStack::limit_address()"); | |
| 300 Add(ExternalReference::address_of_regexp_stack_memory_address( | |
| 301 isolate).address(), | |
| 302 UNCLASSIFIED, | |
| 303 7, | |
| 304 "RegExpStack::memory_address()"); | |
| 305 Add(ExternalReference::address_of_regexp_stack_memory_size(isolate).address(), | |
| 306 UNCLASSIFIED, | |
| 307 8, | |
| 308 "RegExpStack::memory_size()"); | |
| 309 Add(ExternalReference::address_of_static_offsets_vector(isolate).address(), | |
| 310 UNCLASSIFIED, | |
| 311 9, | |
| 312 "OffsetsVector::static_offsets_vector"); | |
| 313 #endif // V8_INTERPRETED_REGEXP | |
| 314 Add(ExternalReference::new_space_start(isolate).address(), | |
| 315 UNCLASSIFIED, | |
| 316 10, | |
| 317 "Heap::NewSpaceStart()"); | |
| 318 Add(ExternalReference::new_space_mask(isolate).address(), | |
| 319 UNCLASSIFIED, | |
| 320 11, | |
| 321 "Heap::NewSpaceMask()"); | |
| 322 Add(ExternalReference::new_space_allocation_limit_address(isolate).address(), | |
| 323 UNCLASSIFIED, | |
| 324 14, | |
| 325 "Heap::NewSpaceAllocationLimitAddress()"); | |
| 326 Add(ExternalReference::new_space_allocation_top_address(isolate).address(), | |
| 327 UNCLASSIFIED, | |
| 328 15, | |
| 329 "Heap::NewSpaceAllocationTopAddress()"); | |
| 330 Add(ExternalReference::debug_break(isolate).address(), | |
| 331 UNCLASSIFIED, | |
| 332 16, | |
| 333 "Debug::Break()"); | |
| 334 Add(ExternalReference::debug_step_in_fp_address(isolate).address(), | |
| 335 UNCLASSIFIED, | |
| 336 17, | |
| 337 "Debug::step_in_fp_addr()"); | |
| 338 Add(ExternalReference::mod_two_doubles_operation(isolate).address(), | |
| 339 UNCLASSIFIED, | |
| 340 22, | |
| 341 "mod_two_doubles"); | |
| 342 #ifndef V8_INTERPRETED_REGEXP | |
| 343 Add(ExternalReference::re_case_insensitive_compare_uc16(isolate).address(), | |
| 344 UNCLASSIFIED, | |
| 345 24, | |
| 346 "NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()"); | |
| 347 Add(ExternalReference::re_check_stack_guard_state(isolate).address(), | |
| 348 UNCLASSIFIED, | |
| 349 25, | |
| 350 "RegExpMacroAssembler*::CheckStackGuardState()"); | |
| 351 Add(ExternalReference::re_grow_stack(isolate).address(), | |
| 352 UNCLASSIFIED, | |
| 353 26, | |
| 354 "NativeRegExpMacroAssembler::GrowStack()"); | |
| 355 Add(ExternalReference::re_word_character_map().address(), | |
| 356 UNCLASSIFIED, | |
| 357 27, | |
| 358 "NativeRegExpMacroAssembler::word_character_map"); | |
| 359 #endif // V8_INTERPRETED_REGEXP | |
| 360 // Keyed lookup cache. | |
| 361 Add(ExternalReference::keyed_lookup_cache_keys(isolate).address(), | |
| 362 UNCLASSIFIED, | |
| 363 28, | |
| 364 "KeyedLookupCache::keys()"); | |
| 365 Add(ExternalReference::keyed_lookup_cache_field_offsets(isolate).address(), | |
| 366 UNCLASSIFIED, | |
| 367 29, | |
| 368 "KeyedLookupCache::field_offsets()"); | |
| 369 Add(ExternalReference::handle_scope_next_address(isolate).address(), | |
| 370 UNCLASSIFIED, | |
| 371 31, | |
| 372 "HandleScope::next"); | |
| 373 Add(ExternalReference::handle_scope_limit_address(isolate).address(), | |
| 374 UNCLASSIFIED, | |
| 375 32, | |
| 376 "HandleScope::limit"); | |
| 377 Add(ExternalReference::handle_scope_level_address(isolate).address(), | |
| 378 UNCLASSIFIED, | |
| 379 33, | |
| 380 "HandleScope::level"); | |
| 381 Add(ExternalReference::new_deoptimizer_function(isolate).address(), | |
| 382 UNCLASSIFIED, | |
| 383 34, | |
| 384 "Deoptimizer::New()"); | |
| 385 Add(ExternalReference::compute_output_frames_function(isolate).address(), | |
| 386 UNCLASSIFIED, | |
| 387 35, | |
| 388 "Deoptimizer::ComputeOutputFrames()"); | |
| 389 Add(ExternalReference::address_of_min_int().address(), | |
| 390 UNCLASSIFIED, | |
| 391 36, | |
| 392 "LDoubleConstant::min_int"); | |
| 393 Add(ExternalReference::address_of_one_half().address(), | |
| 394 UNCLASSIFIED, | |
| 395 37, | |
| 396 "LDoubleConstant::one_half"); | |
| 397 Add(ExternalReference::isolate_address(isolate).address(), | |
| 398 UNCLASSIFIED, | |
| 399 38, | |
| 400 "isolate"); | |
| 401 Add(ExternalReference::address_of_minus_zero().address(), | |
| 402 UNCLASSIFIED, | |
| 403 39, | |
| 404 "LDoubleConstant::minus_zero"); | |
| 405 Add(ExternalReference::address_of_negative_infinity().address(), | |
| 406 UNCLASSIFIED, | |
| 407 40, | |
| 408 "LDoubleConstant::negative_infinity"); | |
| 409 Add(ExternalReference::power_double_double_function(isolate).address(), | |
| 410 UNCLASSIFIED, | |
| 411 41, | |
| 412 "power_double_double_function"); | |
| 413 Add(ExternalReference::power_double_int_function(isolate).address(), | |
| 414 UNCLASSIFIED, | |
| 415 42, | |
| 416 "power_double_int_function"); | |
| 417 Add(ExternalReference::store_buffer_top(isolate).address(), | |
| 418 UNCLASSIFIED, | |
| 419 43, | |
| 420 "store_buffer_top"); | |
| 421 Add(ExternalReference::address_of_canonical_non_hole_nan().address(), | |
| 422 UNCLASSIFIED, | |
| 423 44, | |
| 424 "canonical_nan"); | |
| 425 Add(ExternalReference::address_of_the_hole_nan().address(), | |
| 426 UNCLASSIFIED, | |
| 427 45, | |
| 428 "the_hole_nan"); | |
| 429 Add(ExternalReference::get_date_field_function(isolate).address(), | |
| 430 UNCLASSIFIED, | |
| 431 46, | |
| 432 "JSDate::GetField"); | |
| 433 Add(ExternalReference::date_cache_stamp(isolate).address(), | |
| 434 UNCLASSIFIED, | |
| 435 47, | |
| 436 "date_cache_stamp"); | |
| 437 Add(ExternalReference::address_of_pending_message_obj(isolate).address(), | |
| 438 UNCLASSIFIED, | |
| 439 48, | |
| 440 "address_of_pending_message_obj"); | |
| 441 Add(ExternalReference::address_of_has_pending_message(isolate).address(), | |
| 442 UNCLASSIFIED, | |
| 443 49, | |
| 444 "address_of_has_pending_message"); | |
| 445 Add(ExternalReference::address_of_pending_message_script(isolate).address(), | |
| 446 UNCLASSIFIED, | |
| 447 50, | |
| 448 "pending_message_script"); | |
| 449 Add(ExternalReference::get_make_code_young_function(isolate).address(), | |
| 450 UNCLASSIFIED, | |
| 451 51, | |
| 452 "Code::MakeCodeYoung"); | |
| 453 Add(ExternalReference::cpu_features().address(), | |
| 454 UNCLASSIFIED, | |
| 455 52, | |
| 456 "cpu_features"); | |
| 457 Add(ExternalReference(Runtime::kAllocateInNewSpace, isolate).address(), | |
| 458 UNCLASSIFIED, | |
| 459 53, | |
| 460 "Runtime::AllocateInNewSpace"); | |
| 461 Add(ExternalReference(Runtime::kAllocateInTargetSpace, isolate).address(), | |
| 462 UNCLASSIFIED, | |
| 463 54, | |
| 464 "Runtime::AllocateInTargetSpace"); | |
| 465 Add(ExternalReference::old_pointer_space_allocation_top_address( | |
| 466 isolate).address(), | |
| 467 UNCLASSIFIED, | |
| 468 55, | |
| 469 "Heap::OldPointerSpaceAllocationTopAddress"); | |
| 470 Add(ExternalReference::old_pointer_space_allocation_limit_address( | |
| 471 isolate).address(), | |
| 472 UNCLASSIFIED, | |
| 473 56, | |
| 474 "Heap::OldPointerSpaceAllocationLimitAddress"); | |
| 475 Add(ExternalReference::old_data_space_allocation_top_address( | |
| 476 isolate).address(), | |
| 477 UNCLASSIFIED, | |
| 478 57, | |
| 479 "Heap::OldDataSpaceAllocationTopAddress"); | |
| 480 Add(ExternalReference::old_data_space_allocation_limit_address( | |
| 481 isolate).address(), | |
| 482 UNCLASSIFIED, | |
| 483 58, | |
| 484 "Heap::OldDataSpaceAllocationLimitAddress"); | |
| 485 Add(ExternalReference::allocation_sites_list_address(isolate).address(), | |
| 486 UNCLASSIFIED, | |
| 487 59, | |
| 488 "Heap::allocation_sites_list_address()"); | |
| 489 Add(ExternalReference::address_of_uint32_bias().address(), | |
| 490 UNCLASSIFIED, | |
| 491 60, | |
| 492 "uint32_bias"); | |
| 493 Add(ExternalReference::get_mark_code_as_executed_function(isolate).address(), | |
| 494 UNCLASSIFIED, | |
| 495 61, | |
| 496 "Code::MarkCodeAsExecuted"); | |
| 497 | |
| 498 Add(ExternalReference::is_profiling_address(isolate).address(), | |
| 499 UNCLASSIFIED, | |
| 500 62, | |
| 501 "CpuProfiler::is_profiling"); | |
| 502 | |
| 503 Add(ExternalReference::scheduled_exception_address(isolate).address(), | |
| 504 UNCLASSIFIED, | |
| 505 63, | |
| 506 "Isolate::scheduled_exception"); | |
| 507 | |
| 508 Add(ExternalReference::invoke_function_callback(isolate).address(), | |
| 509 UNCLASSIFIED, | |
| 510 64, | |
| 511 "InvokeFunctionCallback"); | |
| 512 | |
| 513 Add(ExternalReference::invoke_accessor_getter_callback(isolate).address(), | |
| 514 UNCLASSIFIED, | |
| 515 65, | |
| 516 "InvokeAccessorGetterCallback"); | |
| 517 | |
| 518 // Debug addresses | |
| 519 Add(ExternalReference::debug_after_break_target_address(isolate).address(), | |
| 520 UNCLASSIFIED, | |
| 521 66, | |
| 522 "Debug::after_break_target_address()"); | |
| 523 | |
| 524 Add(ExternalReference::debug_restarter_frame_function_pointer_address( | |
| 525 isolate).address(), | |
| 526 UNCLASSIFIED, | |
| 527 67, | |
| 528 "Debug::restarter_frame_function_pointer_address()"); | |
| 529 | 403 |
| 530 // Add a small set of deopt entry addresses to encoder without generating the | 404 // Add a small set of deopt entry addresses to encoder without generating the |
| 531 // deopt table code, which isn't possible at deserialization time. | 405 // deopt table code, which isn't possible at deserialization time. |
| 532 HandleScope scope(isolate); | 406 HandleScope scope(isolate); |
| 533 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { | 407 for (int entry = 0; entry < kDeoptTableSerializeEntryCount; ++entry) { |
| 534 Address address = Deoptimizer::GetDeoptimizationEntry( | 408 Address address = Deoptimizer::GetDeoptimizationEntry( |
| 535 isolate, | 409 isolate, |
| 536 entry, | 410 entry, |
| 537 Deoptimizer::LAZY, | 411 Deoptimizer::LAZY, |
| 538 Deoptimizer::CALCULATE_ENTRY_ADDRESS); | 412 Deoptimizer::CALCULATE_ENTRY_ADDRESS); |
| (...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2070 | 1944 |
| 2071 int SerializedCodeData::CheckSum(String* string) { | 1945 int SerializedCodeData::CheckSum(String* string) { |
| 2072 int checksum = Version::Hash(); | 1946 int checksum = Version::Hash(); |
| 2073 #ifdef DEBUG | 1947 #ifdef DEBUG |
| 2074 uint32_t seed = static_cast<uint32_t>(checksum); | 1948 uint32_t seed = static_cast<uint32_t>(checksum); |
| 2075 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); | 1949 checksum = static_cast<int>(IteratingStringHasher::Hash(string, seed)); |
| 2076 #endif // DEBUG | 1950 #endif // DEBUG |
| 2077 return checksum; | 1951 return checksum; |
| 2078 } | 1952 } |
| 2079 } } // namespace v8::internal | 1953 } } // namespace v8::internal |
| OLD | NEW |