Chromium Code Reviews| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 for (; !it->done(); it->Advance()) { | 121 for (; !it->done(); it->Advance()) { |
| 122 JavaScriptFrame* frame = it->frame(); | 122 JavaScriptFrame* frame = it->frame(); |
| 123 if (code_->contains(frame->pc())) has_code_activations_ = true; | 123 if (code_->contains(frame->pc())) has_code_activations_ = true; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 | 128 |
| 129 RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) { | 129 RUNTIME_FUNCTION(Runtime_NotifyDeoptimized) { |
| 130 HandleScope scope(isolate); | 130 HandleScope scope(isolate); |
| 131 TimerEventScope<TimerEventDeoptimizeCode> timer(isolate); | |
|
Michael Starzinger
2016/02/03 15:36:26
nit: Please move this down to after the usual runt
Camillo Bruni
2016/02/04 17:48:33
moved.
| |
| 131 DCHECK(args.length() == 1); | 132 DCHECK(args.length() == 1); |
| 132 CONVERT_SMI_ARG_CHECKED(type_arg, 0); | 133 CONVERT_SMI_ARG_CHECKED(type_arg, 0); |
| 133 Deoptimizer::BailoutType type = | 134 Deoptimizer::BailoutType type = |
| 134 static_cast<Deoptimizer::BailoutType>(type_arg); | 135 static_cast<Deoptimizer::BailoutType>(type_arg); |
| 135 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); | 136 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); |
| 136 DCHECK(AllowHeapAllocation::IsAllowed()); | 137 DCHECK(AllowHeapAllocation::IsAllowed()); |
| 137 | 138 |
| 138 Handle<JSFunction> function = deoptimizer->function(); | 139 Handle<JSFunction> function = deoptimizer->function(); |
| 139 Handle<Code> optimized_code = deoptimizer->compiled_code(); | 140 Handle<Code> optimized_code = deoptimizer->compiled_code(); |
| 140 | 141 |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 DCHECK(is_valid_language_mode(args.smi_at(3))); | 424 DCHECK(is_valid_language_mode(args.smi_at(3))); |
| 424 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); | 425 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); |
| 425 DCHECK(args[4]->IsSmi()); | 426 DCHECK(args[4]->IsSmi()); |
| 426 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), | 427 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), |
| 427 isolate); | 428 isolate); |
| 428 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, | 429 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, |
| 429 language_mode, args.smi_at(4)); | 430 language_mode, args.smi_at(4)); |
| 430 } | 431 } |
| 431 } // namespace internal | 432 } // namespace internal |
| 432 } // namespace v8 | 433 } // namespace v8 |
| OLD | NEW |