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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 10832365: Rename Context::global to Context::global_object, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comments. Created 8 years, 4 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/arm/macro-assembler-arm.cc ('k') | src/bootstrapper.cc » ('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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 __ bind(&miss); 276 __ bind(&miss);
277 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1, 277 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1,
278 extra2, extra3); 278 extra2, extra3);
279 } 279 }
280 280
281 281
282 void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, 282 void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm,
283 int index, 283 int index,
284 Register prototype) { 284 Register prototype) {
285 // Load the global or builtins object from the current context. 285 // Load the global or builtins object from the current context.
286 __ ldr(prototype, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 286 __ ldr(prototype,
287 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
287 // Load the native context from the global or builtins object. 288 // Load the native context from the global or builtins object.
288 __ ldr(prototype, 289 __ ldr(prototype,
289 FieldMemOperand(prototype, GlobalObject::kNativeContextOffset)); 290 FieldMemOperand(prototype, GlobalObject::kNativeContextOffset));
290 // Load the function from the native context. 291 // Load the function from the native context.
291 __ ldr(prototype, MemOperand(prototype, Context::SlotOffset(index))); 292 __ ldr(prototype, MemOperand(prototype, Context::SlotOffset(index)));
292 // Load the initial map. The global functions all have initial maps. 293 // Load the initial map. The global functions all have initial maps.
293 __ ldr(prototype, 294 __ ldr(prototype,
294 FieldMemOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset)); 295 FieldMemOperand(prototype, JSFunction::kPrototypeOrInitialMapOffset));
295 // Load the prototype from the initial map. 296 // Load the prototype from the initial map.
296 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); 297 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset));
297 } 298 }
298 299
299 300
300 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( 301 void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype(
301 MacroAssembler* masm, 302 MacroAssembler* masm,
302 int index, 303 int index,
303 Register prototype, 304 Register prototype,
304 Label* miss) { 305 Label* miss) {
305 Isolate* isolate = masm->isolate(); 306 Isolate* isolate = masm->isolate();
306 // Check we're still in the same context. 307 // Check we're still in the same context.
307 __ ldr(prototype, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 308 __ ldr(prototype,
308 __ Move(ip, isolate->global()); 309 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
310 __ Move(ip, isolate->global_object());
309 __ cmp(prototype, ip); 311 __ cmp(prototype, ip);
310 __ b(ne, miss); 312 __ b(ne, miss);
311 // Get the global function with the given index. 313 // Get the global function with the given index.
312 Handle<JSFunction> function( 314 Handle<JSFunction> function(
313 JSFunction::cast(isolate->native_context()->get(index))); 315 JSFunction::cast(isolate->native_context()->get(index)));
314 // Load its initial map. The global functions all have initial maps. 316 // Load its initial map. The global functions all have initial maps.
315 __ Move(prototype, Handle<Map>(function->initial_map())); 317 __ Move(prototype, Handle<Map>(function->initial_map()));
316 // Load the prototype from the initial map. 318 // Load the prototype from the initial map.
317 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset)); 319 __ ldr(prototype, FieldMemOperand(prototype, Map::kPrototypeOffset));
318 } 320 }
(...skipping 4433 matching lines...) Expand 10 before | Expand all | Expand 10 after
4752 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4754 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4753 } 4755 }
4754 } 4756 }
4755 4757
4756 4758
4757 #undef __ 4759 #undef __
4758 4760
4759 } } // namespace v8::internal 4761 } } // namespace v8::internal
4760 4762
4761 #endif // V8_TARGET_ARCH_ARM 4763 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698