| 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 8608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8619 | 8619 |
| 8620 | 8620 |
| 8621 // Check for the form (%_ClassOf(foo) === 'BarClass'). | 8621 // Check for the form (%_ClassOf(foo) === 'BarClass'). |
| 8622 static bool IsClassOfTest(CompareOperation* expr) { | 8622 static bool IsClassOfTest(CompareOperation* expr) { |
| 8623 if (expr->op() != Token::EQ_STRICT) return false; | 8623 if (expr->op() != Token::EQ_STRICT) return false; |
| 8624 CallRuntime* call = expr->left()->AsCallRuntime(); | 8624 CallRuntime* call = expr->left()->AsCallRuntime(); |
| 8625 if (call == NULL) return false; | 8625 if (call == NULL) return false; |
| 8626 Literal* literal = expr->right()->AsLiteral(); | 8626 Literal* literal = expr->right()->AsLiteral(); |
| 8627 if (literal == NULL) return false; | 8627 if (literal == NULL) return false; |
| 8628 if (!literal->handle()->IsString()) return false; | 8628 if (!literal->handle()->IsString()) return false; |
| 8629 if (!call->name()->IsOneByteEqualTo(STATIC_ASCII_VECTOR("_ClassOf"))) { | 8629 if (!call->name()->IsOneByteEqualTo(STATIC_ASCII_VECTOR("__ClassOf"))) { |
| 8630 return false; | 8630 return false; |
| 8631 } | 8631 } |
| 8632 ASSERT(call->arguments()->length() == 1); | 8632 ASSERT(call->arguments()->length() == 1); |
| 8633 return true; | 8633 return true; |
| 8634 } | 8634 } |
| 8635 | 8635 |
| 8636 | 8636 |
| 8637 void HOptimizedGraphBuilder::VisitBinaryOperation(BinaryOperation* expr) { | 8637 void HOptimizedGraphBuilder::VisitBinaryOperation(BinaryOperation* expr) { |
| 8638 ASSERT(!HasStackOverflow()); | 8638 ASSERT(!HasStackOverflow()); |
| 8639 ASSERT(current_block() != NULL); | 8639 ASSERT(current_block() != NULL); |
| (...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10325 } | 10325 } |
| 10326 } | 10326 } |
| 10327 | 10327 |
| 10328 #ifdef DEBUG | 10328 #ifdef DEBUG |
| 10329 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 10329 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 10330 if (allocator_ != NULL) allocator_->Verify(); | 10330 if (allocator_ != NULL) allocator_->Verify(); |
| 10331 #endif | 10331 #endif |
| 10332 } | 10332 } |
| 10333 | 10333 |
| 10334 } } // namespace v8::internal | 10334 } } // namespace v8::internal |
| OLD | NEW |