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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 9073007: Store transitioned JSArray maps in global context (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 // A variable occurring in such a scope should have slot type LOOKUP and 2161 // A variable occurring in such a scope should have slot type LOOKUP and
2162 // not CONTEXT. 2162 // not CONTEXT.
2163 if (emit_debug_code()) { 2163 if (emit_debug_code()) {
2164 cmp(FieldOperand(dst, HeapObject::kMapOffset), 2164 cmp(FieldOperand(dst, HeapObject::kMapOffset),
2165 isolate()->factory()->with_context_map()); 2165 isolate()->factory()->with_context_map());
2166 Check(not_equal, "Variable resolved to with context."); 2166 Check(not_equal, "Variable resolved to with context.");
2167 } 2167 }
2168 } 2168 }
2169 2169
2170 2170
2171 void MacroAssembler::LoadGlobalInitialConstructedArrayMap(
2172 Register function_in, Register scratch, Register map_out) {
2173 ASSERT(!function_in.is(map_out));
2174 Label done;
2175 mov(map_out, FieldOperand(function_in,
2176 JSFunction::kPrototypeOrInitialMapOffset));
2177 if (!FLAG_smi_only_arrays) {
2178 // Load the global or builtins object from the current context.
2179 mov(scratch, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
2180 mov(scratch, FieldOperand(scratch, GlobalObject::kGlobalContextOffset));
2181
2182 // Check that the function's map is same as the cached map.
2183 cmp(map_out,
2184 Operand(scratch,
2185 Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX)));
2186 j(not_equal, &done);
2187
2188 // Use the cached transitioned map.
2189 mov(map_out,
2190 Operand(scratch,
2191 Context::SlotOffset(Context::OBJECT_JS_ARRAY_MAP_INDEX)));
2192 }
2193 bind(&done);
2194 }
2195
2196
2171 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 2197 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
2172 // Load the global or builtins object from the current context. 2198 // Load the global or builtins object from the current context.
2173 mov(function, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); 2199 mov(function, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX)));
2174 // Load the global context from the global or builtins object. 2200 // Load the global context from the global or builtins object.
2175 mov(function, FieldOperand(function, GlobalObject::kGlobalContextOffset)); 2201 mov(function, FieldOperand(function, GlobalObject::kGlobalContextOffset));
2176 // Load the function from the global context. 2202 // Load the function from the global context.
2177 mov(function, Operand(function, Context::SlotOffset(index))); 2203 mov(function, Operand(function, Context::SlotOffset(index)));
2178 } 2204 }
2179 2205
2180 2206
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset)); 2776 cmp(length, Operand(bitmap_scratch, MemoryChunk::kSizeOffset));
2751 Check(less_equal, "Live Bytes Count overflow chunk size"); 2777 Check(less_equal, "Live Bytes Count overflow chunk size");
2752 } 2778 }
2753 2779
2754 bind(&done); 2780 bind(&done);
2755 } 2781 }
2756 2782
2757 } } // namespace v8::internal 2783 } } // namespace v8::internal
2758 2784
2759 #endif // V8_TARGET_ARCH_IA32 2785 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698