OLD | NEW |
---|---|
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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
609 NONE); | 609 NONE); |
610 } | 610 } |
611 return stack_frame; | 611 return stack_frame; |
612 } | 612 } |
613 | 613 |
614 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) { | 614 Handle<JSObject> NewStackFrameObject(WasmFrame* frame) { |
615 Handle<JSObject> stack_frame = | 615 Handle<JSObject> stack_frame = |
616 factory()->NewJSObject(isolate_->object_function()); | 616 factory()->NewJSObject(isolate_->object_function()); |
617 | 617 |
618 if (!function_key_.is_null()) { | 618 if (!function_key_.is_null()) { |
619 Handle<Object> fun_name = handle(frame->function_name(), isolate_); | 619 String* fun_name_raw = frame->function_name(); |
Yang
2016/05/18 13:38:48
Like noted previously, this having WasmFrame::func
| |
620 if (fun_name->IsUndefined()) | 620 Handle<String> fun_name = |
621 fun_name = isolate_->factory()->InternalizeUtf8String( | 621 fun_name_raw == nullptr |
622 Vector<const char>("<WASM>")); | 622 ? isolate_->factory()->NewStringFromStaticChars("<WASM UNNAMED>") |
623 : handle(fun_name_raw, isolate_); | |
623 JSObject::AddProperty(stack_frame, function_key_, fun_name, NONE); | 624 JSObject::AddProperty(stack_frame, function_key_, fun_name, NONE); |
624 } | 625 } |
625 // Encode the function index as line number. | 626 // Encode the function index as line number. |
626 if (!line_key_.is_null()) { | 627 if (!line_key_.is_null()) { |
627 JSObject::AddProperty( | 628 JSObject::AddProperty( |
628 stack_frame, line_key_, | 629 stack_frame, line_key_, |
629 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE); | 630 isolate_->factory()->NewNumberFromInt(frame->function_index()), NONE); |
630 } | 631 } |
631 // Encode the byte offset as column. | 632 // Encode the byte offset as column. |
632 if (!column_key_.is_null()) { | 633 if (!column_key_.is_null()) { |
(...skipping 2420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3053 // Then check whether this scope intercepts. | 3054 // Then check whether this scope intercepts. |
3054 if ((flag & intercept_mask_)) { | 3055 if ((flag & intercept_mask_)) { |
3055 intercepted_flags_ |= flag; | 3056 intercepted_flags_ |= flag; |
3056 return true; | 3057 return true; |
3057 } | 3058 } |
3058 return false; | 3059 return false; |
3059 } | 3060 } |
3060 | 3061 |
3061 } // namespace internal | 3062 } // namespace internal |
3062 } // namespace v8 | 3063 } // namespace v8 |
OLD | NEW |