| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
| 9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/natives.h" | 10 #include "src/natives.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 Code* unoptimized = function->shared()->code(); | 68 Code* unoptimized = function->shared()->code(); |
| 69 if (args.length() == 2 && unoptimized->kind() == Code::FUNCTION) { | 69 if (args.length() == 2 && unoptimized->kind() == Code::FUNCTION) { |
| 70 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); | 70 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); |
| 71 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("osr")) && FLAG_use_osr) { | 71 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("osr")) && FLAG_use_osr) { |
| 72 // Start patching from the currently patched loop nesting level. | 72 // Start patching from the currently patched loop nesting level. |
| 73 DCHECK(BackEdgeTable::Verify(isolate, unoptimized)); | 73 DCHECK(BackEdgeTable::Verify(isolate, unoptimized)); |
| 74 isolate->runtime_profiler()->AttemptOnStackReplacement( | 74 isolate->runtime_profiler()->AttemptOnStackReplacement( |
| 75 *function, Code::kMaxLoopNestingMarker); | 75 *function, Code::kMaxLoopNestingMarker); |
| 76 } else if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) && | 76 } else if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) && |
| 77 isolate->concurrent_recompilation_enabled()) { | 77 isolate->concurrent_recompilation_enabled()) { |
| 78 function->MarkForConcurrentOptimization(); | 78 function->AttemptConcurrentOptimization(); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 return isolate->heap()->undefined_value(); | 82 return isolate->heap()->undefined_value(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) { | 86 RUNTIME_FUNCTION(Runtime_NeverOptimizeFunction) { |
| 87 HandleScope scope(isolate); | 87 HandleScope scope(isolate); |
| 88 DCHECK(args.length() == 1); | 88 DCHECK(args.length() == 1); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 401 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
| 402 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 402 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
| 403 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 403 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
| 404 } | 404 } |
| 405 | 405 |
| 406 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 406 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
| 407 | 407 |
| 408 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 408 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
| 409 } | 409 } |
| 410 } // namespace v8::internal | 410 } // namespace v8::internal |
| OLD | NEW |