| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 // needs to be copied into the context, it must be the last argument | 218 // needs to be copied into the context, it must be the last argument |
| 219 // passed to the parameter that needs to be copied. This is a rare | 219 // passed to the parameter that needs to be copied. This is a rare |
| 220 // case so we don't check for it, instead we rely on the copying | 220 // case so we don't check for it, instead we rely on the copying |
| 221 // order: such a parameter is copied repeatedly into the same | 221 // order: such a parameter is copied repeatedly into the same |
| 222 // context location and thus the last value is what is seen inside | 222 // context location and thus the last value is what is seen inside |
| 223 // the function. | 223 // the function. |
| 224 for (int i = 0; i < scope()->num_parameters(); i++) { | 224 for (int i = 0; i < scope()->num_parameters(); i++) { |
| 225 Variable* par = scope()->parameter(i); | 225 Variable* par = scope()->parameter(i); |
| 226 Slot* slot = par->slot(); | 226 Slot* slot = par->slot(); |
| 227 if (slot != NULL && slot->type() == Slot::CONTEXT) { | 227 if (slot != NULL && slot->type() == Slot::CONTEXT) { |
| 228 ASSERT(!scope()->is_global_scope()); // no parameters in global sco
pe | 228 ASSERT(!scope()->is_global_scope()); // No params in global scope. |
| 229 __ ldr(r1, frame_->ParameterAt(i)); | 229 __ ldr(r1, frame_->ParameterAt(i)); |
| 230 // Loads r2 with context; used below in RecordWrite. | 230 // Loads r2 with context; used below in RecordWrite. |
| 231 __ str(r1, SlotOperand(slot, r2)); | 231 __ str(r1, SlotOperand(slot, r2)); |
| 232 // Load the offset into r3. | 232 // Load the offset into r3. |
| 233 int slot_offset = | 233 int slot_offset = |
| 234 FixedArray::kHeaderSize + slot->index() * kPointerSize; | 234 FixedArray::kHeaderSize + slot->index() * kPointerSize; |
| 235 __ mov(r3, Operand(slot_offset)); | 235 __ mov(r3, Operand(slot_offset)); |
| 236 __ RecordWrite(r2, r3, r1); | 236 __ RecordWrite(r2, r3, r1); |
| 237 } | 237 } |
| 238 } | 238 } |
| (...skipping 7014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7253 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 7253 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
| 7254 // tagged as a small integer. | 7254 // tagged as a small integer. |
| 7255 __ bind(&runtime); | 7255 __ bind(&runtime); |
| 7256 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 7256 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
| 7257 } | 7257 } |
| 7258 | 7258 |
| 7259 | 7259 |
| 7260 #undef __ | 7260 #undef __ |
| 7261 | 7261 |
| 7262 } } // namespace v8::internal | 7262 } } // namespace v8::internal |
| OLD | NEW |