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

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

Issue 184383003: The Array function must be looked up in the native context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove the misleading LoadGlobalContext on ia32 Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/x64/code-stubs-x64.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 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 lw(function, 4435 lw(function,
4436 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 4436 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
4437 // Load the native context from the global or builtins object. 4437 // Load the native context from the global or builtins object.
4438 lw(function, FieldMemOperand(function, 4438 lw(function, FieldMemOperand(function,
4439 GlobalObject::kNativeContextOffset)); 4439 GlobalObject::kNativeContextOffset));
4440 // Load the function from the native context. 4440 // Load the function from the native context.
4441 lw(function, MemOperand(function, Context::SlotOffset(index))); 4441 lw(function, MemOperand(function, Context::SlotOffset(index)));
4442 } 4442 }
4443 4443
4444 4444
4445 void MacroAssembler::LoadArrayFunction(Register function) {
4446 // Load the global or builtins object from the current context.
4447 lw(function,
4448 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
4449 // Load the global context from the global or builtins object.
4450 lw(function,
4451 FieldMemOperand(function, GlobalObject::kGlobalContextOffset));
4452 // Load the array function from the native context.
4453 lw(function,
4454 MemOperand(function, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
4455 }
4456
4457
4458 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, 4445 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
4459 Register map, 4446 Register map,
4460 Register scratch) { 4447 Register scratch) {
4461 // Load the initial map. The global functions all have initial maps. 4448 // Load the initial map. The global functions all have initial maps.
4462 lw(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 4449 lw(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
4463 if (emit_debug_code()) { 4450 if (emit_debug_code()) {
4464 Label ok, fail; 4451 Label ok, fail;
4465 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK); 4452 CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, DO_SMI_CHECK);
4466 Branch(&ok); 4453 Branch(&ok);
4467 bind(&fail); 4454 bind(&fail);
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
5715 opcode == BGTZL); 5702 opcode == BGTZL);
5716 opcode = (cond == eq) ? BEQ : BNE; 5703 opcode = (cond == eq) ? BEQ : BNE;
5717 instr = (instr & ~kOpcodeMask) | opcode; 5704 instr = (instr & ~kOpcodeMask) | opcode;
5718 masm_.emit(instr); 5705 masm_.emit(instr);
5719 } 5706 }
5720 5707
5721 5708
5722 } } // namespace v8::internal 5709 } } // namespace v8::internal
5723 5710
5724 #endif // V8_TARGET_ARCH_MIPS 5711 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698