Chromium Code Reviews| 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 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1916 TranscendentalCacheStub::TAGGED); | 1916 TranscendentalCacheStub::TAGGED); |
| 1917 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1917 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1918 break; | 1918 break; |
| 1919 } | 1919 } |
| 1920 default: | 1920 default: |
| 1921 UNREACHABLE(); | 1921 UNREACHABLE(); |
| 1922 } | 1922 } |
| 1923 } | 1923 } |
| 1924 | 1924 |
| 1925 | 1925 |
| 1926 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | |
| 1927 // Record the address of the first unknown OSR value as the place to enter. | |
| 1928 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset(); | |
|
titzer
2014/01/24 17:04:32
You should have a subroutine like DoGenerateOsrPro
| |
| 1929 } | |
| 1930 | |
| 1931 | |
| 1926 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { | 1932 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
| 1927 Register object = ToRegister(instr->value()); | 1933 Register object = ToRegister(instr->value()); |
| 1928 Register map_reg = ToRegister(instr->temp()); | 1934 Register map_reg = ToRegister(instr->temp()); |
| 1929 | 1935 |
| 1930 Label success; | 1936 Label success; |
| 1931 SmallMapList* map_set = instr->hydrogen()->map_set(); | 1937 SmallMapList* map_set = instr->hydrogen()->map_set(); |
| 1932 __ Ldr(map_reg, FieldMemOperand(object, HeapObject::kMapOffset)); | 1938 __ Ldr(map_reg, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 1933 for (int i = 0; i < map_set->length(); i++) { | 1939 for (int i = 0; i < map_set->length(); i++) { |
| 1934 Handle<Map> map = map_set->at(i); | 1940 Handle<Map> map = map_set->at(i); |
| 1935 __ CompareMap(map_reg, map, &success); | 1941 __ CompareMap(map_reg, map, &success); |
| (...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4313 | 4319 |
| 4314 // Smi to double register conversion. | 4320 // Smi to double register conversion. |
| 4315 __ Bind(&load_smi); | 4321 __ Bind(&load_smi); |
| 4316 __ SmiUntagToDouble(result, input); | 4322 __ SmiUntagToDouble(result, input); |
| 4317 | 4323 |
| 4318 __ Bind(&done); | 4324 __ Bind(&done); |
| 4319 } | 4325 } |
| 4320 | 4326 |
| 4321 | 4327 |
| 4322 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { | 4328 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { |
| 4323 ASM_UNIMPLEMENTED_BREAK("DoOsrEntry"); | 4329 // This is a pseudo-instruction that ensures that the environment here is |
| 4330 // properly registered for deoptimization and records the assembler's PC | |
| 4331 // offset. | |
| 4332 LEnvironment* environment = instr->environment(); | |
| 4333 | |
| 4334 // If the environment were already registered, we would have no way of | |
| 4335 // backpatching it with the spill slot operands. | |
| 4336 ASSERT(!environment->HasBeenRegistered()); | |
| 4337 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | |
| 4338 | |
| 4339 // Normally we record the first unknown OSR value as the entrypoint to the OSR | |
| 4340 // code, but if there were none, record the entrypoint here. | |
| 4341 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset(); | |
| 4324 } | 4342 } |
| 4325 | 4343 |
| 4326 | 4344 |
| 4327 void LCodeGen::DoOuterContext(LOuterContext* instr) { | 4345 void LCodeGen::DoOuterContext(LOuterContext* instr) { |
| 4328 Register context = ToRegister(instr->context()); | 4346 Register context = ToRegister(instr->context()); |
| 4329 Register result = ToRegister(instr->result()); | 4347 Register result = ToRegister(instr->result()); |
| 4330 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX)); | 4348 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX)); |
| 4331 } | 4349 } |
| 4332 | 4350 |
| 4333 | 4351 |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5441 __ Bind(&out_of_object); | 5459 __ Bind(&out_of_object); |
| 5442 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5460 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5443 // Index is equal to negated out of object property index plus 1. | 5461 // Index is equal to negated out of object property index plus 1. |
| 5444 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5462 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5445 __ Ldr(result, FieldMemOperand(result, | 5463 __ Ldr(result, FieldMemOperand(result, |
| 5446 FixedArray::kHeaderSize - kPointerSize)); | 5464 FixedArray::kHeaderSize - kPointerSize)); |
| 5447 __ Bind(&done); | 5465 __ Bind(&done); |
| 5448 } | 5466 } |
| 5449 | 5467 |
| 5450 } } // namespace v8::internal | 5468 } } // namespace v8::internal |
| OLD | NEW |