| Index: src/runtime/runtime-compiler.cc
|
| diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
|
| index 756dd9aa890dc777a3beec17161e67a12315aeae..c8fc9e8351227dae93070166bfe7b604085ee387 100644
|
| --- a/src/runtime/runtime-compiler.cc
|
| +++ b/src/runtime/runtime-compiler.cc
|
| @@ -19,7 +19,7 @@ namespace internal {
|
|
|
| RUNTIME_FUNCTION(Runtime_CompileLazy) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 1);
|
| + DCHECK_EQ(1, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
|
|
| #ifdef DEBUG
|
| @@ -39,10 +39,22 @@ RUNTIME_FUNCTION(Runtime_CompileLazy) {
|
| return function->code();
|
| }
|
|
|
| +RUNTIME_FUNCTION(Runtime_CompileBaseline) {
|
| + HandleScope scope(isolate);
|
| + DCHECK_EQ(1, args.length());
|
| + CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
| + StackLimitCheck check(isolate);
|
| + if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
|
| + if (!Compiler::CompileBaseline(function)) {
|
| + return isolate->heap()->exception();
|
| + }
|
| + DCHECK(function->is_compiled());
|
| + return function->code();
|
| +}
|
|
|
| RUNTIME_FUNCTION(Runtime_CompileOptimized_Concurrent) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 1);
|
| + DCHECK_EQ(1, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
| StackLimitCheck check(isolate);
|
| if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
|
| @@ -56,7 +68,7 @@ RUNTIME_FUNCTION(Runtime_CompileOptimized_Concurrent) {
|
|
|
| RUNTIME_FUNCTION(Runtime_CompileOptimized_NotConcurrent) {
|
| HandleScope scope(isolate);
|
| - DCHECK(args.length() == 1);
|
| + DCHECK_EQ(1, args.length());
|
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
| StackLimitCheck check(isolate);
|
| if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
|
|
|