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

Unified Diff: src/ic.cc

Issue 1722003: Added ability to remove prototype from function. In this case, [[Construct]] ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Fixes according to Erik's comments Created 10 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 side-by-side diff with in-line comments
Download patch
Index: src/ic.cc
===================================================================
--- src/ic.cc (revision 4462)
+++ src/ic.cc (working copy)
@@ -615,7 +615,8 @@
}
// Use specialized code for getting prototype of functions.
- if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol())) {
+ if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol()) &&
+ JSFunction::cast(*object)->should_have_prototype()) {
#ifdef DEBUG
if (FLAG_trace_ic) PrintF("[LoadIC : +#prototype /function]\n");
#endif
@@ -824,7 +825,8 @@
}
// Use specialized code for getting prototype of functions.
- if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol())) {
+ if (object->IsJSFunction() && name->Equals(Heap::prototype_symbol()) &&
+ JSFunction::cast(*object)->should_have_prototype()) {
Handle<JSFunction> function = Handle<JSFunction>::cast(object);
Object* code =
StubCache::ComputeKeyedLoadFunctionPrototype(*name, *function);

Powered by Google App Engine
This is Rietveld 408576698