Chromium Code Reviews| 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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 case StubCache::kSecondary: return StubCache::secondary_; | 401 case StubCache::kSecondary: return StubCache::secondary_; |
| 402 } | 402 } |
| 403 UNREACHABLE(); | 403 UNREACHABLE(); |
| 404 return NULL; | 404 return NULL; |
| 405 } | 405 } |
| 406 | 406 |
| 407 Isolate* isolate() { return isolate_; } | 407 Isolate* isolate() { return isolate_; } |
| 408 Heap* heap() { return isolate()->heap(); } | 408 Heap* heap() { return isolate()->heap(); } |
| 409 Factory* factory() { return isolate()->factory(); } | 409 Factory* factory() { return isolate()->factory(); } |
| 410 | 410 |
| 411 static const int kInterceptorArgsNameIndex = 0; | |
|
Michael Starzinger
2013/09/11 16:52:26
nit: Maybe even add a short one-line comment above
marja
2013/09/12 08:12:51
Done.
| |
| 412 static const int kInterceptorArgsInfoIndex = 1; | |
| 413 static const int kInterceptorArgsThisIndex = 2; | |
| 414 static const int kInterceptorArgsHolderIndex = 3; | |
| 415 static const int kInterceptorArgsLength = 4; | |
| 416 | |
| 411 private: | 417 private: |
| 412 explicit StubCache(Isolate* isolate); | 418 explicit StubCache(Isolate* isolate); |
| 413 | 419 |
| 414 Handle<Code> ComputeCallInitialize(int argc, | 420 Handle<Code> ComputeCallInitialize(int argc, |
| 415 RelocInfo::Mode mode, | 421 RelocInfo::Mode mode, |
| 416 Code::Kind kind); | 422 Code::Kind kind); |
| 417 | 423 |
| 418 // The stub cache has a primary and secondary level. The two levels have | 424 // The stub cache has a primary and secondary level. The two levels have |
| 419 // different hashing algorithms in order to avoid simultaneous collisions | 425 // different hashing algorithms in order to avoid simultaneous collisions |
| 420 // in both caches. Unlike a probing strategy (quadratic or otherwise) the | 426 // in both caches. Unlike a probing strategy (quadratic or otherwise) the |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 605 Register object_reg, | 611 Register object_reg, |
| 606 Handle<JSObject> holder, | 612 Handle<JSObject> holder, |
| 607 Register holder_reg, | 613 Register holder_reg, |
| 608 Register scratch1, | 614 Register scratch1, |
| 609 Register scratch2, | 615 Register scratch2, |
| 610 Handle<Name> name, | 616 Handle<Name> name, |
| 611 int save_at_depth, | 617 int save_at_depth, |
| 612 Label* miss, | 618 Label* miss, |
| 613 PrototypeCheckType check = CHECK_ALL_MAPS); | 619 PrototypeCheckType check = CHECK_ALL_MAPS); |
| 614 | 620 |
| 615 | |
| 616 protected: | 621 protected: |
| 617 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name); | 622 Handle<Code> GetCodeWithFlags(Code::Flags flags, const char* name); |
| 618 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<Name> name); | 623 Handle<Code> GetCodeWithFlags(Code::Flags flags, Handle<Name> name); |
| 619 | 624 |
| 620 MacroAssembler* masm() { return &masm_; } | 625 MacroAssembler* masm() { return &masm_; } |
| 621 void set_failure(Failure* failure) { failure_ = failure; } | 626 void set_failure(Failure* failure) { failure_ = failure; } |
| 622 | 627 |
| 623 static void LookupPostInterceptor(Handle<JSObject> holder, | 628 static void LookupPostInterceptor(Handle<JSObject> holder, |
| 624 Handle<Name> name, | 629 Handle<Name> name, |
| 625 LookupResult* lookup); | 630 LookupResult* lookup); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1205 Handle<JSFunction> constant_function_; | 1210 Handle<JSFunction> constant_function_; |
| 1206 bool is_simple_api_call_; | 1211 bool is_simple_api_call_; |
| 1207 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1212 Handle<FunctionTemplateInfo> expected_receiver_type_; |
| 1208 Handle<CallHandlerInfo> api_call_info_; | 1213 Handle<CallHandlerInfo> api_call_info_; |
| 1209 }; | 1214 }; |
| 1210 | 1215 |
| 1211 | 1216 |
| 1212 } } // namespace v8::internal | 1217 } } // namespace v8::internal |
| 1213 | 1218 |
| 1214 #endif // V8_STUB_CACHE_H_ | 1219 #endif // V8_STUB_CACHE_H_ |
| OLD | NEW |