OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void LCodeGen::FinishCode(Handle<Code> code) { | 73 void LCodeGen::FinishCode(Handle<Code> code) { |
74 ASSERT(is_done()); | 74 ASSERT(is_done()); |
75 code->set_stack_slots(StackSlotCount()); | 75 code->set_stack_slots(StackSlotCount()); |
76 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 76 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
77 PopulateDeoptimizationData(code); | 77 PopulateDeoptimizationData(code); |
78 } | 78 } |
79 | 79 |
80 | 80 |
81 void LCodeGen::Abort(const char* format, ...) { | 81 void LCodeGen::Abort(const char* format, ...) { |
82 if (FLAG_trace_bailout) { | 82 if (FLAG_trace_bailout) { |
83 SmartPointer<char> debug_name = graph()->debug_name()->ToCString(); | 83 SmartPointer<char> name(info()->shared_info()->DebugName()->ToCString()); |
84 PrintF("Aborting LCodeGen in @\"%s\": ", *debug_name); | 84 PrintF("Aborting LCodeGen in @\"%s\": ", *name); |
85 va_list arguments; | 85 va_list arguments; |
86 va_start(arguments, format); | 86 va_start(arguments, format); |
87 OS::VPrint(format, arguments); | 87 OS::VPrint(format, arguments); |
88 va_end(arguments); | 88 va_end(arguments); |
89 PrintF("\n"); | 89 PrintF("\n"); |
90 } | 90 } |
91 status_ = ABORTED; | 91 status_ = ABORTED; |
92 } | 92 } |
93 | 93 |
94 | 94 |
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 Register result = ToRegister(instr->result()); | 2431 Register result = ToRegister(instr->result()); |
2432 __ ldr(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset)); | 2432 __ ldr(result, FieldMemOperand(global, GlobalObject::kGlobalReceiverOffset)); |
2433 } | 2433 } |
2434 | 2434 |
2435 | 2435 |
2436 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 2436 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
2437 int arity, | 2437 int arity, |
2438 LInstruction* instr) { | 2438 LInstruction* instr) { |
2439 // Change context if needed. | 2439 // Change context if needed. |
2440 bool change_context = | 2440 bool change_context = |
2441 (graph()->info()->closure()->context() != function->context()) || | 2441 (info()->closure()->context() != function->context()) || |
2442 scope()->contains_with() || | 2442 scope()->contains_with() || |
2443 (scope()->num_heap_slots() > 0); | 2443 (scope()->num_heap_slots() > 0); |
2444 if (change_context) { | 2444 if (change_context) { |
2445 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); | 2445 __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
2446 } | 2446 } |
2447 | 2447 |
2448 // Set r0 to arguments count if adaption is not needed. Assumes that r0 | 2448 // Set r0 to arguments count if adaption is not needed. Assumes that r0 |
2449 // is available to write to at this point. | 2449 // is available to write to at this point. |
2450 if (!function->NeedsArgumentsAdaption()) { | 2450 if (!function->NeedsArgumentsAdaption()) { |
2451 __ mov(r0, Operand(arity)); | 2451 __ mov(r0, Operand(arity)); |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3833 ASSERT(!environment->HasBeenRegistered()); | 3833 ASSERT(!environment->HasBeenRegistered()); |
3834 RegisterEnvironmentForDeoptimization(environment); | 3834 RegisterEnvironmentForDeoptimization(environment); |
3835 ASSERT(osr_pc_offset_ == -1); | 3835 ASSERT(osr_pc_offset_ == -1); |
3836 osr_pc_offset_ = masm()->pc_offset(); | 3836 osr_pc_offset_ = masm()->pc_offset(); |
3837 } | 3837 } |
3838 | 3838 |
3839 | 3839 |
3840 #undef __ | 3840 #undef __ |
3841 | 3841 |
3842 } } // namespace v8::internal | 3842 } } // namespace v8::internal |
OLD | NEW |