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

Side by Side Diff: src/arm/macro-assembler-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.h ('k') | src/arm/stub-cache-arm.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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 1345
1346 // Load current lexical context from the stack frame. 1346 // Load current lexical context from the stack frame.
1347 ldr(scratch, MemOperand(fp, StandardFrameConstants::kContextOffset)); 1347 ldr(scratch, MemOperand(fp, StandardFrameConstants::kContextOffset));
1348 // In debug mode, make sure the lexical context is set. 1348 // In debug mode, make sure the lexical context is set.
1349 #ifdef DEBUG 1349 #ifdef DEBUG
1350 cmp(scratch, Operand(0, RelocInfo::NONE)); 1350 cmp(scratch, Operand(0, RelocInfo::NONE));
1351 Check(ne, "we should not have an empty lexical context"); 1351 Check(ne, "we should not have an empty lexical context");
1352 #endif 1352 #endif
1353 1353
1354 // Load the native context of the current context. 1354 // Load the native context of the current context.
1355 int offset = Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; 1355 int offset =
1356 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
1356 ldr(scratch, FieldMemOperand(scratch, offset)); 1357 ldr(scratch, FieldMemOperand(scratch, offset));
1357 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); 1358 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
1358 1359
1359 // Check the context is a native context. 1360 // Check the context is a native context.
1360 if (emit_debug_code()) { 1361 if (emit_debug_code()) {
1361 // TODO(119): avoid push(holder_reg)/pop(holder_reg) 1362 // TODO(119): avoid push(holder_reg)/pop(holder_reg)
1362 // Cannot use ip as a temporary in this verification code. Due to the fact 1363 // Cannot use ip as a temporary in this verification code. Due to the fact
1363 // that ip is clobbered as part of cmp with an object Operand. 1364 // that ip is clobbered as part of cmp with an object Operand.
1364 push(holder_reg); // Temporarily save holder on the stack. 1365 push(holder_reg); // Temporarily save holder on the stack.
1365 // Read the first word and compare to the native_context_map. 1366 // Read the first word and compare to the native_context_map.
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 ASSERT(flag == JUMP_FUNCTION); 2710 ASSERT(flag == JUMP_FUNCTION);
2710 SetCallKind(r5, CALL_AS_METHOD); 2711 SetCallKind(r5, CALL_AS_METHOD);
2711 Jump(r2); 2712 Jump(r2);
2712 } 2713 }
2713 } 2714 }
2714 2715
2715 2716
2716 void MacroAssembler::GetBuiltinFunction(Register target, 2717 void MacroAssembler::GetBuiltinFunction(Register target,
2717 Builtins::JavaScript id) { 2718 Builtins::JavaScript id) {
2718 // Load the builtins object into target register. 2719 // Load the builtins object into target register.
2719 ldr(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 2720 ldr(target,
2721 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2720 ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); 2722 ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
2721 // Load the JavaScript builtin function from the builtins object. 2723 // Load the JavaScript builtin function from the builtins object.
2722 ldr(target, FieldMemOperand(target, 2724 ldr(target, FieldMemOperand(target,
2723 JSBuiltinsObject::OffsetOfFunctionWithId(id))); 2725 JSBuiltinsObject::OffsetOfFunctionWithId(id)));
2724 } 2726 }
2725 2727
2726 2728
2727 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { 2729 void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
2728 ASSERT(!target.is(r1)); 2730 ASSERT(!target.is(r1));
2729 GetBuiltinFunction(r1, id); 2731 GetBuiltinFunction(r1, id);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 } 2877 }
2876 2878
2877 2879
2878 void MacroAssembler::LoadTransitionedArrayMapConditional( 2880 void MacroAssembler::LoadTransitionedArrayMapConditional(
2879 ElementsKind expected_kind, 2881 ElementsKind expected_kind,
2880 ElementsKind transitioned_kind, 2882 ElementsKind transitioned_kind,
2881 Register map_in_out, 2883 Register map_in_out,
2882 Register scratch, 2884 Register scratch,
2883 Label* no_map_match) { 2885 Label* no_map_match) {
2884 // Load the global or builtins object from the current context. 2886 // Load the global or builtins object from the current context.
2885 ldr(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 2887 ldr(scratch,
2888 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2886 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); 2889 ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
2887 2890
2888 // Check that the function's map is the same as the expected cached map. 2891 // Check that the function's map is the same as the expected cached map.
2889 ldr(scratch, 2892 ldr(scratch,
2890 MemOperand(scratch, 2893 MemOperand(scratch,
2891 Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX))); 2894 Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
2892 size_t offset = expected_kind * kPointerSize + 2895 size_t offset = expected_kind * kPointerSize +
2893 FixedArrayBase::kHeaderSize; 2896 FixedArrayBase::kHeaderSize;
2894 ldr(ip, FieldMemOperand(scratch, offset)); 2897 ldr(ip, FieldMemOperand(scratch, offset));
2895 cmp(map_in_out, ip); 2898 cmp(map_in_out, ip);
(...skipping 26 matching lines...) Expand all
2922 map_out, 2925 map_out,
2923 scratch, 2926 scratch,
2924 &done); 2927 &done);
2925 } 2928 }
2926 bind(&done); 2929 bind(&done);
2927 } 2930 }
2928 2931
2929 2932
2930 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 2933 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
2931 // Load the global or builtins object from the current context. 2934 // Load the global or builtins object from the current context.
2932 ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); 2935 ldr(function,
2936 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2933 // Load the native context from the global or builtins object. 2937 // Load the native context from the global or builtins object.
2934 ldr(function, FieldMemOperand(function, 2938 ldr(function, FieldMemOperand(function,
2935 GlobalObject::kNativeContextOffset)); 2939 GlobalObject::kNativeContextOffset));
2936 // Load the function from the native context. 2940 // Load the function from the native context.
2937 ldr(function, MemOperand(function, Context::SlotOffset(index))); 2941 ldr(function, MemOperand(function, Context::SlotOffset(index)));
2938 } 2942 }
2939 2943
2940 2944
2941 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function, 2945 void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
2942 Register map, 2946 Register map,
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
3820 void CodePatcher::EmitCondition(Condition cond) { 3824 void CodePatcher::EmitCondition(Condition cond) {
3821 Instr instr = Assembler::instr_at(masm_.pc_); 3825 Instr instr = Assembler::instr_at(masm_.pc_);
3822 instr = (instr & ~kCondMask) | cond; 3826 instr = (instr & ~kCondMask) | cond;
3823 masm_.emit(instr); 3827 masm_.emit(instr);
3824 } 3828 }
3825 3829
3826 3830
3827 } } // namespace v8::internal 3831 } } // namespace v8::internal
3828 3832
3829 #endif // V8_TARGET_ARCH_ARM 3833 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698