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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after
2955 DeoptimizeIf(equal, instr->environment()); 2955 DeoptimizeIf(equal, instr->environment());
2956 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch); 2956 __ CmpObjectType(receiver, FIRST_SPEC_OBJECT_TYPE, scratch);
2957 DeoptimizeIf(below, instr->environment()); 2957 DeoptimizeIf(below, instr->environment());
2958 __ jmp(&receiver_ok, Label::kNear); 2958 __ jmp(&receiver_ok, Label::kNear);
2959 2959
2960 __ bind(&global_object); 2960 __ bind(&global_object);
2961 // TODO(kmillikin): We have a hydrogen value for the global object. See 2961 // TODO(kmillikin): We have a hydrogen value for the global object. See
2962 // if it's better to use it than to explicitly fetch it from the context 2962 // if it's better to use it than to explicitly fetch it from the context
2963 // here. 2963 // here.
2964 __ mov(receiver, Operand(ebp, StandardFrameConstants::kContextOffset)); 2964 __ mov(receiver, Operand(ebp, StandardFrameConstants::kContextOffset));
2965 __ mov(receiver, ContextOperand(receiver, Context::GLOBAL_INDEX)); 2965 __ mov(receiver, ContextOperand(receiver, Context::GLOBAL_OBJECT_INDEX));
2966 __ mov(receiver, 2966 __ mov(receiver,
2967 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset)); 2967 FieldOperand(receiver, JSGlobalObject::kGlobalReceiverOffset));
2968 __ bind(&receiver_ok); 2968 __ bind(&receiver_ok);
2969 } 2969 }
2970 2970
2971 2971
2972 void LCodeGen::DoApplyArguments(LApplyArguments* instr) { 2972 void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
2973 Register receiver = ToRegister(instr->receiver()); 2973 Register receiver = ToRegister(instr->receiver());
2974 Register function = ToRegister(instr->function()); 2974 Register function = ToRegister(instr->function());
2975 Register length = ToRegister(instr->length()); 2975 Register length = ToRegister(instr->length());
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 __ push(esi); // The context is the first argument. 3047 __ push(esi); // The context is the first argument.
3048 __ push(Immediate(instr->hydrogen()->pairs())); 3048 __ push(Immediate(instr->hydrogen()->pairs()));
3049 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); 3049 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags())));
3050 CallRuntime(Runtime::kDeclareGlobals, 3, instr); 3050 CallRuntime(Runtime::kDeclareGlobals, 3, instr);
3051 } 3051 }
3052 3052
3053 3053
3054 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { 3054 void LCodeGen::DoGlobalObject(LGlobalObject* instr) {
3055 Register context = ToRegister(instr->context()); 3055 Register context = ToRegister(instr->context());
3056 Register result = ToRegister(instr->result()); 3056 Register result = ToRegister(instr->result());
3057 __ mov(result, Operand(context, Context::SlotOffset(Context::GLOBAL_INDEX))); 3057 __ mov(result,
3058 Operand(context, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
3058 } 3059 }
3059 3060
3060 3061
3061 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { 3062 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) {
3062 Register global = ToRegister(instr->global()); 3063 Register global = ToRegister(instr->global());
3063 Register result = ToRegister(instr->result()); 3064 Register result = ToRegister(instr->result());
3064 __ mov(result, FieldOperand(global, GlobalObject::kGlobalReceiverOffset)); 3065 __ mov(result, FieldOperand(global, GlobalObject::kGlobalReceiverOffset));
3065 } 3066 }
3066 3067
3067 3068
(...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
5424 FixedArray::kHeaderSize - kPointerSize)); 5425 FixedArray::kHeaderSize - kPointerSize));
5425 __ bind(&done); 5426 __ bind(&done);
5426 } 5427 }
5427 5428
5428 5429
5429 #undef __ 5430 #undef __
5430 5431
5431 } } // namespace v8::internal 5432 } } // namespace v8::internal
5432 5433
5433 #endif // V8_TARGET_ARCH_IA32 5434 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698