| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 5451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5462 GenericBinaryOperation(node->op(), node->type(), overwrite_mode); | 5462 GenericBinaryOperation(node->op(), node->type(), overwrite_mode); |
| 5463 } | 5463 } |
| 5464 } | 5464 } |
| 5465 | 5465 |
| 5466 | 5466 |
| 5467 void CodeGenerator::VisitThisFunction(ThisFunction* node) { | 5467 void CodeGenerator::VisitThisFunction(ThisFunction* node) { |
| 5468 frame_->PushFunction(); | 5468 frame_->PushFunction(); |
| 5469 } | 5469 } |
| 5470 | 5470 |
| 5471 | 5471 |
| 5472 class InstanceofStub: public CodeStub { | |
| 5473 public: | |
| 5474 InstanceofStub() { } | |
| 5475 | |
| 5476 void Generate(MacroAssembler* masm); | |
| 5477 | |
| 5478 private: | |
| 5479 Major MajorKey() { return Instanceof; } | |
| 5480 int MinorKey() { return 0; } | |
| 5481 }; | |
| 5482 | |
| 5483 | |
| 5484 void CodeGenerator::VisitCompareOperation(CompareOperation* node) { | 5472 void CodeGenerator::VisitCompareOperation(CompareOperation* node) { |
| 5485 Comment cmnt(masm_, "[ CompareOperation"); | 5473 Comment cmnt(masm_, "[ CompareOperation"); |
| 5486 | 5474 |
| 5487 // Get the expressions from the node. | 5475 // Get the expressions from the node. |
| 5488 Expression* left = node->left(); | 5476 Expression* left = node->left(); |
| 5489 Expression* right = node->right(); | 5477 Expression* right = node->right(); |
| 5490 Token::Value op = node->op(); | 5478 Token::Value op = node->op(); |
| 5491 // To make typeof testing for natives implemented in JavaScript really | 5479 // To make typeof testing for natives implemented in JavaScript really |
| 5492 // efficient, we generate special code for expressions of the form: | 5480 // efficient, we generate special code for expressions of the form: |
| 5493 // 'typeof <expression> == <string>'. | 5481 // 'typeof <expression> == <string>'. |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7335 | 7323 |
| 7336 // Slow-case: Go through the JavaScript implementation. | 7324 // Slow-case: Go through the JavaScript implementation. |
| 7337 __ bind(&slow); | 7325 __ bind(&slow); |
| 7338 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 7326 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 7339 } | 7327 } |
| 7340 | 7328 |
| 7341 | 7329 |
| 7342 #undef __ | 7330 #undef __ |
| 7343 | 7331 |
| 7344 } } // namespace v8::internal | 7332 } } // namespace v8::internal |
| OLD | NEW |