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

Side by Side Diff: src/isolate.cc

Issue 2062793002: Revert of [wasm] Refactor function name table and lookup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | src/messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 NONE); 598 NONE);
599 } 599 }
600 return stack_frame; 600 return stack_frame;
601 } 601 }
602 602
603 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) { 603 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) {
604 Handle<JSObject> stack_frame = 604 Handle<JSObject> stack_frame =
605 factory()->NewJSObject(isolate_->object_function()); 605 factory()->NewJSObject(isolate_->object_function());
606 606
607 if (!function_key_.is_null()) { 607 if (!function_key_.is_null()) {
608 Handle<String> name = wasm::GetWasmFunctionName( 608 Object* wasm_object = frame->wasm_obj();
609 isolate_, handle(frame->wasm_obj(), isolate_), 609 Handle<String> name;
610 frame->function_index()); 610 if (!wasm_object->IsUndefined(isolate_)) {
611 Handle<JSObject> wasm = handle(JSObject::cast(wasm_object));
612 wasm::GetWasmFunctionName(wasm, frame->function_index())
613 .ToHandle(&name);
614 }
615 if (name.is_null()) {
616 name = isolate_->factory()->NewStringFromStaticChars("<WASM UNNAMED>");
617 }
611 JSObject::AddProperty(stack_frame, function_key_, name, NONE); 618 JSObject::AddProperty(stack_frame, function_key_, name, NONE);
612 } 619 }
613 // Encode the function index as line number. 620 // Encode the function index as line number.
614 if (!line_key_.is_null()) { 621 if (!line_key_.is_null()) {
615 JSObject::AddProperty( 622 JSObject::AddProperty(
616 stack_frame, line_key_, 623 stack_frame, line_key_,
617 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE); 624 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE);
618 } 625 }
619 // Encode the byte offset as column. 626 // Encode the byte offset as column.
620 if (!column_key_.is_null()) { 627 if (!column_key_.is_null()) {
(...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 // Then check whether this scope intercepts. 3054 // Then check whether this scope intercepts.
3048 if ((flag & intercept_mask_)) { 3055 if ((flag & intercept_mask_)) {
3049 intercepted_flags_ |= flag; 3056 intercepted_flags_ |= flag;
3050 return true; 3057 return true;
3051 } 3058 }
3052 return false; 3059 return false;
3053 } 3060 }
3054 3061
3055 } // namespace internal 3062 } // namespace internal
3056 } // namespace v8 3063 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698