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

Side by Side Diff: src/runtime.cc

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: First pass at pre-VFP2 RA Created 8 years, 1 month 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
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 7999 matching lines...) Expand 10 before | Expand all | Expand 10 after
8010 } 8010 }
8011 8011
8012 bool has_activations() { return has_activations_; } 8012 bool has_activations() { return has_activations_; }
8013 8013
8014 private: 8014 private:
8015 JSFunction* function_; 8015 JSFunction* function_;
8016 bool has_activations_; 8016 bool has_activations_;
8017 }; 8017 };
8018 8018
8019 8019
8020 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyICMiss) {
8021 HandleScope scope(isolate);
8022 ASSERT(args.length() == 0);
8023 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
8024 ASSERT(isolate->heap()->IsAllocationAllowed());
8025 ASSERT(deoptimizer->optimized_code_kind() == Code::COMPILED_STUB);
8026 delete deoptimizer;
8027 return isolate->heap()->undefined_value();
8028 }
8029
8030
8020 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) { 8031 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyDeoptimized) {
8021 HandleScope scope(isolate); 8032 HandleScope scope(isolate);
8022 ASSERT(args.length() == 1); 8033 ASSERT(args.length() == 1);
8023 RUNTIME_ASSERT(args[0]->IsSmi()); 8034 RUNTIME_ASSERT(args[0]->IsSmi());
8024 Deoptimizer::BailoutType type = 8035 Deoptimizer::BailoutType type =
8025 static_cast<Deoptimizer::BailoutType>(args.smi_at(0)); 8036 static_cast<Deoptimizer::BailoutType>(args.smi_at(0));
8026 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate); 8037 Deoptimizer* deoptimizer = Deoptimizer::Grab(isolate);
8027 ASSERT(isolate->heap()->IsAllocationAllowed()); 8038 ASSERT(isolate->heap()->IsAllocationAllowed());
8028 JavaScriptFrameIterator it(isolate); 8039
8040 ASSERT(deoptimizer->optimized_code_kind() != Code::COMPILED_STUB);
8029 8041
8030 // Make sure to materialize objects before causing any allocation. 8042 // Make sure to materialize objects before causing any allocation.
8043 JavaScriptFrameIterator it(isolate);
8031 deoptimizer->MaterializeHeapObjects(&it); 8044 deoptimizer->MaterializeHeapObjects(&it);
8032 delete deoptimizer; 8045 delete deoptimizer;
8033 8046
8034 JavaScriptFrame* frame = it.frame(); 8047 JavaScriptFrame* frame = it.frame();
8035 RUNTIME_ASSERT(frame->function()->IsJSFunction()); 8048 RUNTIME_ASSERT(frame->function()->IsJSFunction());
8036 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate); 8049 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate);
8037 RUNTIME_ASSERT(type != Deoptimizer::EAGER || function->IsOptimized()); 8050 RUNTIME_ASSERT(type != Deoptimizer::EAGER || function->IsOptimized());
8038 8051
8039 // Avoid doing too much work when running with --always-opt and keep 8052 // Avoid doing too much work when running with --always-opt and keep
8040 // the optimized code around. 8053 // the optimized code around.
(...skipping 5276 matching lines...) Expand 10 before | Expand all | Expand 10 after
13317 // Handle last resort GC and make sure to allow future allocations 13330 // Handle last resort GC and make sure to allow future allocations
13318 // to grow the heap without causing GCs (if possible). 13331 // to grow the heap without causing GCs (if possible).
13319 isolate->counters()->gc_last_resort_from_js()->Increment(); 13332 isolate->counters()->gc_last_resort_from_js()->Increment();
13320 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13333 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13321 "Runtime::PerformGC"); 13334 "Runtime::PerformGC");
13322 } 13335 }
13323 } 13336 }
13324 13337
13325 13338
13326 } } // namespace v8::internal 13339 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698