| 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 // TODO(jochen): Remove this after the setting is turned on globally. |    5 // TODO(jochen): Remove this after the setting is turned on globally. | 
|    6 #define V8_IMMINENT_DEPRECATION_WARNINGS |    6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 
|    7  |    7  | 
|    8 #include "src/frames-inl.h" |    8 #include "src/frames-inl.h" | 
|    9 #include "test/cctest/cctest.h" |    9 #include "test/cctest/cctest.h" | 
|   10 #include "test/cctest/compiler/function-tester.h" |   10 #include "test/cctest/compiler/function-tester.h" | 
|   11  |   11  | 
|   12 using namespace v8::internal; |   12 namespace v8 { | 
|   13 using namespace v8::internal::compiler; |   13 namespace internal { | 
 |   14 namespace compiler { | 
|   14  |   15  | 
|   15 static void IsOptimized(const v8::FunctionCallbackInfo<v8::Value>& args) { |   16 static void IsOptimized(const v8::FunctionCallbackInfo<v8::Value>& args) { | 
|   16   JavaScriptFrameIterator it(CcTest::i_isolate()); |   17   JavaScriptFrameIterator it(CcTest::i_isolate()); | 
|   17   JavaScriptFrame* frame = it.frame(); |   18   JavaScriptFrame* frame = it.frame(); | 
|   18   return args.GetReturnValue().Set(frame->is_optimized()); |   19   return args.GetReturnValue().Set(frame->is_optimized()); | 
|   19 } |   20 } | 
|   20  |   21  | 
|   21  |   22  | 
|   22 static void InstallIsOptimizedHelper(v8::Isolate* isolate) { |   23 static void InstallIsOptimizedHelper(v8::Isolate* isolate) { | 
|   23   v8::Local<v8::Context> context = isolate->GetCurrentContext(); |   24   v8::Local<v8::Context> context = isolate->GetCurrentContext(); | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  110   FLAG_allow_natives_syntax = true; |  111   FLAG_allow_natives_syntax = true; | 
|  111  |  112  | 
|  112   FunctionTester T( |  113   FunctionTester T( | 
|  113       "(function foo() {" |  114       "(function foo() {" | 
|  114       "  %DeoptimizeFunction(foo);" |  115       "  %DeoptimizeFunction(foo);" | 
|  115       "  return 1;" |  116       "  return 1;" | 
|  116       "})"); |  117       "})"); | 
|  117  |  118  | 
|  118   T.CheckCall(T.Val(1)); |  119   T.CheckCall(T.Val(1)); | 
|  119 } |  120 } | 
 |  121  | 
 |  122 }  // namespace compiler | 
 |  123 }  // namespace internal | 
 |  124 }  // namespace v8 | 
| OLD | NEW |