Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: src/a64/lithium-codegen-a64.cc

Issue 145713002: A64: Implement LOsrEntry and LUnknownOSRValue (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: updates Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
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 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
4339 4345
4340 // Smi to double register conversion. 4346 // Smi to double register conversion.
4341 __ Bind(&load_smi); 4347 __ Bind(&load_smi);
4342 __ SmiUntagToDouble(result, input); 4348 __ SmiUntagToDouble(result, input);
4343 4349
4344 __ Bind(&done); 4350 __ Bind(&done);
4345 } 4351 }
4346 4352
4347 4353
4348 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 4354 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
4349 ASM_UNIMPLEMENTED_BREAK("DoOsrEntry"); 4355 // This is a pseudo-instruction that ensures that the environment here is
4356 // properly registered for deoptimization and records the assembler's PC
4357 // offset.
4358 LEnvironment* environment = instr->environment();
4359
4360 // If the environment were already registered, we would have no way of
4361 // backpatching it with the spill slot operands.
4362 ASSERT(!environment->HasBeenRegistered());
4363 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
4364
4365 // Normally we record the first unknown OSR value as the entrypoint to the OSR
4366 // code, but if there were none, record the entrypoint here.
4367 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
4350 } 4368 }
4351 4369
4352 4370
4353 void LCodeGen::DoOuterContext(LOuterContext* instr) { 4371 void LCodeGen::DoOuterContext(LOuterContext* instr) {
4354 Register context = ToRegister(instr->context()); 4372 Register context = ToRegister(instr->context());
4355 Register result = ToRegister(instr->result()); 4373 Register result = ToRegister(instr->result());
4356 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX)); 4374 __ Ldr(result, ContextMemOperand(context, Context::PREVIOUS_INDEX));
4357 } 4375 }
4358 4376
4359 4377
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
5469 __ Bind(&out_of_object); 5487 __ Bind(&out_of_object);
5470 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5488 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5471 // Index is equal to negated out of object property index plus 1. 5489 // Index is equal to negated out of object property index plus 1.
5472 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5490 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5473 __ Ldr(result, FieldMemOperand(result, 5491 __ Ldr(result, FieldMemOperand(result,
5474 FixedArray::kHeaderSize - kPointerSize)); 5492 FixedArray::kHeaderSize - kPointerSize));
5475 __ Bind(&done); 5493 __ Bind(&done);
5476 } 5494 }
5477 5495
5478 } } // namespace v8::internal 5496 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/a64/lithium-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698