OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 Handle<Code> code = compiler.CompileStoreGlobal(receiver, cell, name); | 497 Handle<Code> code = compiler.CompileStoreGlobal(receiver, cell, name); |
498 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); | 498 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); |
499 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); | 499 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); |
500 JSObject::UpdateMapCodeCache(receiver, name, code); | 500 JSObject::UpdateMapCodeCache(receiver, name, code); |
501 return code; | 501 return code; |
502 } | 502 } |
503 | 503 |
504 | 504 |
505 Handle<Code> StubCache::ComputeStoreCallback(Handle<String> name, | 505 Handle<Code> StubCache::ComputeStoreCallback(Handle<String> name, |
506 Handle<JSObject> receiver, | 506 Handle<JSObject> receiver, |
| 507 Handle<JSObject> holder, |
507 Handle<AccessorInfo> callback, | 508 Handle<AccessorInfo> callback, |
508 StrictModeFlag strict_mode) { | 509 StrictModeFlag strict_mode) { |
509 ASSERT(v8::ToCData<Address>(callback->setter()) != 0); | 510 ASSERT(v8::ToCData<Address>(callback->setter()) != 0); |
510 Code::Flags flags = Code::ComputeMonomorphicFlags( | 511 Code::Flags flags = Code::ComputeMonomorphicFlags( |
511 Code::STORE_IC, Code::CALLBACKS, strict_mode); | 512 Code::STORE_IC, Code::CALLBACKS, strict_mode); |
512 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags)); | 513 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags)); |
513 if (probe->IsCode()) return Handle<Code>::cast(probe); | 514 if (probe->IsCode()) return Handle<Code>::cast(probe); |
514 | 515 |
515 StoreStubCompiler compiler(isolate_, strict_mode); | 516 StoreStubCompiler compiler(isolate_, strict_mode); |
516 Handle<Code> code = compiler.CompileStoreCallback(receiver, callback, name); | 517 Handle<Code> code = |
| 518 compiler.CompileStoreCallback(name, receiver, holder, callback); |
517 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); | 519 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); |
518 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); | 520 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); |
519 JSObject::UpdateMapCodeCache(receiver, name, code); | 521 JSObject::UpdateMapCodeCache(receiver, name, code); |
520 return code; | 522 return code; |
521 } | 523 } |
522 | 524 |
523 | 525 |
524 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<String> name, | 526 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<String> name, |
525 Handle<JSObject> receiver, | 527 Handle<JSObject> receiver, |
526 Handle<JSObject> holder, | 528 Handle<JSObject> holder, |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1573 Handle<FunctionTemplateInfo>( | 1575 Handle<FunctionTemplateInfo>( |
1574 FunctionTemplateInfo::cast(signature->receiver())); | 1576 FunctionTemplateInfo::cast(signature->receiver())); |
1575 } | 1577 } |
1576 } | 1578 } |
1577 | 1579 |
1578 is_simple_api_call_ = true; | 1580 is_simple_api_call_ = true; |
1579 } | 1581 } |
1580 | 1582 |
1581 | 1583 |
1582 } } // namespace v8::internal | 1584 } } // namespace v8::internal |
OLD | NEW |