| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 const int kCodeWithIdTag = 0; | 344 const int kCodeWithIdTag = 0; |
| 345 const int kDeoptReasonTag = 1; | 345 const int kDeoptReasonTag = 1; |
| 346 | 346 |
| 347 void RelocInfo::update_wasm_memory_reference( | 347 void RelocInfo::update_wasm_memory_reference( |
| 348 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, | 348 Address old_base, Address new_base, uint32_t old_size, uint32_t new_size, |
| 349 ICacheFlushMode icache_flush_mode) { | 349 ICacheFlushMode icache_flush_mode) { |
| 350 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); | 350 DCHECK(IsWasmMemoryReference(rmode_) || IsWasmMemorySizeReference(rmode_)); |
| 351 if (IsWasmMemoryReference(rmode_)) { | 351 if (IsWasmMemoryReference(rmode_)) { |
| 352 Address updated_reference; | 352 Address updated_reference; |
| 353 DCHECK(old_size == 0 || Memory::IsAddressInRange( | |
| 354 old_base, wasm_memory_reference(), old_size)); | |
| 355 updated_reference = new_base + (wasm_memory_reference() - old_base); | 353 updated_reference = new_base + (wasm_memory_reference() - old_base); |
| 356 DCHECK(new_size == 0 || | 354 // The reference is not checked here but at runtime. Validity of references |
| 357 Memory::IsAddressInRange(new_base, updated_reference, new_size)); | 355 // may change over time. |
| 358 unchecked_update_wasm_memory_reference(updated_reference, | 356 unchecked_update_wasm_memory_reference(updated_reference, |
| 359 icache_flush_mode); | 357 icache_flush_mode); |
| 360 } else if (IsWasmMemorySizeReference(rmode_)) { | 358 } else if (IsWasmMemorySizeReference(rmode_)) { |
| 361 uint32_t updated_size_reference; | 359 uint32_t updated_size_reference; |
| 362 DCHECK(old_size == 0 || wasm_memory_size_reference() <= old_size); | 360 DCHECK(old_size == 0 || wasm_memory_size_reference() <= old_size); |
| 363 updated_size_reference = | 361 updated_size_reference = |
| 364 new_size + (wasm_memory_size_reference() - old_size); | 362 new_size + (wasm_memory_size_reference() - old_size); |
| 365 DCHECK(updated_size_reference <= new_size); | 363 DCHECK(updated_size_reference <= new_size); |
| 366 unchecked_update_wasm_memory_size(updated_size_reference, | 364 unchecked_update_wasm_memory_size(updated_size_reference, |
| 367 icache_flush_mode); | 365 icache_flush_mode); |
| (...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1958 | 1956 |
| 1959 | 1957 |
| 1960 void Assembler::DataAlign(int m) { | 1958 void Assembler::DataAlign(int m) { |
| 1961 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1959 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1962 while ((pc_offset() & (m - 1)) != 0) { | 1960 while ((pc_offset() & (m - 1)) != 0) { |
| 1963 db(0); | 1961 db(0); |
| 1964 } | 1962 } |
| 1965 } | 1963 } |
| 1966 } // namespace internal | 1964 } // namespace internal |
| 1967 } // namespace v8 | 1965 } // namespace v8 |
| OLD | NEW |