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/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 } | 140 } |
141 | 141 |
142 return isolate->heap()->undefined_value(); | 142 return isolate->heap()->undefined_value(); |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 RUNTIME_FUNCTION(Runtime_OptimizeOsr) { | 146 RUNTIME_FUNCTION(Runtime_OptimizeOsr) { |
147 HandleScope scope(isolate); | 147 HandleScope scope(isolate); |
148 | 148 |
149 // This function is used by fuzzers, ignore calls with bogus arguments count. | 149 // This function is used by fuzzers, ignore calls with bogus arguments count. |
150 if (args.length() != 0 && args.length() == 1) { | 150 if (args.length() != 0 && args.length() != 1) { |
151 return isolate->heap()->undefined_value(); | 151 return isolate->heap()->undefined_value(); |
152 } | 152 } |
153 | 153 |
154 Handle<JSFunction> function = Handle<JSFunction>::null(); | 154 Handle<JSFunction> function = Handle<JSFunction>::null(); |
155 if (args.length() == 0) { | 155 if (args.length() == 0) { |
156 // Find the JavaScript function on the top of the stack. | 156 // Find the JavaScript function on the top of the stack. |
157 JavaScriptFrameIterator it(isolate); | 157 JavaScriptFrameIterator it(isolate); |
158 while (!it.done()) { | 158 while (!it.done()) { |
159 if (it.frame()->is_java_script()) { | 159 if (it.frame()->is_java_script()) { |
160 function = Handle<JSFunction>(it.frame()->function()); | 160 function = Handle<JSFunction>(it.frame()->function()); |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 | 580 |
581 RUNTIME_FUNCTION(Runtime_SpeciesProtector) { | 581 RUNTIME_FUNCTION(Runtime_SpeciesProtector) { |
582 SealHandleScope shs(isolate); | 582 SealHandleScope shs(isolate); |
583 DCHECK_EQ(0, args.length()); | 583 DCHECK_EQ(0, args.length()); |
584 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact()); | 584 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact()); |
585 } | 585 } |
586 | 586 |
587 | 587 |
588 } // namespace internal | 588 } // namespace internal |
589 } // namespace v8 | 589 } // namespace v8 |
OLD | NEW |