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

Side by Side Diff: src/isolate.cc

Issue 2493823003: [wasm] Allocate a single script per wasm module (Closed)
Patch Set: Fix signed/unsigned issues Created 4 years, 1 month 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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 DCHECK(!fun->shared()->script()->IsScript()); 694 DCHECK(!fun->shared()->script()->IsScript());
695 695
696 return stack_frame; 696 return stack_frame;
697 } 697 }
698 698
699 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) { 699 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) {
700 Handle<JSObject> stack_frame = 700 Handle<JSObject> stack_frame =
701 factory()->NewJSObject(isolate_->object_function()); 701 factory()->NewJSObject(isolate_->object_function());
702 702
703 if (!function_key_.is_null()) { 703 if (!function_key_.is_null()) {
704 Handle<String> name = wasm::GetWasmFunctionName( 704 // TODO(wasm): We should always have a wasm instance available (bug 5620).
705 isolate_, handle(frame->wasm_instance(), isolate_), 705 Handle<Object> instance(frame->wasm_instance(), isolate_);
706 frame->function_index()); 706 Handle<Object> compiled_module;
707 if (instance->IsUndefined(isolate_)) {
708 compiled_module = instance; // undefined
709 } else {
710 compiled_module = handle(
711 wasm::GetCompiledModule(JSObject::cast(*instance)), isolate_);
712 }
713 Handle<String> name = wasm::GetWasmFunctionName(isolate_, compiled_module,
714 frame->function_index());
707 JSObject::AddProperty(stack_frame, function_key_, name, NONE); 715 JSObject::AddProperty(stack_frame, function_key_, name, NONE);
708 } 716 }
709 // Encode the function index as line number. 717 // Encode the function index as line number.
710 if (!line_key_.is_null()) { 718 if (!line_key_.is_null()) {
711 JSObject::AddProperty( 719 JSObject::AddProperty(
712 stack_frame, line_key_, 720 stack_frame, line_key_,
713 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE); 721 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE);
714 } 722 }
715 // Encode the byte offset as column. 723 // Encode the byte offset as column.
716 if (!column_key_.is_null()) { 724 if (!column_key_.is_null()) {
(...skipping 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 // Then check whether this scope intercepts. 3497 // Then check whether this scope intercepts.
3490 if ((flag & intercept_mask_)) { 3498 if ((flag & intercept_mask_)) {
3491 intercepted_flags_ |= flag; 3499 intercepted_flags_ |= flag;
3492 return true; 3500 return true;
3493 } 3501 }
3494 return false; 3502 return false;
3495 } 3503 }
3496 3504
3497 } // namespace internal 3505 } // namespace internal
3498 } // namespace v8 3506 } // namespace v8
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/messages.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698