| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 9213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9224 combined_type = left_type = right_type = handle(Type::Any(), isolate()); | 9224 combined_type = left_type = right_type = handle(Type::Any(), isolate()); |
| 9225 } | 9225 } |
| 9226 | 9226 |
| 9227 if (combined_type->Is(Type::Receiver())) { | 9227 if (combined_type->Is(Type::Receiver())) { |
| 9228 switch (op) { | 9228 switch (op) { |
| 9229 case Token::EQ: | 9229 case Token::EQ: |
| 9230 case Token::EQ_STRICT: { | 9230 case Token::EQ_STRICT: { |
| 9231 // Can we get away with map check and not instance type check? | 9231 // Can we get away with map check and not instance type check? |
| 9232 if (combined_type->IsClass()) { | 9232 if (combined_type->IsClass()) { |
| 9233 Handle<Map> map = combined_type->AsClass(); | 9233 Handle<Map> map = combined_type->AsClass(); |
| 9234 AddCheckMap(left, map); | |
| 9235 AddCheckMap(right, map); | |
| 9236 HCompareObjectEqAndBranch* result = | 9234 HCompareObjectEqAndBranch* result = |
| 9237 New<HCompareObjectEqAndBranch>(left, right); | 9235 New<HCompareObjectEqAndBranch>(AddCheckMap(left, map), |
| 9236 AddCheckMap(right, map)); |
| 9238 if (FLAG_emit_opt_code_positions) { | 9237 if (FLAG_emit_opt_code_positions) { |
| 9239 result->set_operand_position(zone(), 0, expr->left()->position()); | 9238 result->set_operand_position(zone(), 0, expr->left()->position()); |
| 9240 result->set_operand_position(zone(), 1, expr->right()->position()); | 9239 result->set_operand_position(zone(), 1, expr->right()->position()); |
| 9241 } | 9240 } |
| 9242 return ast_context()->ReturnControl(result, expr->id()); | 9241 return ast_context()->ReturnControl(result, expr->id()); |
| 9243 } else { | 9242 } else { |
| 9244 BuildCheckHeapObject(left); | 9243 BuildCheckHeapObject(left); |
| 9245 Add<HCheckInstanceType>(left, HCheckInstanceType::IS_SPEC_OBJECT); | 9244 Add<HCheckInstanceType>(left, HCheckInstanceType::IS_SPEC_OBJECT); |
| 9246 BuildCheckHeapObject(right); | 9245 BuildCheckHeapObject(right); |
| 9247 Add<HCheckInstanceType>(right, HCheckInstanceType::IS_SPEC_OBJECT); | 9246 Add<HCheckInstanceType>(right, HCheckInstanceType::IS_SPEC_OBJECT); |
| (...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10808 if (ShouldProduceTraceOutput()) { | 10807 if (ShouldProduceTraceOutput()) { |
| 10809 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 10808 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 10810 } | 10809 } |
| 10811 | 10810 |
| 10812 #ifdef DEBUG | 10811 #ifdef DEBUG |
| 10813 graph_->Verify(false); // No full verify. | 10812 graph_->Verify(false); // No full verify. |
| 10814 #endif | 10813 #endif |
| 10815 } | 10814 } |
| 10816 | 10815 |
| 10817 } } // namespace v8::internal | 10816 } } // namespace v8::internal |
| OLD | NEW |