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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 9506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9517 return isolate->Throw(*isolate->factory()->NewTypeError( | 9517 return isolate->Throw(*isolate->factory()->NewTypeError( |
9518 "not_date_object", HandleVector<Object>(NULL, 0))); | 9518 "not_date_object", HandleVector<Object>(NULL, 0))); |
9519 } | 9519 } |
9520 | 9520 |
9521 | 9521 |
9522 RUNTIME_FUNCTION(RuntimeHidden_StackGuard) { | 9522 RUNTIME_FUNCTION(RuntimeHidden_StackGuard) { |
9523 SealHandleScope shs(isolate); | 9523 SealHandleScope shs(isolate); |
9524 ASSERT(args.length() == 0); | 9524 ASSERT(args.length() == 0); |
9525 | 9525 |
9526 // First check if this is a real stack overflow. | 9526 // First check if this is a real stack overflow. |
9527 if (isolate->stack_guard()->IsStackOverflow()) { | 9527 StackLimitCheck check(isolate); |
| 9528 if (check.JsHasOverflowed()) { |
9528 return isolate->StackOverflow(); | 9529 return isolate->StackOverflow(); |
9529 } | 9530 } |
9530 | 9531 |
9531 return isolate->stack_guard()->HandleInterrupts(); | 9532 return isolate->stack_guard()->HandleInterrupts(); |
9532 } | 9533 } |
9533 | 9534 |
9534 | 9535 |
9535 RUNTIME_FUNCTION(RuntimeHidden_TryInstallOptimizedCode) { | 9536 RUNTIME_FUNCTION(RuntimeHidden_TryInstallOptimizedCode) { |
9536 HandleScope scope(isolate); | 9537 HandleScope scope(isolate); |
9537 ASSERT(args.length() == 1); | 9538 ASSERT(args.length() == 1); |
9538 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 9539 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
9539 | 9540 |
9540 // First check if this is a real stack overflow. | 9541 // First check if this is a real stack overflow. |
9541 if (isolate->stack_guard()->IsStackOverflow()) { | 9542 StackLimitCheck check(isolate); |
| 9543 if (check.JsHasOverflowed()) { |
9542 SealHandleScope shs(isolate); | 9544 SealHandleScope shs(isolate); |
9543 return isolate->StackOverflow(); | 9545 return isolate->StackOverflow(); |
9544 } | 9546 } |
9545 | 9547 |
9546 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); | 9548 isolate->optimizing_compiler_thread()->InstallOptimizedFunctions(); |
9547 return (function->IsOptimized()) ? function->code() | 9549 return (function->IsOptimized()) ? function->code() |
9548 : function->shared()->code(); | 9550 : function->shared()->code(); |
9549 } | 9551 } |
9550 | 9552 |
9551 | 9553 |
(...skipping 5659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15211 } | 15213 } |
15212 return NULL; | 15214 return NULL; |
15213 } | 15215 } |
15214 | 15216 |
15215 | 15217 |
15216 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15218 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15217 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15219 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15218 } | 15220 } |
15219 | 15221 |
15220 } } // namespace v8::internal | 15222 } } // namespace v8::internal |
OLD | NEW |