v8/test/cctest/compiler/test-run-stackcheck.cc
mstarzinger@chromium.org 3bc3df9a27 Implement inlined stack-check guards in TurboFan.
R=bmeurer@chromium.org
TEST=cctest/test-run-stackcheck/TerminateAtMethodEntry

Review URL: https://codereview.chromium.org/621833003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 14:03:02 +00:00

19 lines
529 B
C++

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/v8.h"
#include "test/cctest/compiler/function-tester.h"
using namespace v8::internal;
using namespace v8::internal::compiler;
TEST(TerminateAtMethodEntry) {
FunctionTester T("(function(a,b) { return 23; })");
T.CheckCall(T.Val(23));
T.isolate->stack_guard()->RequestTerminateExecution();
T.CheckThrows(T.undefined(), T.undefined());
}