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

Unified Diff: src/runtime.cc

Issue 619006: Refactor the check for generating inline constructors... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 3879)
+++ src/runtime.cc (working copy)
@@ -4850,10 +4850,11 @@
static Code* ComputeConstructStub(Handle<JSFunction> function) {
- if (FLAG_inline_new
- && function->shared()->has_only_simple_this_property_assignments()
- && (!function->has_instance_prototype()
- || !JSObject::cast(function->instance_prototype())->HasSetter())) {
+ Handle<Object> prototype = Factory::null_value();
+ if (function->has_instance_prototype()) {
+ prototype = Handle<Object>(function->instance_prototype());
+ }
+ if (function->shared()->CanGenerateInlineConstructor(*prototype)) {
ConstructStubCompiler compiler;
Object* code = compiler.CompileConstructStub(function->shared());
if (code->IsFailure()) {

Powered by Google App Engine
This is Rietveld 408576698