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

Unified Diff: src/stub-cache.h

Issue 2801018: This change allows generating call-stubs for objects with normal (non-fast) o... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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
« no previous file with comments | « src/objects-inl.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.h
===================================================================
--- src/stub-cache.h (revision 5007)
+++ src/stub-cache.h (working copy)
@@ -409,8 +409,21 @@
static void GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind);
- // Check the integrity of the prototype chain to make sure that the
- // current IC is still valid.
+ // Generates code that verifies that the property holder has not changed
+ // (checking maps of objects in the prototype chain for fast and global
+ // objects or doing negative lookup for slow objects, ensures that the
+ // property cells for global objects are still empty) and checks that the map
+ // of the holder has not changed. If necessary the function also generates
+ // code for security check in case of global object holders. Helps to make
+ // sure that the current IC is still valid.
+ //
+ // The scratch and holder registers are always clobbered, but the object
+ // register is only clobbered if it the same as the holder register. The
+ // function returns a register containing the holder - either object_reg or
+ // holder_reg.
+ // The function can optionally (when save_at_depth !=
+ // kInvalidProtoDepth) save the object at the given depth by moving
+ // it to [esp + kPointerSize].
Register CheckPrototypes(JSObject* object,
Register object_reg,
@@ -418,9 +431,10 @@
Register holder_reg,
Register scratch,
String* name,
- Label* miss) {
+ Label* miss,
+ Register extra = no_reg) {
return CheckPrototypes(object, object_reg, holder, holder_reg, scratch,
- name, kInvalidProtoDepth, miss);
+ name, kInvalidProtoDepth, miss, extra);
}
Register CheckPrototypes(JSObject* object,
@@ -430,7 +444,8 @@
Register scratch,
String* name,
int save_at_depth,
- Label* miss);
+ Label* miss,
+ Register extra = no_reg);
protected:
Object* GetCodeWithFlags(Code::Flags flags, const char* name);
@@ -613,8 +628,10 @@
kNumCallGenerators
};
- CallStubCompiler(int argc, InLoopFlag in_loop, Code::Kind kind)
- : arguments_(argc), in_loop_(in_loop), kind_(kind) { }
+ CallStubCompiler(int argc,
+ InLoopFlag in_loop,
+ Code::Kind kind,
+ InlineCacheHolderFlag cache_holder);
Object* CompileCallField(JSObject* object,
JSObject* holder,
@@ -655,6 +672,7 @@
const ParameterCount arguments_;
const InLoopFlag in_loop_;
const Code::Kind kind_;
+ const InlineCacheHolderFlag cache_holder_;
const ParameterCount& arguments() { return arguments_; }
« no previous file with comments | « src/objects-inl.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698