OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/base/atomic-utils.h" | 5 #include "src/base/atomic-utils.h" |
6 #include "src/macro-assembler.h" | 6 #include "src/macro-assembler.h" |
7 #include "src/objects.h" | 7 #include "src/objects.h" |
8 #include "src/property-descriptor.h" | 8 #include "src/property-descriptor.h" |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 Code* target = | 365 Code* target = |
366 Code::GetCodeFromTargetAddress(it.rinfo()->target_address()); | 366 Code::GetCodeFromTargetAddress(it.rinfo()->target_address()); |
367 if (target->kind() == kind && | 367 if (target->kind() == kind && |
368 target->constant_pool_offset() >= kPlaceholderMarker) { | 368 target->constant_pool_offset() >= kPlaceholderMarker) { |
369 // Patch direct calls to placeholder code objects. | 369 // Patch direct calls to placeholder code objects. |
370 uint32_t index = target->constant_pool_offset() - kPlaceholderMarker; | 370 uint32_t index = target->constant_pool_offset() - kPlaceholderMarker; |
371 CHECK(index < code_targets.size()); | 371 CHECK(index < code_targets.size()); |
372 Handle<Code> new_target = code_targets[index]; | 372 Handle<Code> new_target = code_targets[index]; |
373 if (target != *new_target) { | 373 if (target != *new_target) { |
374 it.rinfo()->set_target_address(new_target->instruction_start(), | 374 it.rinfo()->set_target_address(new_target->instruction_start(), |
375 SKIP_WRITE_BARRIER, SKIP_ICACHE_FLUSH); | 375 UPDATE_WRITE_BARRIER, |
| 376 SKIP_ICACHE_FLUSH); |
376 modified = true; | 377 modified = true; |
377 } | 378 } |
378 } | 379 } |
379 } | 380 } |
380 } | 381 } |
381 return modified; | 382 return modified; |
382 } | 383 } |
383 | 384 |
384 void LinkModuleFunctions(Isolate* isolate, | 385 void LinkModuleFunctions(Isolate* isolate, |
385 std::vector<Handle<Code>>& functions) { | 386 std::vector<Handle<Code>>& functions) { |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); | 1386 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); |
1386 } | 1387 } |
1387 thrower.Error("WASM.compileRun() failed: Return value should be number"); | 1388 thrower.Error("WASM.compileRun() failed: Return value should be number"); |
1388 return -1; | 1389 return -1; |
1389 } | 1390 } |
1390 | 1391 |
1391 } // namespace testing | 1392 } // namespace testing |
1392 } // namespace wasm | 1393 } // namespace wasm |
1393 } // namespace internal | 1394 } // namespace internal |
1394 } // namespace v8 | 1395 } // namespace v8 |
OLD | NEW |