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

Unified Diff: src/runtime/runtime-test.cc

Issue 1928203002: [es8] More spec compliant syntactic tail calls implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Some STC tests ported for PTC Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime.h ('k') | test/message/syntactic-tail-call-in-binop-lhs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index ff0f472a934ac68a18e594eb2c31a96932ea96c9..b7a0412ec24fb41fae8fbb29a459e8454a23c191 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -8,6 +8,7 @@
#include "src/deoptimizer.h"
#include "src/frames-inl.h"
#include "src/full-codegen/full-codegen.h"
+#include "src/isolate-inl.h"
#include "src/snapshot/natives.h"
namespace v8 {
@@ -481,6 +482,31 @@ RUNTIME_FUNCTION(Runtime_TraceTailCall) {
return isolate->heap()->undefined_value();
}
+RUNTIME_FUNCTION(Runtime_GetExceptionDetails) {
+ HandleScope shs(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, exception_obj, 0);
+
+ Factory* factory = isolate->factory();
+ Handle<JSMessageObject> message_obj =
+ isolate->CreateMessage(exception_obj, nullptr);
+
+ Handle<JSObject> message = factory->NewJSObject(isolate->object_function());
+
+ Handle<String> key;
+ Handle<Object> value;
+
+ key = factory->NewStringFromAsciiChecked("start_pos");
+ value = handle(Smi::FromInt(message_obj->start_position()), isolate);
+ JSObject::SetProperty(message, key, value, STRICT).Assert();
+
+ key = factory->NewStringFromAsciiChecked("end_pos");
+ value = handle(Smi::FromInt(message_obj->end_position()), isolate);
+ JSObject::SetProperty(message, key, value, STRICT).Assert();
+
+ return *message;
+}
+
RUNTIME_FUNCTION(Runtime_HaveSameMap) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 2);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/message/syntactic-tail-call-in-binop-lhs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698