| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 | 210 |
| 211 bool CodeGenerator::CheckForInlineRuntimeCall(CallRuntime* node) { | 211 bool CodeGenerator::CheckForInlineRuntimeCall(CallRuntime* node) { |
| 212 ZoneList<Expression*>* args = node->arguments(); | 212 ZoneList<Expression*>* args = node->arguments(); |
| 213 // Special cases: These 'runtime calls' manipulate the current | 213 // Special cases: These 'runtime calls' manipulate the current |
| 214 // frame and are only used 1 or two places, so we generate them | 214 // frame and are only used 1 or two places, so we generate them |
| 215 // inline instead of generating calls to them. They are used | 215 // inline instead of generating calls to them. They are used |
| 216 // for implementing Function.prototype.call() and | 216 // for implementing Function.prototype.call() and |
| 217 // Function.prototype.apply(). | 217 // Function.prototype.apply(). |
| 218 static const InlineRuntimeLUT kInlineRuntimeLUT[] = { | 218 static const InlineRuntimeLUT kInlineRuntimeLUT[] = { |
| 219 {&v8::internal::CodeGenerator::GenerateShiftDownAndTailCall, | |
| 220 "_ShiftDownAndTailCall"}, | |
| 221 {&v8::internal::CodeGenerator::GenerateSetThisFunction, | |
| 222 "_SetThisFunction"}, | |
| 223 {&v8::internal::CodeGenerator::GenerateGetThisFunction, | |
| 224 "_GetThisFunction"}, | |
| 225 {&v8::internal::CodeGenerator::GenerateSetThis, | |
| 226 "_SetThis"}, | |
| 227 {&v8::internal::CodeGenerator::GenerateGetArgumentsLength, | |
| 228 "_GetArgumentsLength"}, | |
| 229 {&v8::internal::CodeGenerator::GenerateSetArgumentsLength, | |
| 230 "_SetArgumentsLength"}, | |
| 231 {&v8::internal::CodeGenerator::GenerateTailCallWithArguments, | |
| 232 "_TailCallWithArguments"}, | |
| 233 {&v8::internal::CodeGenerator::GenerateSetArgument, | |
| 234 "_SetArgument"}, | |
| 235 {&v8::internal::CodeGenerator::GenerateSquashFrame, | |
| 236 "_SquashFrame"}, | |
| 237 {&v8::internal::CodeGenerator::GenerateExpandFrame, | |
| 238 "_ExpandFrame"}, | |
| 239 {&v8::internal::CodeGenerator::GenerateIsSmi, | 219 {&v8::internal::CodeGenerator::GenerateIsSmi, |
| 240 "_IsSmi"}, | 220 "_IsSmi"}, |
| 241 {&v8::internal::CodeGenerator::GenerateIsNonNegativeSmi, | 221 {&v8::internal::CodeGenerator::GenerateIsNonNegativeSmi, |
| 242 "_IsNonNegativeSmi"}, | 222 "_IsNonNegativeSmi"}, |
| 243 {&v8::internal::CodeGenerator::GenerateIsArray, | 223 {&v8::internal::CodeGenerator::GenerateIsArray, |
| 244 "_IsArray"}, | 224 "_IsArray"}, |
| 245 {&v8::internal::CodeGenerator::GenerateArgumentsLength, | 225 {&v8::internal::CodeGenerator::GenerateArgumentsLength, |
| 246 "_ArgumentsLength"}, | 226 "_ArgumentsLength"}, |
| 247 {&v8::internal::CodeGenerator::GenerateArgumentsAccess, | 227 {&v8::internal::CodeGenerator::GenerateArgumentsAccess, |
| 248 "_Arguments"}, | 228 "_Arguments"}, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 274 return Runtime::FunctionForId(id_)->stub_name; | 254 return Runtime::FunctionForId(id_)->stub_name; |
| 275 } | 255 } |
| 276 | 256 |
| 277 | 257 |
| 278 void RuntimeStub::Generate(MacroAssembler* masm) { | 258 void RuntimeStub::Generate(MacroAssembler* masm) { |
| 279 masm->TailCallRuntime(ExternalReference(id_), num_arguments_); | 259 masm->TailCallRuntime(ExternalReference(id_), num_arguments_); |
| 280 } | 260 } |
| 281 | 261 |
| 282 | 262 |
| 283 } } // namespace v8::internal | 263 } } // namespace v8::internal |
| OLD | NEW |