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 // These constants describe the structure of the interceptor arguments on the | |
412 // stack. The arguments are pushed by the (platform-specific) | |
413 // PushInterceptorArguments and read by LoadPropertyWithInterceptorOnly and | |
414 // LoadWithInterceptor. | |
415 static const int kInterceptorArgsNameIndex = 0; | |
416 static const int kInterceptorArgsInfoIndex = 1; | |
417 static const int kInterceptorArgsThisIndex = 2; | |
418 static const int kInterceptorArgsHolderIndex = 3; | |
419 static const int kInterceptorArgsLength = 4; | |
420 | |
421 private: | 411 private: |
422 explicit StubCache(Isolate* isolate); | 412 explicit StubCache(Isolate* isolate); |
423 | 413 |
424 Handle<Code> ComputeCallInitialize(int argc, | 414 Handle<Code> ComputeCallInitialize(int argc, |
425 RelocInfo::Mode mode, | 415 RelocInfo::Mode mode, |
426 Code::Kind kind); | 416 Code::Kind kind); |
427 | 417 |
428 // The stub cache has a primary and secondary level. The two levels have | 418 // The stub cache has a primary and secondary level. The two levels have |
429 // different hashing algorithms in order to avoid simultaneous collisions | 419 // different hashing algorithms in order to avoid simultaneous collisions |
430 // in both caches. Unlike a probing strategy (quadratic or otherwise) the | 420 // in both caches. Unlike a probing strategy (quadratic or otherwise) the |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 Handle<JSFunction> constant_function_; | 1201 Handle<JSFunction> constant_function_; |
1212 bool is_simple_api_call_; | 1202 bool is_simple_api_call_; |
1213 Handle<FunctionTemplateInfo> expected_receiver_type_; | 1203 Handle<FunctionTemplateInfo> expected_receiver_type_; |
1214 Handle<CallHandlerInfo> api_call_info_; | 1204 Handle<CallHandlerInfo> api_call_info_; |
1215 }; | 1205 }; |
1216 | 1206 |
1217 | 1207 |
1218 } } // namespace v8::internal | 1208 } } // namespace v8::internal |
1219 | 1209 |
1220 #endif // V8_STUB_CACHE_H_ | 1210 #endif // V8_STUB_CACHE_H_ |
OLD | NEW |