Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Side by Side Diff: src/ic.h

Issue 352583002: The IC exposes a register definition. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_IC_H_ 5 #ifndef V8_IC_H_
6 #define V8_IC_H_ 6 #define V8_IC_H_
7 7
8 #include "src/macro-assembler.h" 8 #include "src/macro-assembler.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 ConstantPoolArray* constant_pool); 391 ConstantPoolArray* constant_pool);
392 }; 392 };
393 393
394 394
395 class LoadIC: public IC { 395 class LoadIC: public IC {
396 public: 396 public:
397 // ExtraICState bits 397 // ExtraICState bits
398 class ContextualModeBits: public BitField<ContextualMode, 0, 1> {}; 398 class ContextualModeBits: public BitField<ContextualMode, 0, 1> {};
399 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); 399 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0);
400 400
401 enum RegisterInfo {
402 kReceiverIndex,
403 kNameIndex,
404 kRegisterArgumentCount
405 };
406 static const Register ReceiverRegister();
407 static const Register NameRegister();
408
401 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) { 409 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) {
402 return ContextualModeBits::encode(contextual_mode); 410 return ContextualModeBits::encode(contextual_mode);
403 } 411 }
404 412
405 static ContextualMode GetContextualMode(ExtraICState state) { 413 static ContextualMode GetContextualMode(ExtraICState state) {
406 return ContextualModeBits::decode(state); 414 return ContextualModeBits::decode(state);
407 } 415 }
408 416
409 ContextualMode contextual_mode() const { 417 ContextualMode contextual_mode() const {
410 return ContextualModeBits::decode(extra_ic_state()); 418 return ContextualModeBits::decode(extra_ic_state());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 }; 499 };
492 500
493 501
494 class KeyedLoadIC: public LoadIC { 502 class KeyedLoadIC: public LoadIC {
495 public: 503 public:
496 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) 504 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate)
497 : LoadIC(depth, isolate) { 505 : LoadIC(depth, isolate) {
498 ASSERT(target()->is_keyed_load_stub()); 506 ASSERT(target()->is_keyed_load_stub());
499 } 507 }
500 508
509 static const Register ReceiverRegister();
510 static const Register NameRegister();
511
501 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, 512 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
502 Handle<Object> key); 513 Handle<Object> key);
503 514
504 // Code generator routines. 515 // Code generator routines.
505 static void GenerateMiss(MacroAssembler* masm); 516 static void GenerateMiss(MacroAssembler* masm);
506 static void GenerateRuntimeGetProperty(MacroAssembler* masm); 517 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
507 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 518 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
508 static void GeneratePreMonomorphic(MacroAssembler* masm) { 519 static void GeneratePreMonomorphic(MacroAssembler* masm) {
509 GenerateMiss(masm); 520 GenerateMiss(masm);
510 } 521 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); 1025 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss);
1015 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); 1026 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss);
1016 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); 1027 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite);
1017 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); 1028 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss);
1018 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); 1029 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss);
1019 1030
1020 1031
1021 } } // namespace v8::internal 1032 } } // namespace v8::internal
1022 1033
1023 #endif // V8_IC_H_ 1034 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698