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

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

Issue 2427953002: [compiler] Ship Ignition for all TurboFan code. (Closed)
Patch Set: Fix better. Created 4 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/test-api.cc ('k') | test/cctest/test-log-stack-tracer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 Object* object = feedback_vector->Get(slot_for_a); 315 Object* object = feedback_vector->Get(slot_for_a);
316 CHECK(object->IsWeakCell() && 316 CHECK(object->IsWeakCell() &&
317 WeakCell::cast(object)->value()->IsJSFunction()); 317 WeakCell::cast(object)->value()->IsJSFunction());
318 318
319 CompileRun("%OptimizeFunctionOnNextCall(f); f(fun1);"); 319 CompileRun("%OptimizeFunctionOnNextCall(f); f(fun1);");
320 320
321 // Verify that the feedback is still "gathered" despite a recompilation 321 // Verify that the feedback is still "gathered" despite a recompilation
322 // of the full code. 322 // of the full code.
323 CHECK(f->IsOptimized()); 323 CHECK(f->IsOptimized());
324 // If the baseline code is bytecode, then it will not have deoptimization 324 // If the baseline code is bytecode, then it will not have deoptimization
325 // support. has_deoptimization_support() check is only required if the 325 // support. The has_deoptimization_support() check is only required if the
326 // baseline code is from fullcodegen. 326 // baseline code is from fullcodegen.
327 CHECK(f->shared()->has_deoptimization_support() || i::FLAG_ignition); 327 CHECK(f->shared()->has_deoptimization_support() || i::FLAG_ignition ||
328 i::FLAG_turbo);
328 object = f->feedback_vector()->Get(slot_for_a); 329 object = f->feedback_vector()->Get(slot_for_a);
329 CHECK(object->IsWeakCell() && 330 CHECK(object->IsWeakCell() &&
330 WeakCell::cast(object)->value()->IsJSFunction()); 331 WeakCell::cast(object)->value()->IsJSFunction());
331 } 332 }
332 333
333 334
334 TEST(FeedbackVectorUnaffectedByScopeChanges) { 335 TEST(FeedbackVectorUnaffectedByScopeChanges) {
335 if (i::FLAG_always_opt || !i::FLAG_lazy || 336 if (i::FLAG_always_opt || !i::FLAG_lazy ||
336 (FLAG_ignition && FLAG_ignition_eager)) { 337 (FLAG_ignition && FLAG_ignition_eager)) {
337 return; 338 return;
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 CompileRun("foo()"); 715 CompileRun("foo()");
715 CHECK_EQ(2, foo->feedback_vector()->invocation_count()); 716 CHECK_EQ(2, foo->feedback_vector()->invocation_count());
716 CompileRun("bar()"); 717 CompileRun("bar()");
717 CHECK_EQ(2, foo->feedback_vector()->invocation_count()); 718 CHECK_EQ(2, foo->feedback_vector()->invocation_count());
718 CompileRun("foo(); foo()"); 719 CompileRun("foo(); foo()");
719 CHECK_EQ(4, foo->feedback_vector()->invocation_count()); 720 CHECK_EQ(4, foo->feedback_vector()->invocation_count());
720 CompileRun("%BaselineFunctionOnNextCall(foo);"); 721 CompileRun("%BaselineFunctionOnNextCall(foo);");
721 CompileRun("foo();"); 722 CompileRun("foo();");
722 CHECK_EQ(5, foo->feedback_vector()->invocation_count()); 723 CHECK_EQ(5, foo->feedback_vector()->invocation_count());
723 } 724 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698