Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Side by Side Diff: src/objects.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Addressing some of Jochen's feedback Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 14240 matching lines...) Expand 10 before | Expand all | Expand 10 after
14251 if (mode == RelocInfo::EMBEDDED_OBJECT) { 14251 if (mode == RelocInfo::EMBEDDED_OBJECT) {
14252 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); 14252 it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER);
14253 } else if (mode == RelocInfo::CELL) { 14253 } else if (mode == RelocInfo::CELL) {
14254 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER); 14254 it.rinfo()->set_target_cell(undefined_cell, SKIP_WRITE_BARRIER);
14255 } 14255 }
14256 } 14256 }
14257 } 14257 }
14258 14258
14259 14259
14260 void Code::Relocate(intptr_t delta) { 14260 void Code::Relocate(intptr_t delta) {
14261 if (trap_handler::EnableTrapHandler() && is_wasm_code()) {
14262 fprintf(stderr, "Relocating Wasm code from %p to %p\n",
14263 instruction_start() - delta, instruction_start());
14264 const int index = trap_handler_index()->value();
14265 if (index >= 0) {
14266 trap_handler::UpdateCodePointer(index, instruction_start());
14267 }
14268 }
14261 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { 14269 for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
14262 it.rinfo()->apply(delta); 14270 it.rinfo()->apply(delta);
14263 } 14271 }
14264 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size()); 14272 Assembler::FlushICache(GetIsolate(), instruction_start(), instruction_size());
14265 } 14273 }
14266 14274
14267 14275
14268 void Code::CopyFrom(const CodeDesc& desc) { 14276 void Code::CopyFrom(const CodeDesc& desc) {
14269 // copy code 14277 // copy code
14270 CopyBytes(instruction_start(), desc.buffer, 14278 CopyBytes(instruction_start(), desc.buffer,
(...skipping 6070 matching lines...) Expand 10 before | Expand all | Expand 10 after
20341 // depend on this. 20349 // depend on this.
20342 return DICTIONARY_ELEMENTS; 20350 return DICTIONARY_ELEMENTS;
20343 } 20351 }
20344 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20352 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20345 return kind; 20353 return kind;
20346 } 20354 }
20347 } 20355 }
20348 20356
20349 } // namespace internal 20357 } // namespace internal
20350 } // namespace v8 20358 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698