| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 "_Arguments"}, | 323 "_Arguments"}, |
| 324 {&v8::internal::CodeGenerator::GenerateValueOf, | 324 {&v8::internal::CodeGenerator::GenerateValueOf, |
| 325 "_ValueOf"}, | 325 "_ValueOf"}, |
| 326 {&v8::internal::CodeGenerator::GenerateSetValueOf, | 326 {&v8::internal::CodeGenerator::GenerateSetValueOf, |
| 327 "_SetValueOf"}, | 327 "_SetValueOf"}, |
| 328 {&v8::internal::CodeGenerator::GenerateFastCharCodeAt, | 328 {&v8::internal::CodeGenerator::GenerateFastCharCodeAt, |
| 329 "_FastCharCodeAt"}, | 329 "_FastCharCodeAt"}, |
| 330 {&v8::internal::CodeGenerator::GenerateObjectEquals, | 330 {&v8::internal::CodeGenerator::GenerateObjectEquals, |
| 331 "_ObjectEquals"} | 331 "_ObjectEquals"} |
| 332 }; | 332 }; |
| 333 if (node->name()->length() > 0 && node->name()->Get(0) == '_') { | 333 Handle<String> name = node->name(); |
| 334 StringShape shape(*name); |
| 335 if (name->length(shape) > 0 && name->Get(shape, 0) == '_') { |
| 334 for (unsigned i = 0; | 336 for (unsigned i = 0; |
| 335 i < sizeof(kInlineRuntimeLUT) / sizeof(InlineRuntimeLUT); | 337 i < sizeof(kInlineRuntimeLUT) / sizeof(InlineRuntimeLUT); |
| 336 i++) { | 338 i++) { |
| 337 const InlineRuntimeLUT* entry = kInlineRuntimeLUT + i; | 339 const InlineRuntimeLUT* entry = kInlineRuntimeLUT + i; |
| 338 if (node->name()->IsEqualTo(CStrVector(entry->name))) { | 340 if (name->IsEqualTo(CStrVector(entry->name))) { |
| 339 ((*this).*(entry->method))(args); | 341 ((*this).*(entry->method))(args); |
| 340 return true; | 342 return true; |
| 341 } | 343 } |
| 342 } | 344 } |
| 343 } | 345 } |
| 344 return false; | 346 return false; |
| 345 } | 347 } |
| 346 | 348 |
| 347 | 349 |
| 348 void CodeGenerator::GenerateFastCaseSwitchStatement(SwitchStatement* node, | 350 void CodeGenerator::GenerateFastCaseSwitchStatement(SwitchStatement* node, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 467 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
| 466 switch (type_) { | 468 switch (type_) { |
| 467 case READ_LENGTH: GenerateReadLength(masm); break; | 469 case READ_LENGTH: GenerateReadLength(masm); break; |
| 468 case READ_ELEMENT: GenerateReadElement(masm); break; | 470 case READ_ELEMENT: GenerateReadElement(masm); break; |
| 469 case NEW_OBJECT: GenerateNewObject(masm); break; | 471 case NEW_OBJECT: GenerateNewObject(masm); break; |
| 470 } | 472 } |
| 471 } | 473 } |
| 472 | 474 |
| 473 | 475 |
| 474 } } // namespace v8::internal | 476 } } // namespace v8::internal |
| OLD | NEW |