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

Side by Side Diff: src/isolate.cc

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: Review comments Created 4 years, 2 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if (helper.IsStrictFrame(*fun)) flags |= FrameArray::kIsStrict; 503 if (helper.IsStrictFrame(*fun)) flags |= FrameArray::kIsStrict;
504 if (exit_frame->IsConstructor()) flags |= FrameArray::kForceConstructor; 504 if (exit_frame->IsConstructor()) flags |= FrameArray::kForceConstructor;
505 505
506 elements = FrameArray::AppendJSFrame(elements, recv, fun, 506 elements = FrameArray::AppendJSFrame(elements, recv, fun,
507 Handle<AbstractCode>::cast(code), 507 Handle<AbstractCode>::cast(code),
508 offset, flags); 508 offset, flags);
509 } break; 509 } break;
510 510
511 case StackFrame::WASM: { 511 case StackFrame::WASM: {
512 WasmFrame* wasm_frame = WasmFrame::cast(frame); 512 WasmFrame* wasm_frame = WasmFrame::cast(frame);
513 Handle<Object> wasm_object(wasm_frame->wasm_obj(), this); 513 Handle<Object> instance(wasm_frame->wasm_obj(), this);
Mircea Trofin 2016/10/19 05:28:55 I really wish the renames (while super-welcome) ca
titzer 2016/10/19 09:54:41 Renaming split out to: https://codereview.chromium
514 const int wasm_function_index = wasm_frame->function_index(); 514 const int wasm_function_index = wasm_frame->function_index();
515 Code* code = wasm_frame->unchecked_code(); 515 Code* code = wasm_frame->unchecked_code();
516 Handle<AbstractCode> abstract_code(AbstractCode::cast(code), this); 516 Handle<AbstractCode> abstract_code(AbstractCode::cast(code), this);
517 const int offset = 517 const int offset =
518 static_cast<int>(wasm_frame->pc() - code->instruction_start()); 518 static_cast<int>(wasm_frame->pc() - code->instruction_start());
519 519
520 // TODO(wasm): The wasm object returned by the WasmFrame should always 520 // TODO(wasm): The wasm object returned by the WasmFrame should always
521 // be a wasm object. 521 // be a wasm object.
522 DCHECK(wasm::IsWasmObject(*wasm_object) || 522 DCHECK(wasm::IsWasmInstance(*instance) || instance->IsUndefined(this));
523 wasm_object->IsUndefined(this));
524 523
525 int flags = wasm::WasmIsAsmJs(*wasm_object, this) 524 int flags = wasm::WasmIsAsmJs(*instance, this)
526 ? FrameArray::kIsAsmJsWasmFrame 525 ? FrameArray::kIsAsmJsWasmFrame
527 : FrameArray::kIsWasmFrame; 526 : FrameArray::kIsWasmFrame;
528 527
529 elements = FrameArray::AppendWasmFrame(elements, wasm_object, 528 elements =
530 wasm_function_index, 529 FrameArray::AppendWasmFrame(elements, instance, wasm_function_index,
531 abstract_code, offset, flags); 530 abstract_code, offset, flags);
532 } break; 531 } break;
533 532
534 default: 533 default:
535 break; 534 break;
536 } 535 }
537 } 536 }
538 537
539 elements->ShrinkToFit(); 538 elements->ShrinkToFit();
540 539
541 // TODO(yangguo): Queue this structured stack trace for preprocessing on GC. 540 // TODO(yangguo): Queue this structured stack trace for preprocessing on GC.
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3465 // Then check whether this scope intercepts. 3464 // Then check whether this scope intercepts.
3466 if ((flag & intercept_mask_)) { 3465 if ((flag & intercept_mask_)) {
3467 intercepted_flags_ |= flag; 3466 intercepted_flags_ |= flag;
3468 return true; 3467 return true;
3469 } 3468 }
3470 return false; 3469 return false;
3471 } 3470 }
3472 3471
3473 } // namespace internal 3472 } // namespace internal
3474 } // namespace v8 3473 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698