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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 13177002: Remove push(holder_reg) in CheckAccessGlobalProxy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index cb4b4a7317c0ce8eed9c1e614e650217b724e08c..fbe33510c16967df7c703be55d57dd3b2d1d192d 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -748,7 +748,7 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
// Perform global security token check if needed.
if (object->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(receiver_reg, scratch1, miss_label);
+ __ CheckAccessGlobalProxy(receiver_reg, scratch1, scratch2, miss_label);
}
// Check that we are allowed to write this.
@@ -972,10 +972,6 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
} else {
bool in_new_space = heap()->InNewSpace(*prototype);
Handle<Map> current_map(current->map());
- if (in_new_space) {
- // Save the map in scratch1 for later.
- __ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset));
- }
if (!current.is_identical_to(first) || check == CHECK_ALL_MAPS) {
__ CheckMap(reg, current_map, miss, DONT_DO_SMI_CHECK,
ALLOW_ELEMENT_TRANSITION_MAPS);
@@ -985,8 +981,14 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
// the map check so that we know that the object is actually a global
// object.
if (current->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(reg, scratch2, miss);
+ __ CheckAccessGlobalProxy(reg, scratch1, scratch2, miss);
+ }
+
+ if (in_new_space) {
+ // Save the map in scratch1 for later.
+ __ mov(scratch1, FieldOperand(reg, HeapObject::kMapOffset));
}
+
reg = holder_reg; // From now on the object will be in holder_reg.
if (in_new_space) {
@@ -1020,7 +1022,7 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
// Perform security check for access to the global object.
ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
if (holder->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(reg, scratch1, miss);
+ __ CheckAccessGlobalProxy(reg, scratch1, scratch2, miss);
}
// If we've skipped any global objects, it's not enough to verify that
@@ -2657,7 +2659,7 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
// Perform global security token check if needed.
if (object->IsJSGlobalProxy()) {
- __ CheckAccessGlobalProxy(edx, ebx, &miss);
+ __ CheckAccessGlobalProxy(receiver(), scratch1(), scratch2(), &miss);
}
// Stub never generated for non-global objects that require access
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698