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

Side by Side Diff: src/runtime.cc

Issue 10234007: Remove more assumptions from debug tests. Even though a function (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/debug-evaluate-locals-optimized.js » ('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 8298 matching lines...) Expand 10 before | Expand all | Expand 10 after
8309 8309
8310 8310
8311 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) { 8311 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) {
8312 HandleScope scope(isolate); 8312 HandleScope scope(isolate);
8313 ASSERT(args.length() == 1); 8313 ASSERT(args.length() == 1);
8314 // The least significant bit (after untagging) indicates whether the 8314 // The least significant bit (after untagging) indicates whether the
8315 // function is currently optimized, regardless of reason. 8315 // function is currently optimized, regardless of reason.
8316 if (!V8::UseCrankshaft()) { 8316 if (!V8::UseCrankshaft()) {
8317 return Smi::FromInt(4); // 4 == "never". 8317 return Smi::FromInt(4); // 4 == "never".
8318 } 8318 }
8319 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8319 if (FLAG_always_opt) { 8320 if (FLAG_always_opt) {
8320 return Smi::FromInt(3); // 3 == "always". 8321 // We may have always opt, but that is more best-effort than a real
8322 // promise, so we still say "no" if it is not optimized.
8323 return function->IsOptimized() ? Smi::FromInt(3) // 1 == "always".
Yang 2012/04/26 13:42:20 Should the comment be '3 == "always"'?
Erik Corry 2012/04/26 13:46:10 Done.
8324 : Smi::FromInt(2); // 2 == "no".
8321 } 8325 }
8322 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8323 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". 8326 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes".
8324 : Smi::FromInt(2); // 2 == "no". 8327 : Smi::FromInt(2); // 2 == "no".
8325 } 8328 }
8326 8329
8327 8330
8328 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationCount) { 8331 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationCount) {
8329 HandleScope scope(isolate); 8332 HandleScope scope(isolate);
8330 ASSERT(args.length() == 1); 8333 ASSERT(args.length() == 1);
8331 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); 8334 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
8332 return Smi::FromInt(function->shared()->opt_count()); 8335 return Smi::FromInt(function->shared()->opt_count());
(...skipping 5100 matching lines...) Expand 10 before | Expand all | Expand 10 after
13433 // Handle last resort GC and make sure to allow future allocations 13436 // Handle last resort GC and make sure to allow future allocations
13434 // to grow the heap without causing GCs (if possible). 13437 // to grow the heap without causing GCs (if possible).
13435 isolate->counters()->gc_last_resort_from_js()->Increment(); 13438 isolate->counters()->gc_last_resort_from_js()->Increment();
13436 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13439 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13437 "Runtime::PerformGC"); 13440 "Runtime::PerformGC");
13438 } 13441 }
13439 } 13442 }
13440 13443
13441 13444
13442 } } // namespace v8::internal 13445 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/debug-evaluate-locals-optimized.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698