| 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 5188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5199 break; | 5199 break; |
| 5200 case COS: | 5200 case COS: |
| 5201 answer = frame_->CallRuntime(Runtime::kMath_cos, 1); | 5201 answer = frame_->CallRuntime(Runtime::kMath_cos, 1); |
| 5202 break; | 5202 break; |
| 5203 } | 5203 } |
| 5204 frame_->Push(&answer); | 5204 frame_->Push(&answer); |
| 5205 done.Bind(); | 5205 done.Bind(); |
| 5206 } | 5206 } |
| 5207 | 5207 |
| 5208 | 5208 |
| 5209 void CodeGenerator::GenerateNumberMod(ZoneList<Expression*>* args) { |
| 5210 // Simply call the runtime function. Arguments must be numbers. |
| 5211 ASSERT(args->length() == 2); |
| 5212 Load(args->at(0)); |
| 5213 Load(args->at(1)); |
| 5214 Result answer = frame_->CallRuntime(Runtime::kNumberMod, 2); |
| 5215 frame_->Push(&answer); |
| 5216 } |
| 5217 |
| 5218 |
| 5209 void CodeGenerator::VisitCallRuntime(CallRuntime* node) { | 5219 void CodeGenerator::VisitCallRuntime(CallRuntime* node) { |
| 5210 if (CheckForInlineRuntimeCall(node)) { | 5220 if (CheckForInlineRuntimeCall(node)) { |
| 5211 return; | 5221 return; |
| 5212 } | 5222 } |
| 5213 | 5223 |
| 5214 ZoneList<Expression*>* args = node->arguments(); | 5224 ZoneList<Expression*>* args = node->arguments(); |
| 5215 Comment cmnt(masm_, "[ CallRuntime"); | 5225 Comment cmnt(masm_, "[ CallRuntime"); |
| 5216 Runtime::Function* function = node->function(); | 5226 Runtime::Function* function = node->function(); |
| 5217 | 5227 |
| 5218 if (function == NULL) { | 5228 if (function == NULL) { |
| (...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8123 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 8133 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 8124 } | 8134 } |
| 8125 | 8135 |
| 8126 | 8136 |
| 8127 int CompareStub::MinorKey() { | 8137 int CompareStub::MinorKey() { |
| 8128 // Encode the two parameters in a unique 16 bit value. | 8138 // Encode the two parameters in a unique 16 bit value. |
| 8129 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 8139 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
| 8130 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 8140 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
| 8131 } | 8141 } |
| 8132 | 8142 |
| 8143 |
| 8133 #undef __ | 8144 #undef __ |
| 8134 | 8145 |
| 8135 } } // namespace v8::internal | 8146 } } // namespace v8::internal |
| OLD | NEW |