OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3333 | 3333 |
3334 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3334 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3335 ASSERT(ToRegister(instr->context()).is(rsi)); | 3335 ASSERT(ToRegister(instr->context()).is(rsi)); |
3336 __ push(rsi); // The context is the first argument. | 3336 __ push(rsi); // The context is the first argument. |
3337 __ Push(instr->hydrogen()->pairs()); | 3337 __ Push(instr->hydrogen()->pairs()); |
3338 __ Push(Smi::FromInt(instr->hydrogen()->flags())); | 3338 __ Push(Smi::FromInt(instr->hydrogen()->flags())); |
3339 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3339 CallRuntime(Runtime::kDeclareGlobals, 3, instr); |
3340 } | 3340 } |
3341 | 3341 |
3342 | 3342 |
3343 void LCodeGen::DoGlobalObject(LGlobalObject* instr) { | |
3344 Register context = ToRegister(instr->context()); | |
3345 Register result = ToRegister(instr->result()); | |
3346 __ movp(result, | |
3347 Operand(context, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | |
3348 } | |
3349 | |
3350 | |
3351 void LCodeGen::DoGlobalReceiver(LGlobalReceiver* instr) { | |
3352 Register global = ToRegister(instr->global()); | |
3353 Register result = ToRegister(instr->result()); | |
3354 __ movp(result, FieldOperand(global, GlobalObject::kGlobalReceiverOffset)); | |
3355 } | |
3356 | |
3357 | |
3358 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3343 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3359 int formal_parameter_count, | 3344 int formal_parameter_count, |
3360 int arity, | 3345 int arity, |
3361 LInstruction* instr, | 3346 LInstruction* instr, |
3362 RDIState rdi_state) { | 3347 RDIState rdi_state) { |
3363 bool dont_adapt_arguments = | 3348 bool dont_adapt_arguments = |
3364 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3349 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3365 bool can_invoke_directly = | 3350 bool can_invoke_directly = |
3366 dont_adapt_arguments || formal_parameter_count == arity; | 3351 dont_adapt_arguments || formal_parameter_count == arity; |
3367 | 3352 |
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5623 FixedArray::kHeaderSize - kPointerSize)); | 5608 FixedArray::kHeaderSize - kPointerSize)); |
5624 __ bind(&done); | 5609 __ bind(&done); |
5625 } | 5610 } |
5626 | 5611 |
5627 | 5612 |
5628 #undef __ | 5613 #undef __ |
5629 | 5614 |
5630 } } // namespace v8::internal | 5615 } } // namespace v8::internal |
5631 | 5616 |
5632 #endif // V8_TARGET_ARCH_X64 | 5617 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |