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

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

Issue 8983027: Rollback 10331: Make sure transitioned arrays efficiently call builtin Array functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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/ia32/lithium-codegen-ia32.h ('k') | src/ia32/macro-assembler-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 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
11 // with the distribution. 11 // with the distribution.
(...skipping 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after
4026 isolate()->factory()->NewJSGlobalPropertyCell(target); 4026 isolate()->factory()->NewJSGlobalPropertyCell(target);
4027 __ cmp(reg, Operand::Cell(cell)); 4027 __ cmp(reg, Operand::Cell(cell));
4028 } else { 4028 } else {
4029 Operand operand = ToOperand(instr->value()); 4029 Operand operand = ToOperand(instr->value());
4030 __ cmp(operand, target); 4030 __ cmp(operand, target);
4031 } 4031 }
4032 DeoptimizeIf(not_equal, instr->environment()); 4032 DeoptimizeIf(not_equal, instr->environment());
4033 } 4033 }
4034 4034
4035 4035
4036 void LCodeGen::DoCheckMapCommon(Register reg,
4037 Handle<Map> map,
4038 CompareMapMode mode,
4039 LEnvironment* env) {
4040 Label success;
4041 __ CompareMap(reg, map, &success, mode);
4042 DeoptimizeIf(not_equal, env);
4043 __ bind(&success);
4044 }
4045
4046
4047 void LCodeGen::DoCheckMap(LCheckMap* instr) { 4036 void LCodeGen::DoCheckMap(LCheckMap* instr) {
4048 LOperand* input = instr->InputAt(0); 4037 LOperand* input = instr->InputAt(0);
4049 ASSERT(input->IsRegister()); 4038 ASSERT(input->IsRegister());
4050 Register reg = ToRegister(input); 4039 Register reg = ToRegister(input);
4051 Handle<Map> map = instr->hydrogen()->map(); 4040 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
4052 DoCheckMapCommon(reg, map, instr->hydrogen()->mode(), instr->environment()); 4041 instr->hydrogen()->map());
4042 DeoptimizeIf(not_equal, instr->environment());
4053 } 4043 }
4054 4044
4055 4045
4056 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { 4046 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
4057 XMMRegister value_reg = ToDoubleRegister(instr->unclamped()); 4047 XMMRegister value_reg = ToDoubleRegister(instr->unclamped());
4058 Register result_reg = ToRegister(instr->result()); 4048 Register result_reg = ToRegister(instr->result());
4059 __ ClampDoubleToUint8(value_reg, xmm0, result_reg); 4049 __ ClampDoubleToUint8(value_reg, xmm0, result_reg);
4060 } 4050 }
4061 4051
4062 4052
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
4105 Register reg = ToRegister(instr->TempAt(0)); 4095 Register reg = ToRegister(instr->TempAt(0));
4106 4096
4107 Handle<JSObject> holder = instr->holder(); 4097 Handle<JSObject> holder = instr->holder();
4108 Handle<JSObject> current_prototype = instr->prototype(); 4098 Handle<JSObject> current_prototype = instr->prototype();
4109 4099
4110 // Load prototype object. 4100 // Load prototype object.
4111 __ LoadHeapObject(reg, current_prototype); 4101 __ LoadHeapObject(reg, current_prototype);
4112 4102
4113 // Check prototype maps up to the holder. 4103 // Check prototype maps up to the holder.
4114 while (!current_prototype.is_identical_to(holder)) { 4104 while (!current_prototype.is_identical_to(holder)) {
4115 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()), 4105 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
4116 ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment()); 4106 Handle<Map>(current_prototype->map()));
4117 4107 DeoptimizeIf(not_equal, instr->environment());
4118 current_prototype = 4108 current_prototype =
4119 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype())); 4109 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
4120 // Load next prototype object. 4110 // Load next prototype object.
4121 __ LoadHeapObject(reg, current_prototype); 4111 __ LoadHeapObject(reg, current_prototype);
4122 } 4112 }
4123 4113
4124 // Check the holder map. 4114 // Check the holder map.
4125 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()), 4115 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
4126 ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment()); 4116 Handle<Map>(current_prototype->map()));
4117 DeoptimizeIf(not_equal, instr->environment());
4127 } 4118 }
4128 4119
4129 4120
4130 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { 4121 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) {
4131 ASSERT(ToRegister(instr->context()).is(esi)); 4122 ASSERT(ToRegister(instr->context()).is(esi));
4132 Heap* heap = isolate()->heap(); 4123 Heap* heap = isolate()->heap();
4133 ElementsKind boilerplate_elements_kind = 4124 ElementsKind boilerplate_elements_kind =
4134 instr->hydrogen()->boilerplate_elements_kind(); 4125 instr->hydrogen()->boilerplate_elements_kind();
4135 4126
4136 // Deopt if the array literal boilerplate ElementsKind is of a type different 4127 // Deopt if the array literal boilerplate ElementsKind is of a type different
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
4621 this, pointers, Safepoint::kLazyDeopt); 4612 this, pointers, Safepoint::kLazyDeopt);
4622 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4613 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4623 } 4614 }
4624 4615
4625 4616
4626 #undef __ 4617 #undef __
4627 4618
4628 } } // namespace v8::internal 4619 } } // namespace v8::internal
4629 4620
4630 #endif // V8_TARGET_ARCH_IA32 4621 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698