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

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

Issue 6894043: Crankshaft support for IN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
OLDNEW
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 4239 matching lines...) Expand 10 before | Expand all | Expand 10 after
4250 LEnvironment* env = instr->deoptimization_environment(); 4250 LEnvironment* env = instr->deoptimization_environment();
4251 RecordPosition(pointers->position()); 4251 RecordPosition(pointers->position());
4252 RegisterEnvironmentForDeoptimization(env); 4252 RegisterEnvironmentForDeoptimization(env);
4253 SafepointGenerator safepoint_generator(this, 4253 SafepointGenerator safepoint_generator(this,
4254 pointers, 4254 pointers,
4255 env->deoptimization_index()); 4255 env->deoptimization_index());
4256 __ InvokeBuiltin(Builtins::DELETE, CALL_JS, &safepoint_generator); 4256 __ InvokeBuiltin(Builtins::DELETE, CALL_JS, &safepoint_generator);
4257 } 4257 }
4258 4258
4259 4259
4260 void LCodeGen::DoIn(LIn* instr) {
4261 Register obj = ToRegister(instr->object());
4262 Register key = ToRegister(instr->key());
4263 __ Push(key, obj);
4264 ASSERT(instr->HasPointerMap() && instr->HasDeoptimizationEnvironment());
4265 LPointerMap* pointers = instr->pointer_map();
4266 LEnvironment* env = instr->deoptimization_environment();
4267 RecordPosition(pointers->position());
4268 RegisterEnvironmentForDeoptimization(env);
4269 SafepointGenerator safepoint_generator(this,
4270 pointers,
4271 env->deoptimization_index());
4272 __ InvokeBuiltin(Builtins::IN, CALL_JS, &safepoint_generator);
4273 }
4274
4275
4260 void LCodeGen::DoStackCheck(LStackCheck* instr) { 4276 void LCodeGen::DoStackCheck(LStackCheck* instr) {
4261 // Perform stack overflow check. 4277 // Perform stack overflow check.
4262 Label ok; 4278 Label ok;
4263 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 4279 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
4264 __ cmp(sp, Operand(ip)); 4280 __ cmp(sp, Operand(ip));
4265 __ b(hs, &ok); 4281 __ b(hs, &ok);
4266 StackCheckStub stub; 4282 StackCheckStub stub;
4267 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4283 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4268 __ bind(&ok); 4284 __ bind(&ok);
4269 } 4285 }
4270 4286
4271 4287
4272 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 4288 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
4273 // This is a pseudo-instruction that ensures that the environment here is 4289 // This is a pseudo-instruction that ensures that the environment here is
4274 // properly registered for deoptimization and records the assembler's PC 4290 // properly registered for deoptimization and records the assembler's PC
4275 // offset. 4291 // offset.
4276 LEnvironment* environment = instr->environment(); 4292 LEnvironment* environment = instr->environment();
4277 environment->SetSpilledRegisters(instr->SpilledRegisterArray(), 4293 environment->SetSpilledRegisters(instr->SpilledRegisterArray(),
4278 instr->SpilledDoubleRegisterArray()); 4294 instr->SpilledDoubleRegisterArray());
4279 4295
4280 // If the environment were already registered, we would have no way of 4296 // If the environment were already registered, we would have no way of
4281 // backpatching it with the spill slot operands. 4297 // backpatching it with the spill slot operands.
4282 ASSERT(!environment->HasBeenRegistered()); 4298 ASSERT(!environment->HasBeenRegistered());
4283 RegisterEnvironmentForDeoptimization(environment); 4299 RegisterEnvironmentForDeoptimization(environment);
4284 ASSERT(osr_pc_offset_ == -1); 4300 ASSERT(osr_pc_offset_ == -1);
4285 osr_pc_offset_ = masm()->pc_offset(); 4301 osr_pc_offset_ = masm()->pc_offset();
4286 } 4302 }
4287 4303
4288 4304
4305
4306
4289 #undef __ 4307 #undef __
4290 4308
4291 } } // namespace v8::internal 4309 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/frames.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698