| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 if (IsWasmMemoryReference(rmode_)) { | 344 if (IsWasmMemoryReference(rmode_)) { |
| 345 Address updated_reference; | 345 Address updated_reference; |
| 346 DCHECK_GE(wasm_memory_reference(), old_base); | 346 DCHECK_GE(wasm_memory_reference(), old_base); |
| 347 updated_reference = new_base + (wasm_memory_reference() - old_base); | 347 updated_reference = new_base + (wasm_memory_reference() - old_base); |
| 348 // The reference is not checked here but at runtime. Validity of references | 348 // The reference is not checked here but at runtime. Validity of references |
| 349 // may change over time. | 349 // may change over time. |
| 350 unchecked_update_wasm_memory_reference(updated_reference, | 350 unchecked_update_wasm_memory_reference(updated_reference, |
| 351 icache_flush_mode); | 351 icache_flush_mode); |
| 352 } else if (IsWasmMemorySizeReference(rmode_)) { | 352 } else if (IsWasmMemorySizeReference(rmode_)) { |
| 353 uint32_t current_size_reference = wasm_memory_size_reference(); | 353 uint32_t current_size_reference = wasm_memory_size_reference(); |
| 354 DCHECK(old_size == 0 || current_size_reference <= old_size); | |
| 355 uint32_t offset = old_size - current_size_reference; | 354 uint32_t offset = old_size - current_size_reference; |
| 356 DCHECK_GE(new_size, offset); | |
| 357 uint32_t updated_size_reference = new_size - offset; | 355 uint32_t updated_size_reference = new_size - offset; |
| 358 unchecked_update_wasm_memory_size(updated_size_reference, | 356 unchecked_update_wasm_memory_size(updated_size_reference, |
| 359 icache_flush_mode); | 357 icache_flush_mode); |
| 360 } else { | 358 } else { |
| 361 UNREACHABLE(); | 359 UNREACHABLE(); |
| 362 } | 360 } |
| 363 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 361 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
| 364 Assembler::FlushICache(isolate_, pc_, sizeof(int64_t)); | 362 Assembler::FlushICache(isolate_, pc_, sizeof(int64_t)); |
| 365 } | 363 } |
| 366 } | 364 } |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1939 | 1937 |
| 1940 | 1938 |
| 1941 void Assembler::DataAlign(int m) { | 1939 void Assembler::DataAlign(int m) { |
| 1942 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1940 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 1943 while ((pc_offset() & (m - 1)) != 0) { | 1941 while ((pc_offset() & (m - 1)) != 0) { |
| 1944 db(0); | 1942 db(0); |
| 1945 } | 1943 } |
| 1946 } | 1944 } |
| 1947 } // namespace internal | 1945 } // namespace internal |
| 1948 } // namespace v8 | 1946 } // namespace v8 |
| OLD | NEW |