OLD | NEW |
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 3753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3764 | 3764 |
3765 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3765 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3766 ASSERT(ToRegister(instr->context()).is(esi)); | 3766 ASSERT(ToRegister(instr->context()).is(esi)); |
3767 __ push(esi); // The context is the first argument. | 3767 __ push(esi); // The context is the first argument. |
3768 __ push(Immediate(instr->hydrogen()->pairs())); | 3768 __ push(Immediate(instr->hydrogen()->pairs())); |
3769 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3769 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
3770 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3770 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
3771 } | 3771 } |
3772 | 3772 |
3773 | 3773 |
3774 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | |
3775 Register context = ToRegister(instr->context()); | |
3776 Register result = ToRegister(instr->result()); | |
3777 __ mov(result, | |
3778 Operand(context, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | |
3779 } | |
3780 | |
3781 | |
3782 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | |
3783 Register global = ToRegister(instr->global()); | |
3784 Register result = ToRegister(instr->result()); | |
3785 __ mov(result, FieldOperand(global, GlobalObject::kGlobalReceiverOffset)); | |
3786 } | |
3787 | |
3788 | |
3789 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3774 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3790 int formal_parameter_count, | 3775 int formal_parameter_count, |
3791 int arity, | 3776 int arity, |
3792 LInstruction* instr, | 3777 LInstruction* instr, |
3793 EDIState edi_state) { | 3778 EDIState edi_state) { |
3794 bool dont_adapt_arguments = | 3779 bool dont_adapt_arguments = |
3795 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3780 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3796 bool can_invoke_directly = | 3781 bool can_invoke_directly = |
3797 dont_adapt_arguments || formal_parameter_count == arity; | 3782 dont_adapt_arguments || formal_parameter_count == arity; |
3798 | 3783 |
(...skipping 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6348 FixedArray::kHeaderSize - kPointerSize)); | 6333 FixedArray::kHeaderSize - kPointerSize)); |
6349 __ bind(&done); | 6334 __ bind(&done); |
6350 } | 6335 } |
6351 | 6336 |
6352 | 6337 |
6353 #undef __ | 6338 #undef __ |
6354 | 6339 |
6355 } } // namespace v8::internal | 6340 } } // namespace v8::internal |
6356 | 6341 |
6357 #endif // V8_TARGET_ARCH_IA32 | 6342 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |