OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/messages.h" | 5 #include "src/messages.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/execution.h" | 10 #include "src/execution.h" |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 builder.AppendCString("]+"); | 666 builder.AppendCString("]+"); |
667 | 667 |
668 Handle<Object> pos(Smi::FromInt(GetPosition()), isolate_); | 668 Handle<Object> pos(Smi::FromInt(GetPosition()), isolate_); |
669 builder.AppendString(isolate_->factory()->NumberToString(pos)); | 669 builder.AppendString(isolate_->factory()->NumberToString(pos)); |
670 builder.AppendCString(")"); | 670 builder.AppendCString(")"); |
671 | 671 |
672 return builder.Finish(); | 672 return builder.Finish(); |
673 } | 673 } |
674 | 674 |
675 int WasmStackFrame::GetPosition() const { | 675 int WasmStackFrame::GetPosition() const { |
| 676 // TODO(wasm): Clean this up (bug 5007). |
676 return (offset_ < 0) ? (-1 - offset_) : code_->SourcePosition(offset_); | 677 return (offset_ < 0) ? (-1 - offset_) : code_->SourcePosition(offset_); |
677 } | 678 } |
678 | 679 |
679 Handle<Object> WasmStackFrame::Null() const { | 680 Handle<Object> WasmStackFrame::Null() const { |
680 return isolate_->factory()->null_value(); | 681 return isolate_->factory()->null_value(); |
681 } | 682 } |
682 | 683 |
683 Handle<Object> AsmJsWasmStackFrame::GetReceiver() const { | 684 Handle<Object> AsmJsWasmStackFrame::GetReceiver() const { |
684 return isolate_->global_proxy(); | 685 return isolate_->global_proxy(); |
685 } | 686 } |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1191 DCHECK(mode != SKIP_UNTIL_SEEN); | 1192 DCHECK(mode != SKIP_UNTIL_SEEN); |
1192 | 1193 |
1193 Handle<Object> no_caller; | 1194 Handle<Object> no_caller; |
1194 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); | 1195 Handle<String> msg = FormatMessage(isolate, template_index, arg0, arg1, arg2); |
1195 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, | 1196 return ErrorUtils::Construct(isolate, constructor, constructor, msg, mode, |
1196 no_caller, false); | 1197 no_caller, false); |
1197 } | 1198 } |
1198 | 1199 |
1199 } // namespace internal | 1200 } // namespace internal |
1200 } // namespace v8 | 1201 } // namespace v8 |
OLD | NEW |