Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: test/cctest/compiler/test-run-inlining.cc

Issue 1372513003: [turbofan] Rename --context-specialization to --function-context-specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-run-properties.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/frames-inl.h"
8 #include "test/cctest/compiler/function-tester.h" 8 #include "test/cctest/compiler/function-tester.h"
9 9
10 using namespace v8::internal; 10 using namespace v8::internal;
(...skipping 25 matching lines...) Expand all
36 36
37 void InstallAssertInlineCountHelper(v8::Isolate* isolate) { 37 void InstallAssertInlineCountHelper(v8::Isolate* isolate) {
38 v8::Local<v8::Context> context = isolate->GetCurrentContext(); 38 v8::Local<v8::Context> context = isolate->GetCurrentContext();
39 v8::Local<v8::FunctionTemplate> t = 39 v8::Local<v8::FunctionTemplate> t =
40 v8::FunctionTemplate::New(isolate, AssertInlineCount); 40 v8::FunctionTemplate::New(isolate, AssertInlineCount);
41 context->Global()->Set(v8_str("AssertInlineCount"), t->GetFunction()); 41 context->Global()->Set(v8_str("AssertInlineCount"), t->GetFunction());
42 } 42 }
43 43
44 44
45 const uint32_t kRestrictedInliningFlags = 45 const uint32_t kRestrictedInliningFlags =
46 CompilationInfo::kContextSpecializing | CompilationInfo::kTypingEnabled; 46 CompilationInfo::kFunctionContextSpecializing |
47 CompilationInfo::kTypingEnabled;
47 48
48 const uint32_t kInlineFlags = CompilationInfo::kInliningEnabled | 49 const uint32_t kInlineFlags = CompilationInfo::kInliningEnabled |
49 CompilationInfo::kContextSpecializing | 50 CompilationInfo::kFunctionContextSpecializing |
50 CompilationInfo::kTypingEnabled; 51 CompilationInfo::kTypingEnabled;
51 52
52 } // namespace 53 } // namespace
53 54
54 55
55 TEST(SimpleInlining) { 56 TEST(SimpleInlining) {
56 FunctionTester T( 57 FunctionTester T(
57 "(function(){" 58 "(function(){"
58 " function foo(s) { AssertInlineCount(2); return s; };" 59 " function foo(s) { AssertInlineCount(2); return s; };"
59 " function bar(s, t) { return foo(s); };" 60 " function bar(s, t) { return foo(s); };"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 " if (x == 1) return bar(42);" 588 " if (x == 1) return bar(42);"
588 " return x;" 589 " return x;"
589 " }" 590 " }"
590 " return foo;" 591 " return foo;"
591 "})();", 592 "})();",
592 kInlineFlags); 593 kInlineFlags);
593 594
594 InstallAssertInlineCountHelper(CcTest::isolate()); 595 InstallAssertInlineCountHelper(CcTest::isolate());
595 T.CheckCall(T.Val(42), T.Val(1)); 596 T.CheckCall(T.Val(42), T.Val(1));
596 } 597 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-run-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698