OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "allocation-site-scopes.h" | 8 #include "allocation-site-scopes.h" |
9 #include "api.h" | 9 #include "api.h" |
10 #include "arguments.h" | 10 #include "arguments.h" |
(...skipping 10983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10994 RelocInfo::ModeMask(RelocInfo::CELL) | | 10994 RelocInfo::ModeMask(RelocInfo::CELL) | |
10995 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | | 10995 RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY) | |
10996 RelocInfo::kApplyMask; | 10996 RelocInfo::kApplyMask; |
10997 // Needed to find target_object and runtime_entry on X64 | 10997 // Needed to find target_object and runtime_entry on X64 |
10998 Assembler* origin = desc.origin; | 10998 Assembler* origin = desc.origin; |
10999 AllowDeferredHandleDereference embedding_raw_address; | 10999 AllowDeferredHandleDereference embedding_raw_address; |
11000 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { | 11000 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
11001 RelocInfo::Mode mode = it.rinfo()->rmode(); | 11001 RelocInfo::Mode mode = it.rinfo()->rmode(); |
11002 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 11002 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
11003 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 11003 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
11004 it.rinfo()->set_target_object(*p, SKIP_WRITE_BARRIER); | 11004 it.rinfo()->set_target_object(*p, SKIP_WRITE_BARRIER, SKIP_ICACHE_FLUSH); |
11005 } else if (mode == RelocInfo::CELL) { | 11005 } else if (mode == RelocInfo::CELL) { |
11006 Handle<Cell> cell = it.rinfo()->target_cell_handle(); | 11006 Handle<Cell> cell = it.rinfo()->target_cell_handle(); |
11007 it.rinfo()->set_target_cell(*cell, SKIP_WRITE_BARRIER); | 11007 it.rinfo()->set_target_cell(*cell, SKIP_WRITE_BARRIER, SKIP_ICACHE_FLUSH); |
11008 } else if (RelocInfo::IsCodeTarget(mode)) { | 11008 } else if (RelocInfo::IsCodeTarget(mode)) { |
11009 // rewrite code handles in inline cache targets to direct | 11009 // rewrite code handles in inline cache targets to direct |
11010 // pointers to the first instruction in the code object | 11010 // pointers to the first instruction in the code object |
11011 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 11011 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
11012 Code* code = Code::cast(*p); | 11012 Code* code = Code::cast(*p); |
11013 it.rinfo()->set_target_address(code->instruction_start(), | 11013 it.rinfo()->set_target_address(code->instruction_start(), |
11014 SKIP_WRITE_BARRIER); | 11014 SKIP_WRITE_BARRIER, |
| 11015 SKIP_ICACHE_FLUSH); |
11015 } else if (RelocInfo::IsRuntimeEntry(mode)) { | 11016 } else if (RelocInfo::IsRuntimeEntry(mode)) { |
11016 Address p = it.rinfo()->target_runtime_entry(origin); | 11017 Address p = it.rinfo()->target_runtime_entry(origin); |
11017 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER); | 11018 it.rinfo()->set_target_runtime_entry(p, SKIP_WRITE_BARRIER, |
| 11019 SKIP_ICACHE_FLUSH); |
11018 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) { | 11020 } else if (mode == RelocInfo::CODE_AGE_SEQUENCE) { |
11019 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin); | 11021 Handle<Object> p = it.rinfo()->code_age_stub_handle(origin); |
11020 Code* code = Code::cast(*p); | 11022 Code* code = Code::cast(*p); |
11021 it.rinfo()->set_code_age_stub(code); | 11023 it.rinfo()->set_code_age_stub(code); |
11022 } else { | 11024 } else { |
11023 it.rinfo()->apply(delta); | 11025 it.rinfo()->apply(delta); |
11024 } | 11026 } |
11025 } | 11027 } |
11026 CPU::FlushICache(instruction_start(), instruction_size()); | 11028 CPU::FlushICache(instruction_start(), instruction_size()); |
11027 } | 11029 } |
(...skipping 6252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17280 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17282 #define ERROR_MESSAGES_TEXTS(C, T) T, |
17281 static const char* error_messages_[] = { | 17283 static const char* error_messages_[] = { |
17282 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17284 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
17283 }; | 17285 }; |
17284 #undef ERROR_MESSAGES_TEXTS | 17286 #undef ERROR_MESSAGES_TEXTS |
17285 return error_messages_[reason]; | 17287 return error_messages_[reason]; |
17286 } | 17288 } |
17287 | 17289 |
17288 | 17290 |
17289 } } // namespace v8::internal | 17291 } } // namespace v8::internal |
OLD | NEW |