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

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

Issue 23710070: Allow control intructions to have side effects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 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 3022 matching lines...) Expand 10 before | Expand all | Expand 10 after
3033 3033
3034 3034
3035 void LCodeGen::DoInstanceSize(LInstanceSize* instr) { 3035 void LCodeGen::DoInstanceSize(LInstanceSize* instr) {
3036 Register object = ToRegister(instr->object()); 3036 Register object = ToRegister(instr->object());
3037 Register result = ToRegister(instr->result()); 3037 Register result = ToRegister(instr->result());
3038 __ mov(result, FieldOperand(object, HeapObject::kMapOffset)); 3038 __ mov(result, FieldOperand(object, HeapObject::kMapOffset));
3039 __ movzx_b(result, FieldOperand(result, Map::kInstanceSizeOffset)); 3039 __ movzx_b(result, FieldOperand(result, Map::kInstanceSizeOffset));
3040 } 3040 }
3041 3041
3042 3042
3043 void LCodeGen::DoCmpT(LCmpT* instr) { 3043 void LCodeGen::DoCompareGenericAndBranch(LCompareGenericAndBranch* instr) {
3044 Token::Value op = instr->op(); 3044 Token::Value op = instr->op();
3045 3045
3046 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op); 3046 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op);
3047 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3047 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3048 3048
3049 Condition condition = ComputeCompareCondition(op); 3049 Condition condition = ComputeCompareCondition(op);
3050 Label true_value, done;
3051 __ test(eax, Operand(eax)); 3050 __ test(eax, Operand(eax));
3052 __ j(condition, &true_value, Label::kNear); 3051 EmitBranch(instr, condition);
3053 __ mov(ToRegister(instr->result()), factory()->false_value());
3054 __ jmp(&done, Label::kNear);
3055 __ bind(&true_value);
3056 __ mov(ToRegister(instr->result()), factory()->true_value());
3057 __ bind(&done);
3058 } 3052 }
3059 3053
3060 3054
3061 void LCodeGen::EmitReturn(LReturn* instr, bool dynamic_frame_alignment) { 3055 void LCodeGen::EmitReturn(LReturn* instr, bool dynamic_frame_alignment) {
3062 int extra_value_count = dynamic_frame_alignment ? 2 : 1; 3056 int extra_value_count = dynamic_frame_alignment ? 2 : 1;
3063 3057
3064 if (instr->has_constant_parameter_count()) { 3058 if (instr->has_constant_parameter_count()) {
3065 int parameter_count = ToInteger32(instr->constant_parameter_count()); 3059 int parameter_count = ToInteger32(instr->constant_parameter_count());
3066 if (dynamic_frame_alignment && FLAG_debug_code) { 3060 if (dynamic_frame_alignment && FLAG_debug_code) {
3067 __ cmp(Operand(esp, 3061 __ cmp(Operand(esp,
(...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after
6384 FixedArray::kHeaderSize - kPointerSize)); 6378 FixedArray::kHeaderSize - kPointerSize));
6385 __ bind(&done); 6379 __ bind(&done);
6386 } 6380 }
6387 6381
6388 6382
6389 #undef __ 6383 #undef __
6390 6384
6391 } } // namespace v8::internal 6385 } } // namespace v8::internal
6392 6386
6393 #endif // V8_TARGET_ARCH_IA32 6387 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698