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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 } | 511 } |
512 | 512 |
513 Code::Flags flags = | 513 Code::Flags flags = |
514 Code::ComputeMonomorphicFlags(Code::CALL_IC, | 514 Code::ComputeMonomorphicFlags(Code::CALL_IC, |
515 INTERCEPTOR, | 515 INTERCEPTOR, |
516 NOT_IN_LOOP, | 516 NOT_IN_LOOP, |
517 argc); | 517 argc); |
518 Object* code = map->FindInCodeCache(name, flags); | 518 Object* code = map->FindInCodeCache(name, flags); |
519 if (code->IsUndefined()) { | 519 if (code->IsUndefined()) { |
520 CallStubCompiler compiler(argc, NOT_IN_LOOP); | 520 CallStubCompiler compiler(argc, NOT_IN_LOOP); |
521 code = compiler.CompileCallInterceptor(object, holder, name); | 521 code = compiler.CompileCallInterceptor(JSObject::cast(object), |
| 522 holder, |
| 523 name); |
522 if (code->IsFailure()) return code; | 524 if (code->IsFailure()) return code; |
523 ASSERT_EQ(flags, Code::cast(code)->flags()); | 525 ASSERT_EQ(flags, Code::cast(code)->flags()); |
524 LOG(CodeCreateEvent(Logger::CALL_IC_TAG, Code::cast(code), name)); | 526 LOG(CodeCreateEvent(Logger::CALL_IC_TAG, Code::cast(code), name)); |
525 Object* result = map->UpdateCodeCache(name, Code::cast(code)); | 527 Object* result = map->UpdateCodeCache(name, Code::cast(code)); |
526 if (result->IsFailure()) return result; | 528 if (result->IsFailure()) return result; |
527 } | 529 } |
528 return Set(name, map, Code::cast(code)); | 530 return Set(name, map, Code::cast(code)); |
529 } | 531 } |
530 | 532 |
531 | 533 |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 if (!result->IsFailure()) { | 1121 if (!result->IsFailure()) { |
1120 Code* code = Code::cast(result); | 1122 Code* code = Code::cast(result); |
1121 USE(code); | 1123 USE(code); |
1122 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub")); | 1124 LOG(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub")); |
1123 } | 1125 } |
1124 return result; | 1126 return result; |
1125 } | 1127 } |
1126 | 1128 |
1127 | 1129 |
1128 } } // namespace v8::internal | 1130 } } // namespace v8::internal |
OLD | NEW |