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

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

Issue 18154004: Replace custom builtin invocation instructions by a generic version (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 5 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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6358 matching lines...) Expand 10 before | Expand all | Expand 10 after
6369 DeoptimizeIf(no_condition, instr->environment()); 6369 DeoptimizeIf(no_condition, instr->environment());
6370 } 6370 }
6371 } 6371 }
6372 6372
6373 6373
6374 void LCodeGen::DoDummyUse(LDummyUse* instr) { 6374 void LCodeGen::DoDummyUse(LDummyUse* instr) {
6375 // Nothing to see here, move on! 6375 // Nothing to see here, move on!
6376 } 6376 }
6377 6377
6378 6378
6379 void LCodeGen::DoDeleteProperty(LDeleteProperty* instr) {
6380 LOperand* obj = instr->object();
6381 LOperand* key = instr->key();
6382 __ push(ToOperand(obj));
6383 EmitPushTaggedOperand(key);
6384 ASSERT(instr->HasPointerMap());
6385 LPointerMap* pointers = instr->pointer_map();
6386 RecordPosition(pointers->position());
6387 // Create safepoint generator that will also ensure enough space in the
6388 // reloc info for patching in deoptimization (since this is invoking a
6389 // builtin)
6390 SafepointGenerator safepoint_generator(
6391 this, pointers, Safepoint::kLazyDeopt);
6392 __ push(Immediate(Smi::FromInt(strict_mode_flag())));
6393 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION, safepoint_generator);
6394 }
6395
6396
6397 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { 6379 void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
6398 PushSafepointRegistersScope scope(this); 6380 PushSafepointRegistersScope scope(this);
6399 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 6381 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
6400 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); 6382 __ CallRuntimeSaveDoubles(Runtime::kStackGuard);
6401 RecordSafepointWithLazyDeopt( 6383 RecordSafepointWithLazyDeopt(
6402 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 6384 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
6403 ASSERT(instr->HasEnvironment()); 6385 ASSERT(instr->HasEnvironment());
6404 LEnvironment* env = instr->environment(); 6386 LEnvironment* env = instr->environment();
6405 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 6387 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
6406 } 6388 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
6467 // backpatching it with the spill slot operands. 6449 // backpatching it with the spill slot operands.
6468 ASSERT(!environment->HasBeenRegistered()); 6450 ASSERT(!environment->HasBeenRegistered());
6469 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); 6451 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
6470 6452
6471 // Normally we record the first unknown OSR value as the entrypoint to the OSR 6453 // Normally we record the first unknown OSR value as the entrypoint to the OSR
6472 // code, but if there were none, record the entrypoint here. 6454 // code, but if there were none, record the entrypoint here.
6473 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset(); 6455 if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
6474 } 6456 }
6475 6457
6476 6458
6477 void LCodeGen::DoIn(LIn* instr) {
6478 LOperand* obj = instr->object();
6479 LOperand* key = instr->key();
6480 EmitPushTaggedOperand(key);
6481 EmitPushTaggedOperand(obj);
6482 ASSERT(instr->HasPointerMap());
6483 LPointerMap* pointers = instr->pointer_map();
6484 RecordPosition(pointers->position());
6485 SafepointGenerator safepoint_generator(
6486 this, pointers, Safepoint::kLazyDeopt);
6487 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
6488 }
6489
6490
6491 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { 6459 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) {
6492 __ cmp(eax, isolate()->factory()->undefined_value()); 6460 __ cmp(eax, isolate()->factory()->undefined_value());
6493 DeoptimizeIf(equal, instr->environment()); 6461 DeoptimizeIf(equal, instr->environment());
6494 6462
6495 __ cmp(eax, isolate()->factory()->null_value()); 6463 __ cmp(eax, isolate()->factory()->null_value());
6496 DeoptimizeIf(equal, instr->environment()); 6464 DeoptimizeIf(equal, instr->environment());
6497 6465
6498 __ test(eax, Immediate(kSmiTagMask)); 6466 __ test(eax, Immediate(kSmiTagMask));
6499 DeoptimizeIf(zero, instr->environment()); 6467 DeoptimizeIf(zero, instr->environment());
6500 6468
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
6573 FixedArray::kHeaderSize - kPointerSize)); 6541 FixedArray::kHeaderSize - kPointerSize));
6574 __ bind(&done); 6542 __ bind(&done);
6575 } 6543 }
6576 6544
6577 6545
6578 #undef __ 6546 #undef __
6579 6547
6580 } } // namespace v8::internal 6548 } } // namespace v8::internal
6581 6549
6582 #endif // V8_TARGET_ARCH_IA32 6550 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698