| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 Handle<Code> code = compiler.CompileStoreCallback(receiver, callback, name); | 516 Handle<Code> code = compiler.CompileStoreCallback(receiver, callback, name); |
| 517 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); | 517 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); |
| 518 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); | 518 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); |
| 519 JSObject::UpdateMapCodeCache(receiver, name, code); | 519 JSObject::UpdateMapCodeCache(receiver, name, code); |
| 520 return code; | 520 return code; |
| 521 } | 521 } |
| 522 | 522 |
| 523 | 523 |
| 524 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<String> name, | 524 Handle<Code> StubCache::ComputeStoreViaSetter(Handle<String> name, |
| 525 Handle<JSObject> receiver, | 525 Handle<JSObject> receiver, |
| 526 Handle<JSObject> holder, |
| 526 Handle<JSFunction> setter, | 527 Handle<JSFunction> setter, |
| 527 StrictModeFlag strict_mode) { | 528 StrictModeFlag strict_mode) { |
| 528 Code::Flags flags = Code::ComputeMonomorphicFlags( | 529 Code::Flags flags = Code::ComputeMonomorphicFlags( |
| 529 Code::STORE_IC, Code::CALLBACKS, strict_mode); | 530 Code::STORE_IC, Code::CALLBACKS, strict_mode); |
| 530 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags)); | 531 Handle<Object> probe(receiver->map()->FindInCodeCache(*name, flags)); |
| 531 if (probe->IsCode()) return Handle<Code>::cast(probe); | 532 if (probe->IsCode()) return Handle<Code>::cast(probe); |
| 532 | 533 |
| 533 StoreStubCompiler compiler(isolate_, strict_mode); | 534 StoreStubCompiler compiler(isolate_, strict_mode); |
| 534 Handle<Code> code = compiler.CompileStoreViaSetter(receiver, setter, name); | 535 Handle<Code> code = |
| 536 compiler.CompileStoreViaSetter(name, receiver, holder, setter); |
| 535 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); | 537 PROFILE(isolate_, CodeCreateEvent(Logger::STORE_IC_TAG, *code, *name)); |
| 536 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); | 538 GDBJIT(AddCode(GDBJITInterface::STORE_IC, *name, *code)); |
| 537 JSObject::UpdateMapCodeCache(receiver, name, code); | 539 JSObject::UpdateMapCodeCache(receiver, name, code); |
| 538 return code; | 540 return code; |
| 539 } | 541 } |
| 540 | 542 |
| 541 | 543 |
| 542 Handle<Code> StubCache::ComputeStoreInterceptor(Handle<String> name, | 544 Handle<Code> StubCache::ComputeStoreInterceptor(Handle<String> name, |
| 543 Handle<JSObject> receiver, | 545 Handle<JSObject> receiver, |
| 544 StrictModeFlag strict_mode) { | 546 StrictModeFlag strict_mode) { |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 Handle<FunctionTemplateInfo>( | 1576 Handle<FunctionTemplateInfo>( |
| 1575 FunctionTemplateInfo::cast(signature->receiver())); | 1577 FunctionTemplateInfo::cast(signature->receiver())); |
| 1576 } | 1578 } |
| 1577 } | 1579 } |
| 1578 | 1580 |
| 1579 is_simple_api_call_ = true; | 1581 is_simple_api_call_ = true; |
| 1580 } | 1582 } |
| 1581 | 1583 |
| 1582 | 1584 |
| 1583 } } // namespace v8::internal | 1585 } } // namespace v8::internal |
| OLD | NEW |