| OLD | NEW |
| 1 // Copyright 2011 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 |
| (...skipping 4350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4361 ASSERT(!HasStackOverflow()); | 4361 ASSERT(!HasStackOverflow()); |
| 4362 ASSERT(current_block() != NULL); | 4362 ASSERT(current_block() != NULL); |
| 4363 ASSERT(current_block()->HasPredecessor()); | 4363 ASSERT(current_block()->HasPredecessor()); |
| 4364 expr->RecordTypeFeedback(oracle()); | 4364 expr->RecordTypeFeedback(oracle()); |
| 4365 | 4365 |
| 4366 if (TryArgumentsAccess(expr)) return; | 4366 if (TryArgumentsAccess(expr)) return; |
| 4367 | 4367 |
| 4368 CHECK_ALIVE(VisitForValue(expr->obj())); | 4368 CHECK_ALIVE(VisitForValue(expr->obj())); |
| 4369 | 4369 |
| 4370 HInstruction* instr = NULL; | 4370 HInstruction* instr = NULL; |
| 4371 if (expr->IsArrayLength()) { | 4371 if (expr->AsProperty()->IsArrayLength()) { |
| 4372 HValue* array = Pop(); | 4372 HValue* array = Pop(); |
| 4373 AddInstruction(new(zone()) HCheckNonSmi(array)); | 4373 AddInstruction(new(zone()) HCheckNonSmi(array)); |
| 4374 HInstruction* mapcheck = | 4374 HInstruction* mapcheck = |
| 4375 AddInstruction(HCheckInstanceType::NewIsJSArray(array)); | 4375 AddInstruction(HCheckInstanceType::NewIsJSArray(array)); |
| 4376 instr = new(zone()) HJSArrayLength(array, mapcheck); | 4376 instr = new(zone()) HJSArrayLength(array, mapcheck); |
| 4377 | 4377 |
| 4378 } else if (expr->IsStringLength()) { | 4378 } else if (expr->IsStringLength()) { |
| 4379 HValue* string = Pop(); | 4379 HValue* string = Pop(); |
| 4380 AddInstruction(new(zone()) HCheckNonSmi(string)); | 4380 AddInstruction(new(zone()) HCheckNonSmi(string)); |
| 4381 AddInstruction(HCheckInstanceType::NewIsString(string)); | 4381 AddInstruction(HCheckInstanceType::NewIsString(string)); |
| (...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7019 } | 7019 } |
| 7020 } | 7020 } |
| 7021 | 7021 |
| 7022 #ifdef DEBUG | 7022 #ifdef DEBUG |
| 7023 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7023 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 7024 if (allocator_ != NULL) allocator_->Verify(); | 7024 if (allocator_ != NULL) allocator_->Verify(); |
| 7025 #endif | 7025 #endif |
| 7026 } | 7026 } |
| 7027 | 7027 |
| 7028 } } // namespace v8::internal | 7028 } } // namespace v8::internal |
| OLD | NEW |