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)); | |
titzer
2016/08/29 12:19:18
Wanna add a comment here as to why references can
ahaas
2016/08/29 12:53:21
Done.
| |
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 || | |
357 Memory::IsAddressInRange(new_base, updated_reference, new_size)); | |
358 unchecked_update_wasm_memory_reference(updated_reference, | 354 unchecked_update_wasm_memory_reference(updated_reference, |
359 icache_flush_mode); | 355 icache_flush_mode); |
360 } else if (IsWasmMemorySizeReference(rmode_)) { | 356 } else if (IsWasmMemorySizeReference(rmode_)) { |
361 uint32_t updated_size_reference; | 357 uint32_t updated_size_reference; |
362 DCHECK(old_size == 0 || wasm_memory_size_reference() <= old_size); | 358 DCHECK(old_size == 0 || wasm_memory_size_reference() <= old_size); |
363 updated_size_reference = | 359 updated_size_reference = |
364 new_size + (wasm_memory_size_reference() - old_size); | 360 new_size + (wasm_memory_size_reference() - old_size); |
365 DCHECK(updated_size_reference <= new_size); | 361 DCHECK(updated_size_reference <= new_size); |
366 unchecked_update_wasm_memory_size(updated_size_reference, | 362 unchecked_update_wasm_memory_size(updated_size_reference, |
367 icache_flush_mode); | 363 icache_flush_mode); |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1958 | 1954 |
1959 | 1955 |
1960 void Assembler::DataAlign(int m) { | 1956 void Assembler::DataAlign(int m) { |
1961 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1957 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1962 while ((pc_offset() & (m - 1)) != 0) { | 1958 while ((pc_offset() & (m - 1)) != 0) { |
1963 db(0); | 1959 db(0); |
1964 } | 1960 } |
1965 } | 1961 } |
1966 } // namespace internal | 1962 } // namespace internal |
1967 } // namespace v8 | 1963 } // namespace v8 |
OLD | NEW |