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

Side by Side Diff: src/ic.h

Issue 339663008: Revert "Create a RegisterSpec class inside of the IC that provides:" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/mips/code-stubs-mips.cc » ('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 Register kReceiverRegister;
407 static Register kNameRegister;
408 static const Register registers[kRegisterArgumentCount];
409
410 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) { 401 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode) {
411 return ContextualModeBits::encode(contextual_mode); 402 return ContextualModeBits::encode(contextual_mode);
412 } 403 }
413 404
414 static ContextualMode GetContextualMode(ExtraICState state) { 405 static ContextualMode GetContextualMode(ExtraICState state) {
415 return ContextualModeBits::decode(state); 406 return ContextualModeBits::decode(state);
416 } 407 }
417 408
418 ContextualMode contextual_mode() const { 409 ContextualMode contextual_mode() const {
419 return ContextualModeBits::decode(extra_ic_state()); 410 return ContextualModeBits::decode(extra_ic_state());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 }; 491 };
501 492
502 493
503 class KeyedLoadIC: public LoadIC { 494 class KeyedLoadIC: public LoadIC {
504 public: 495 public:
505 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) 496 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate)
506 : LoadIC(depth, isolate) { 497 : LoadIC(depth, isolate) {
507 ASSERT(target()->is_keyed_load_stub()); 498 ASSERT(target()->is_keyed_load_stub());
508 } 499 }
509 500
510 static const Register registers[kRegisterArgumentCount];
511 static Register kReceiverRegister;
512 static Register kNameRegister;
513
514 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, 501 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object,
515 Handle<Object> key); 502 Handle<Object> key);
516 503
517 // Code generator routines. 504 // Code generator routines.
518 static void GenerateMiss(MacroAssembler* masm); 505 static void GenerateMiss(MacroAssembler* masm);
519 static void GenerateRuntimeGetProperty(MacroAssembler* masm); 506 static void GenerateRuntimeGetProperty(MacroAssembler* masm);
520 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); } 507 static void GenerateInitialize(MacroAssembler* masm) { GenerateMiss(masm); }
521 static void GeneratePreMonomorphic(MacroAssembler* masm) { 508 static void GeneratePreMonomorphic(MacroAssembler* masm) {
522 GenerateMiss(masm); 509 GenerateMiss(masm);
523 } 510 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); 1014 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss);
1028 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); 1015 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss);
1029 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); 1016 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite);
1030 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); 1017 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss);
1031 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); 1018 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss);
1032 1019
1033 1020
1034 } } // namespace v8::internal 1021 } } // namespace v8::internal
1035 1022
1036 #endif // V8_IC_H_ 1023 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698