OLD | NEW |
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 4291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4302 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4302 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4303 } | 4303 } |
4304 | 4304 |
4305 | 4305 |
4306 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { | 4306 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
4307 Register object_reg = ToRegister(instr->object()); | 4307 Register object_reg = ToRegister(instr->object()); |
4308 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4308 Register new_map_reg = ToRegister(instr->new_map_temp()); |
4309 | 4309 |
4310 Handle<Map> from_map = instr->original_map(); | 4310 Handle<Map> from_map = instr->original_map(); |
4311 Handle<Map> to_map = instr->transitioned_map(); | 4311 Handle<Map> to_map = instr->transitioned_map(); |
4312 ElementsKind from_kind = from_map->elements_kind(); | 4312 ElementsKind from_kind = instr->from_kind(); |
4313 ElementsKind to_kind = to_map->elements_kind(); | 4313 ElementsKind to_kind = instr->to_kind(); |
4314 | 4314 |
4315 Label not_applicable; | 4315 Label not_applicable; |
4316 bool is_simple_map_transition = | 4316 bool is_simple_map_transition = |
4317 IsSimpleMapChangeTransition(from_kind, to_kind); | 4317 IsSimpleMapChangeTransition(from_kind, to_kind); |
4318 Label::Distance branch_distance = | 4318 Label::Distance branch_distance = |
4319 is_simple_map_transition ? Label::kNear : Label::kFar; | 4319 is_simple_map_transition ? Label::kNear : Label::kFar; |
4320 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); | 4320 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); |
4321 __ j(not_equal, ¬_applicable, branch_distance); | 4321 __ j(not_equal, ¬_applicable, branch_distance); |
4322 if (is_simple_map_transition) { | 4322 if (is_simple_map_transition) { |
4323 Register object_reg = ToRegister(instr->object()); | 4323 Register object_reg = ToRegister(instr->object()); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5065 __ and_(temp, mask); | 5065 __ and_(temp, mask); |
5066 __ cmp(temp, tag); | 5066 __ cmp(temp, tag); |
5067 DeoptimizeIf(not_equal, instr->environment()); | 5067 DeoptimizeIf(not_equal, instr->environment()); |
5068 } | 5068 } |
5069 } | 5069 } |
5070 } | 5070 } |
5071 | 5071 |
5072 | 5072 |
5073 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { | 5073 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
5074 Handle<JSFunction> target = instr->hydrogen()->target(); | 5074 Handle<JSFunction> target = instr->hydrogen()->target(); |
5075 if (isolate()->heap()->InNewSpace(*target)) { | 5075 if (instr->hydrogen()->target_in_new_space()) { |
5076 Register reg = ToRegister(instr->value()); | 5076 Register reg = ToRegister(instr->value()); |
5077 Handle<JSGlobalPropertyCell> cell = | 5077 Handle<JSGlobalPropertyCell> cell = |
5078 isolate()->factory()->NewJSGlobalPropertyCell(target); | 5078 isolate()->factory()->NewJSGlobalPropertyCell(target); |
5079 __ cmp(reg, Operand::Cell(cell)); | 5079 __ cmp(reg, Operand::Cell(cell)); |
5080 } else { | 5080 } else { |
5081 Operand operand = ToOperand(instr->value()); | 5081 Operand operand = ToOperand(instr->value()); |
5082 __ cmp(operand, target); | 5082 __ cmp(operand, target); |
5083 } | 5083 } |
5084 DeoptimizeIf(not_equal, instr->environment()); | 5084 DeoptimizeIf(not_equal, instr->environment()); |
5085 } | 5085 } |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5966 FixedArray::kHeaderSize - kPointerSize)); | 5966 FixedArray::kHeaderSize - kPointerSize)); |
5967 __ bind(&done); | 5967 __ bind(&done); |
5968 } | 5968 } |
5969 | 5969 |
5970 | 5970 |
5971 #undef __ | 5971 #undef __ |
5972 | 5972 |
5973 } } // namespace v8::internal | 5973 } } // namespace v8::internal |
5974 | 5974 |
5975 #endif // V8_TARGET_ARCH_IA32 | 5975 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |