| 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/frames-inl.h" |
| 7 #include "test/cctest/cctest.h" | 8 #include "test/cctest/cctest.h" |
| 8 #include "test/cctest/compiler/function-tester.h" | 9 #include "test/cctest/compiler/function-tester.h" |
| 9 | 10 |
| 10 using namespace v8::internal; | 11 using namespace v8::internal; |
| 11 using namespace v8::internal::compiler; | 12 using namespace v8::internal::compiler; |
| 12 | 13 |
| 13 static void IsOptimized(const v8::FunctionCallbackInfo<v8::Value>& args) { | 14 static void IsOptimized(const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 14 JavaScriptFrameIterator it(CcTest::i_isolate()); | 15 JavaScriptFrameIterator it(CcTest::i_isolate()); |
| 15 JavaScriptFrame* frame = it.frame(); | 16 JavaScriptFrame* frame = it.frame(); |
| 16 return args.GetReturnValue().Set(frame->is_optimized()); | 17 return args.GetReturnValue().Set(frame->is_optimized()); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 FLAG_allow_natives_syntax = true; | 107 FLAG_allow_natives_syntax = true; |
| 107 | 108 |
| 108 FunctionTester T( | 109 FunctionTester T( |
| 109 "(function foo() {" | 110 "(function foo() {" |
| 110 " %DeoptimizeFunction(foo);" | 111 " %DeoptimizeFunction(foo);" |
| 111 " return 1;" | 112 " return 1;" |
| 112 "})"); | 113 "})"); |
| 113 | 114 |
| 114 T.CheckCall(T.Val(1)); | 115 T.CheckCall(T.Val(1)); |
| 115 } | 116 } |
| OLD | NEW |