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

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

Issue 1811553003: [Interpreter] Make ignition compiler eagerly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 9 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
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 " }" 342 " }"
343 " })();" 343 " })();"
344 "}" 344 "}"
345 "morphing_call = builder();"); 345 "morphing_call = builder();");
346 346
347 Handle<JSFunction> f = Handle<JSFunction>::cast(v8::Utils::OpenHandle( 347 Handle<JSFunction> f = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
348 *v8::Local<v8::Function>::Cast(CcTest::global() 348 *v8::Local<v8::Function>::Cast(CcTest::global()
349 ->Get(context, v8_str("morphing_call")) 349 ->Get(context, v8_str("morphing_call"))
350 .ToLocalChecked()))); 350 .ToLocalChecked())));
351 351
352 // Not compiled, and so no feedback vector allocated yet. 352 if (FLAG_lazy && !FLAG_ignition) {
353 CHECK(!f->shared()->is_compiled()); 353 // If we are compiling lazily then it should not be compiled, and so no
354 CHECK(f->shared()->feedback_vector()->is_empty()); 354 // feedback vector allocated yet.
355 CHECK(!f->shared()->is_compiled());
356 CHECK(f->shared()->feedback_vector()->is_empty());
357 }
355 358
356 CompileRun("morphing_call();"); 359 CompileRun("morphing_call();");
357 360
358 // Now a feedback vector is allocated. 361 // Now a feedback vector is allocated.
359 CHECK(f->shared()->is_compiled()); 362 CHECK(f->shared()->is_compiled());
360 CHECK(!f->shared()->feedback_vector()->is_empty()); 363 CHECK(!f->shared()->feedback_vector()->is_empty());
361 } 364 }
362 365
363 366
364 // Test that optimized code for different closures is actually shared 367 // Test that optimized code for different closures is actually shared
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 CompileRun("function f() { a = 12345678 }; f();"); 755 CompileRun("function f() { a = 12345678 }; f();");
753 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 756 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
754 CompileRun("function f(x) { a = 12345678 + x}; f(1);"); 757 CompileRun("function f(x) { a = 12345678 + x}; f(1);");
755 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 758 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
756 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);"); 759 CompileRun("function f(x) { var arguments = 1; x += 12345678}; f(1);");
757 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 760 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
758 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);"); 761 CompileRun("function f(x) { var arguments = 1; x = 12345678}; f(1);");
759 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f")); 762 CheckCodeForUnsafeLiteral(GetJSFunction(context->Global(), "f"));
760 } 763 }
761 #endif 764 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698